Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

stuff

  • Loading branch information...
commit 0af136e7423f01f67feaac03d1f66f49519f62b3 1 parent 7613988
@xuy authored
Showing with 9 additions and 4 deletions.
  1. +9 −4 hs071.py
View
13 hs071.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.