Permalink
Browse files

stuff

  • Loading branch information...
1 parent 7613988 commit 0af136e7423f01f67feaac03d1f66f49519f62b3 @xuy committed Jan 20, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 hs071.py
View
@@ -112,13 +112,18 @@ def apply_new(x):
# import pdb; pdb.set_trace()
nlp.close()
+def print_variable(variable_name, value):
+ for i in xrange(len(value)):
+ print variable_name + "["+str(i)+"] =", value[i]
+
+print
print "Solution of the primal variables, x"
-for i in xrange(len(x)):
- print "x["+str(i)+"] =", x[i]
+print_variable("x", x)
print
print "Solution of the bound multipliers, z_L and z_U"
-print zl, zu
-
+print_variable("z_L", zl)
+print_variable("z_U", zu)
+print
print "Objective value"
print "f(x*) =", obj

0 comments on commit 0af136e

Please sign in to comment.