You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Often, in order to realize an algorithm, we need to establish ≥ 1 optimization models.
whiletrue
JuMP.optimize!(model_1)
...
JuMP.optimize!(model_2)
end
If they all log to stdout which is the Julia REPL, it doesn't seem neat.
Is there a method set_log_file to let a specific optimizer log into a specific file?
model_1 = JuMP.Model(() -> Gurobi.Optimizer()) # for example, Gurobi is the optimizer
JuMP.unset_silent(model_1) # meant to let Gurobi log
JuMP.set_log_file(model_1, "Gurobi.log", "a") # mode "a" means new logs are appended to the end of file "output.log"
model_2 = JuMP.Model(() -> Ipopt.Optimizer())
JuMP.unset_silent(model_2)
JuMP.set_log_file(model_2, "Ipopt.log", "w") # mode "w" means that log of the 2nd-time optimization will overwrite those log during the 1st-time optimization
Reference: you can refer to the help-doc of open in Julia REPL, for the different modes, e.g. "a", "w".
The text was updated successfully, but these errors were encountered:
Often, in order to realize an algorithm, we need to establish ≥ 1 optimization models.
If they all log to
stdout
which is the Julia REPL, it doesn't seem neat.Is there a method
set_log_file
to let a specific optimizer log into a specific file?Reference: you can refer to the help-doc of
open
in Julia REPL, for the different modes, e.g. "a", "w".The text was updated successfully, but these errors were encountered: