Skip to content

Commit

Permalink
Merge pull request #2502 from MrGorbunov/main
Browse files Browse the repository at this point in the history
Fixed examples in working_models.html to Run
  • Loading branch information
jsiirola authored Aug 23, 2022
2 parents f46e9ac + 23bcabc commit dd78d36
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/OnlineDocs/tests/scripting/iterative2.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
model.n = pyo.Param(default=4)
model.x = pyo.Var(pyo.RangeSet(model.n), within=pyo.Binary)
def o_rule(model):
return summation(model.x)
return pyo.summation(model.x)
model.o = pyo.Objective(rule=o_rule)
model.c = pyo.ConstraintList()

Expand Down
2 changes: 1 addition & 1 deletion doc/OnlineDocs/tests/scripting/noiteration1.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
model.n = pyo.Param(default=4)
model.x = pyo.Var(pyo.RangeSet(model.n), within=pyo.Binary)
def o_rule(model):
return summation(model.x)
return pyo.summation(model.x)
model.o = pyo.Objective(rule=o_rule)
model.c = pyo.ConstraintList()

Expand Down
1 change: 0 additions & 1 deletion doc/OnlineDocs/working_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,6 @@ of the objective function object. Here is a simple example:
>>> print ("------------- extend obj --------------") # doctest: +SKIP
>>> model.obj.expr += 10 * model.y

>>> opt = SolverFactory('cplex') # doctest: +SKIP
>>> opt.solve(model) # doctest: +SKIP
>>> model.pprint() # doctest: +SKIP

Expand Down

0 comments on commit dd78d36

Please sign in to comment.