prob.recorders = [DBCaseRecorder()] tt = time.time() prob.run() error = prob.check_solution() print "\nUsing MDF Architecture" print "Minimum found at (%f, %f, %f)" % (prob.dis1.z1, prob.dis1.z2, prob.dis1.x1) print "Minimum differs from expected by (%f, %f, %f)" % ( error["z1"], error["z2"], error['dis1.x1']) print "Couping vars: %f, %f" % (prob.dis1.y1, prob.dis2.y2) print "Minimum objective: ", prob.get_objectives()['obj1'].evaluate() print "Elapsed time: ", time.time() - tt, "seconds" print "\n" prob = SellarProblem() prob.architecture = IDF() prob.configure() prob.recorders = [DBCaseRecorder()] tt = time.time() prob.run() error = prob.check_solution() print "\nUsing IDF Architecture"
tt = time.time() prob.run() error = prob.check_solution() print "\nUsing MDF Architecture" print "Minimum found at (%f, %f, %f)" % (prob.dis1.z1, prob.dis1.z2, prob.dis1.x1) print "Minimum differs from expected by (%f, %f, %f)" % (error["z1"], error["z2"], error['dis1.x1']) print "Couping vars: %f, %f" % (prob.dis1.y1, prob.dis2.y2) print "Minimum objective: ", prob.get_objectives()['obj1'].evaluate() print "Elapsed time: ", time.time()-tt, "seconds" print "\n" prob = SellarProblem() prob.architecture = IDF() prob.configure() prob.driver.recorders = [DBCaseRecorder()] tt = time.time() prob.run() error = prob.check_solution() print "\nUsing IDF Architecture"