File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ We can construct the optimization problem as follows:
3838 y = scip.addVar(vtype = ' C' , lb = 0 , ub = None , name = ' y' )
3939 z = scip.addVar(vtype = ' C' , lb = 0 , ub = None , name = ' z' )
4040 cons_1 = scip.addCons(x + y <= 5 , name = " cons_1" )
41- cons_1 = scip.addCons(y + z >= 3 , name = " cons_2" )
42- cons_1 = scip.addCons(x + y == 5 , name = " cons_3" )
41+ cons_2 = scip.addCons(y + z >= 3 , name = " cons_2" )
42+ cons_3 = scip.addCons(x + y == 5 , name = " cons_3" )
4343 scip.setObjective(2 * x + 3 * y - 5 * z, sense = " minimize" )
4444 scip.optimize()
4545
@@ -68,7 +68,7 @@ optimal objective value, and the variable solution values in the optimal solutio
6868 num_nodes = scip.getNTotalNodes() # Note that getNNodes() is only the number of nodes for the current run (resets at restart)
6969 obj_val = scip.getObjVal()
7070 for scip_var in [x, y, z]:
71- print (f " Variable { scip_var.name} has value { scip.getVal(scip_var)} )
71+ print (f " Variable { scip_var.name} has value { scip.getVal(scip_var)} " )
7272
7373 Set / Get a Parameter
7474=====================
You can’t perform that action at this time.
0 commit comments