martinbiel / StochasticPrograms.jl

Julia package for formulating and analyzing stochastic recourse models.
MIT License
75 stars 25 forks source link

Small problem in the Quick Start tutorial #45

Open pjssilva opened 1 year ago

pjssilva commented 1 year ago

In the quick start tutorial, when associating the model with the Progressive Hedging algorithm, it appears the following code

set_optimizer_attribute(sp_progressivehedging, SubProblemOptimizer(), Ipopt.Optimizer)
set_suboptimizer_attribute(sp_progressivehedging, MOI.RawParameter("print_level"), 0) # Silence Ipopt

It seems like MOI does not suppoer RawParamter anymore. I could make the algorithm run by changing the code to

set_optimizer_attribute(
    sp_progressivehedging, SubProblemOptimizer(), 
    MOI.OptimizerWithAttributes(Ipopt.Optimizer, MOI.Silent() => true)
)
odow commented 1 year ago

Try MOI.RawOptimizerAttribute("print_level")

pjssilva commented 1 year ago

Try MOI.RawOptimizerAttribute("print_level")

It also works.