-
Notifications
You must be signed in to change notification settings - Fork 6
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
[Dev] Add optimisation solvers #304
Labels
internal dev
Modification to the code is requested and should not affect user experiment
Comments
jbcaillau
added
the
internal dev
Modification to the code is requested and should not affect user experiment
label
Oct 6, 2024
Hi there, julia> using AmplNLWriter, JuMP, Uno_jll
julia> model = Model(() -> AmplNLWriter.Optimizer(Uno_jll.amplexe));
julia> @variable(model, x);
julia> @variable(model, y);
julia> @objective(model, Min, (1 - x)^2 + 100 * (y - x^2)^2);
julia> optimize!(model)
Original model /var/folders/bg/dzq_hhvx1dxgy6gb5510pxj80000gn/T/jl_bVsNQH/model.nl
2 variables, 0 constraints
Reformulated model /var/folders/bg/dzq_hhvx1dxgy6gb5510pxj80000gn/T/jl_bVsNQH/model.nl_scaled_equalityconstrained_boundrelaxed
2 variables, 0 constraints
Used overwritten options:
- LS_backtracking_ratio = 0.5
- LS_min_step_length = 5e-7
- LS_scale_duals_with_step_length = yes
- armijo_decrease_fraction = 1e-8
- barrier_damping_factor = 1e-5
- barrier_tau_min = 0.99
- constraint_relaxation_strategy = feasibility_restoration
- filter_beta = 0.99999
- filter_fact = 1e4
- filter_gamma = 1e-8
- filter_type = standard
- filter_ubd = 1e4
- globalization_mechanism = LS
- globalization_strategy = waechter_filter_method
- l1_constraint_violation_coefficient = 1000.
- linear_solver = MUMPS
- loose_tolerance = 1e-6
- loose_tolerance_consecutive_iteration_threshold = 15
- progress_norm = L1
- protect_actual_reduction_against_roundoff = yes
- residual_norm = INF
- scale_functions = yes
- sparse_format = COO
- subproblem = primal_dual_interior_point
- switch_to_optimality_requires_linearized_feasibility = no
- switching_delta = 1
- tolerance = 1e-8
┌───────┬─────────┬────────────────┬─────────────┬───────┬────────────────┬──────────────┬─────────────┬──────────────┬─────────────────┬────────────────────────┐
│ iter │ LS iter │ barrier param. │ step length │ phase │ regularization │ step norm │ objective │ stationarity │ complementarity │ status │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 0 │ - │ - │ - │ OPT │ - │ - │ 1 │ 2 │ 0 │ initial point │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 1 │ 1 │ 0.1 │ 1 │ OPT │ 0 │ 1 │ 100 │ - │ - │ rejected (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ - │ 2 │ - │ 0.5 │ - │ - │ 0.5 │ 6.5 │ - │ - │ rejected (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ - │ 3 │ - │ 0.25 │ - │ - │ 0.25 │ 0.953125 │ 12.5 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 2 │ 1 │ 0.1 │ 1 │ OPT │ 0 │ 0.0902778 │ 0.483206 │ 1.01166 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 3 │ 1 │ 0.1 │ 1 │ OPT │ 0 │ 0.429389 │ 3.46968 │ - │ - │ rejected (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ - │ 2 │ - │ 0.5 │ - │ - │ 0.214695 │ 0.457088 │ 9.5274 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 4 │ 1 │ 0.1 │ 1 │ OPT │ 0 │ 0.0950542 │ 0.188942 │ 0.415353 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 5 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.349223 │ 0.901785 │ - │ - │ rejected (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ - │ 2 │ - │ 0.5 │ - │ - │ 0.174612 │ 0.139187 │ 6.5051 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 6 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.092873 │ 0.054941 │ 0.451043 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 7 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.248802 │ 0.0720927 │ - │ - │ rejected (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ - │ 2 │ - │ 0.5 │ - │ - │ 0.124401 │ 0.0291446 │ 2.26614 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 8 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.11047 │ 0.00985865 │ 1.15467 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 9 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.100021 │ 0.00232375 │ 1.00373 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ iter │ LS iter │ barrier param. │ step length │ phase │ regularization │ step norm │ objective │ stationarity │ complementarity │ status │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 10 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.0509267 │ 0.000237972 │ 0.218984 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 11 │ 1 │ 0.02 │ 1 │ OPT │ 0 │ 0.0253247 │ 4.92674e-06 │ 0.0595169 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 12 │ 1 │ 0.00282843 │ 1 │ OPT │ 0 │ 0.00319684 │ 2.81895e-09 │ 0.000831455 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 13 │ 1 │ 1.84491e-06 │ 1 │ OPT │ 0 │ 9.78057e-05 │ 8.88178e-16 │ 8.67623e-07 │ 0 │ accepted (f-type) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 14 │ 1 │ 2.5059e-09 │ 1 │ OPT │ 0 │ 4.65423e-08 │ 0 │ 2.46136e-13 │ 0 │ accepted (f-type) │
└───────┴─────────┴────────────────┴─────────────┴───────┴────────────────┴──────────────┴─────────────┴──────────────┴─────────────────┴────────────────────────┘
Uno 1.1.0 (LS feasibility_restoration waechter_filter_method primal_dual_interior_point)
Mon Oct 28 19:21:41 2024
────────────────────────────────────────
Status: Converged with feasible KKT point
Objective value: 0
Primal feasibility: 0
┌ Stationarity residual: 2.461364e-13
└ Complementarity residual: 0
┌ Feasibility stationarity residual: 2.461364e-13
└ Feasibility complementarity residual: 0
┌ Infeasibility measure: 0
│ Objective measure: 0
└ Auxiliary measure: 0
Primal solution: 1 1
┌ Constraint multipliers:
│ Lower bound multipliers: 0 0
└ Upper bound multipliers: 0 0
┌ Constraint feasibility multipliers:
│ Lower bound feasibility multipliers: 0 0
└ Upper bound feasibility multipliers: 0 0
Objective multiplier: 1
CPU time: 0.00863s
Iterations: 14
Objective evaluations: 20
Constraints evaluations: 0
Objective gradient evaluations: 16
Jacobian evaluations: 0
Hessian evaluations: 14
Number of subproblems solved: 14
julia> solution_summary(model)
* Solver : AmplNLWriter
* Status
Result count : 1
Termination status : LOCALLY_SOLVED
Message from the solver:
"Uno 1.1.0: Converged with feasible KKT point"
* Candidate solution (result #1)
Primal status : FEASIBLE_POINT
Dual status : NO_SOLUTION
Objective value : 4.43734e-29
Dual objective value : 4.43734e-29
* Work counters
Solve time (sec) : 3.24550e-01 I'll be in touch when we have a proper Julia interface ;) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/cvanaret/Uno
(still needs a Julia interface)
to be discussed with @cvanaret
The text was updated successfully, but these errors were encountered: