Skip to content
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ It is possible to change the current value of a parameter with the
function:

```julia
ParameterJuMP.setvalue!(p::Parameter, new_value::Number)
fix(p::Parameter, new_value::Number)
```

Finally, the `dual` function of JuMP is overloaded to return duals
Expand Down Expand Up @@ -102,7 +102,7 @@ optimize!(model)
dual(a)

# modify the value of the parameter a to 20
ParameterJuMP.setvalue!(a, 20)
fix(a, 20)

# solve the model with the new value of the parameter
optimize!(model)
Expand Down Expand Up @@ -214,7 +214,7 @@ optimize!(model_pure)
y_duals = dual.(y)

# modify y
ParameterJuMP.setvalue.(y, new_value_for_y)
fix.(y, new_value_for_y)

# solve problem (again)
optimize!(model_pure)
Expand Down
1 change: 1 addition & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
julia 1.0
JuMP 0.19 0.20
MathOptInterface 0.8.4
SparseArrays
10 changes: 5 additions & 5 deletions examples/benders_quatile_regression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ using JuMP
#' such as Clp, Xpress, Gurobi, CPLEX and so on)

#+ echo = false
# using GLPK
# const OPTIMIZER = GLPK.Optimizer;
# using Xpress
# const OPTIMIZER = Xpress.Optimizer;
#+

using Xpress
const OPTIMIZER = Xpress.Optimizer;
using GLPK
const OPTIMIZER = GLPK.Optimizer;

#' TimerOutputs: a time measuring library to demonstrate the advantage of using ParameterJuMP
using TimerOutputs
Expand Down Expand Up @@ -476,7 +476,7 @@ function slave_solve(PARAM, model, master_solution)
# *parameters* can be set to new values and the optimization
# model will be automatically updated
β = model[2]
ParameterJuMP.setvalue!.(β, β0)
fix.(β, β0)
else
# JuMP also has the hability to fix variables to new values
β_fixed = model[3]
Expand Down
141 changes: 70 additions & 71 deletions examples/html/benders_quatile_regression.html

Large diffs are not rendered by default.

Loading