From 39aebbf95ebcec7937d7a475bf4f5c1962976884 Mon Sep 17 00:00:00 2001 From: Mark Turner Date: Mon, 3 Mar 2025 10:56:45 +0100 Subject: [PATCH] Antonia errors after using the tutorial --- docs/tutorials/model.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/tutorials/model.rst b/docs/tutorials/model.rst index 5dd4324f8..a117b1c71 100644 --- a/docs/tutorials/model.rst +++ b/docs/tutorials/model.rst @@ -38,8 +38,8 @@ We can construct the optimization problem as follows: y = scip.addVar(vtype='C', lb=0, ub=None, name='y') z = scip.addVar(vtype='C', lb=0, ub=None, name='z') cons_1 = scip.addCons(x + y <= 5, name="cons_1") - cons_1 = scip.addCons(y + z >= 3, name="cons_2") - cons_1 = scip.addCons(x + y == 5, name="cons_3") + cons_2 = scip.addCons(y + z >= 3, name="cons_2") + cons_3 = scip.addCons(x + y == 5, name="cons_3") scip.setObjective(2 * x + 3 * y - 5 * z, sense="minimize") scip.optimize() @@ -68,7 +68,7 @@ optimal objective value, and the variable solution values in the optimal solutio num_nodes = scip.getNTotalNodes() # Note that getNNodes() is only the number of nodes for the current run (resets at restart) obj_val = scip.getObjVal() for scip_var in [x, y, z]: - print(f"Variable {scip_var.name} has value {scip.getVal(scip_var)}) + print(f"Variable {scip_var.name} has value {scip.getVal(scip_var)}") Set / Get a Parameter =====================