-
Notifications
You must be signed in to change notification settings - Fork 16
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
log_to_console attribute not working #142
Comments
Do you have a reproducible example? julia> using JuMP, HiGHS
julia> model = Model(HiGHS.Optimizer)
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: HiGHS
julia> set_optimizer_attribute(model, "log_to_console", false)
julia> @variable(model, x >= 0)
x
julia> optimize!(model)
julia> set_optimizer_attribute(model, "log_to_console", true)
julia> optimize!(model)
Solving LP without presolve or with basis
Solving an unconstrained LP with 1 columns
Model status : Optimal
Objective value : 0.0000000000e+00
HiGHS run time : 0.00 |
Thanks for getting back to me so quickly. I believe the problem is only with IPM. Here is a minimum working example: julia> model = Model(optimizer_with_attributes(HiGHS.Optimizer, "log_to_console"=>false, "solver"=>"ipm"))
A JuMP Model
Feasibility problem with:
Variables: 0
Model mode: AUTOMATIC
CachingOptimizer state: EMPTY_OPTIMIZER
Solver name: HiGHS
julia> @variable(model, x >= 0)
x
julia> @variable(model, 0 <= y <= 3)
y
julia> @objective(model, Min, 12x + 20y)
12 x + 20 y
julia> @constraint(model, c1, 6x + 8y >= 100)
c1 : 6 x + 8 y >= 100.0
julia> @constraint(model, c2, 7x + 12y >= 120)
c2 : 7 x + 12 y >= 120.0
julia> optimize!(model)
Input
Number of variables: 2
Number of free variables: 0
Number of constraints: 2
Number of equality constraints: 0
Number of matrix entries: 4
Matrix range: [6e+00, 1e+01]
RHS range: [1e+02, 1e+02]
Objective range: [1e+01, 2e+01]
Bounds range: [3e+00, 3e+00]
Preprocessing
Dualized model: no
Number of dense columns: 0
Range of scaling factors: [5.00e-01, 1.00e+00]
IPX version 1.0
Interior Point Solve
Iter P.res D.res P.obj D.obj mu Time
0 8.85e+00 2.66e+00 2.03715741e+02 1.90309850e+02 3.67e+01 0s
1 8.85e-06 2.66e-06 2.15808217e+02 1.93588563e+02 4.44e+00 0s
2 7.84e-07 5.20e-07 2.05317615e+02 2.02113669e+02 6.41e-01 0s
3 7.85e-13 4.53e-08 2.05209034e+02 2.04938729e+02 5.41e-02 0s
4 6.58e-15 4.53e-14 2.05000287e+02 2.04999555e+02 1.46e-04 0s
5* 6.49e-15 1.78e-15 2.05000000e+02 2.05000000e+02 5.76e-10 0s
Constructing starting basis...
Crossover
Primal residual before push phase: 8.01e-10
Dual residual before push phase: 1.03e-10
Number of dual pushes required: 0
Number of primal pushes required: 0
Summary
Runtime: 0.03s
Status interior point solve: optimal
Status crossover: optimal
objective value: 2.05000000e+02
interior solution primal residual (abs/rel): 1.42e-14 / 1.17e-16
interior solution dual residual (abs/rel): 1.78e-15 / 8.46e-17
interior solution objective gap (abs/rel): 2.88e-09 / 1.40e-11
basic solution primal infeasibility: 0.00e+00
basic solution dual infeasibility: 0.00e+00 |
This is an upstream bug in HiGHS: ERGO-Code/HiGHS#967 |
Thanks for looking into this! |
Thanks for reporting it. Hopefully we can get this resolved upstream and a fix issued. I've started a patch here: ERGO-Code/HiGHS#1052. As an aside, do you really need to force |
Awesome, I'll keep an eye out for the patch. I don't need to force |
Yes. It may choose a slower method, like Gurobi did with simplex over barrier. Did you force Gurobi to choose simplex? In most LPs, it should choose barrier as the first algorithm to try, and usually it will even run a concurrent solve with both barrier and primal/dual simplex. |
Closing since this isn't a bug in HiGHS.jl and Julian has confirmed the upstream issue. If you run into any other bugs in HiGHS, please open an issue. If you have some general questions, e.g., comparisons with Gurobi, make a post on the forum, https://discourse.julialang.org/c/domain/opt/13, and we can discuss there. |
When I run
optimize!
with a JuMP Model with the HiGHS optimizer, with the attribute "log_to_console" set to false, I am still seeing output to both the REPL and to the log file (though different outputs). I am under the impression that setting "log_to_console" to be false would mean the solver would still log to the output file (if specified), and not output anything in the console.Log file output:
Console output:
The text was updated successfully, but these errors were encountered: