Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Antonia errors after using the tutorial #960

Merged
merged 1 commit into from
Mar 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/tutorials/model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
=====================
Expand Down
Loading