Skip to content
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

Infeasibility detection #38

Open
odow opened this issue Oct 20, 2024 · 1 comment
Open

Infeasibility detection #38

odow opened this issue Oct 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@odow
Copy link
Contributor

odow commented Oct 20, 2024

Is this expected behavior? Failed with suboptimal point seems like the wrong status to report.

julia> using JuMP, AmplNLWriter, Uno_jll

julia> begin
           model = Model() do
               return AmplNLWriter.Optimizer(Uno_jll.amplexe; directory = "/tmp/uno")
           end
           set_attribute(model, "preset", "ipopt")
           set_attribute(model, "linear_solver", "MUMPS")
           @variable(model, x)
           @variable(model, y)
           @constraint(model, y == exp(x))
           @constraint(model, x == y^2)
           optimize!(model)
           solution_summary(model)
       end
Model /tmp/uno/model.nl
Options:
- AMPL_write_solution_to_file = yes
- BQPD_kmax = 500
- BQPD_print_subproblem = no
- LP_solver = BQPD
- LS_backtracking_ratio = 0.5
- LS_min_step_length = 5e-7
- LS_scale_duals_with_step_length = yes
- QP_solver = BQPD
- TR_activity_tolerance = 1e-6
- TR_aggressive_decrease_factor = 4
- TR_decrease_factor = 2
- TR_increase_factor = 2
- TR_min_radius = 1e-7
- TR_radius = 10.
- TR_radius_reset_threshold = 1e-4
- armijo_decrease_fraction = 1e-8
- armijo_tolerance = 1e-9
- barrier_damping_factor = 1e-5
- barrier_default_multiplier = 1
- barrier_initial_parameter = 0.1
- barrier_k_epsilon = 10
- barrier_k_mu = 0.2
- barrier_k_sigma = 1e10
- barrier_push_variable_to_interior_k1 = 1e-2
- barrier_push_variable_to_interior_k2 = 1e-2
- barrier_regularization_exponent = 0.25
- barrier_small_direction_factor = 10.
- barrier_smax = 100
- barrier_tau_min = 0.99
- barrier_theta_mu = 1.5
- barrier_update_fraction = 10
- constraint_relaxation_strategy = feasibility_restoration
- convexify_QP = false
- dual_regularization_fraction = 1e-8
- enforce_linear_constraints = no
- filter_beta = 0.99999
- filter_capacity = 50
- filter_fact = 1e4
- filter_gamma = 1e-8
- filter_sufficient_infeasibility_decrease_factor = 0.9
- filter_switching_infeasibility_exponent = 1.1
- filter_type = standard
- filter_ubd = 1e4
- function_scaling_factor = 100
- function_scaling_threshold = 100
- funnel_beta = 0.9999
- funnel_fact = 1.5
- funnel_gamma = 0.001
- funnel_kappa = 0.5
- funnel_require_acceptance_wrt_current_iterate = no
- funnel_ubd = 1.0
- funnel_update_strategy = 1
- globalization_mechanism = LS
- globalization_strategy = waechter_filter_method
- hessian_model = exact
- l1_constraint_violation_coefficient = 1000.
- l1_relaxation_decrease_factor = 10.
- l1_relaxation_epsilon1 = 0.1
- l1_relaxation_epsilon2 = 0.1
- l1_relaxation_fixed_parameter = no
- l1_relaxation_initial_parameter = 1.
- l1_relaxation_residual_small_threshold = 1e-12
- l1_small_duals_threshold = 1e-10
- least_square_multiplier_max_norm = 1e3
- linear_solver = MUMPS
- logger = INFO
- loose_tolerance = 1e-6
- loose_tolerance_consecutive_iteration_threshold = 15
- max_iterations = 2000
- nonmonotone_filter_number_dominated_entries = 3
- primal_regularization_decrease_factor = 3.
- primal_regularization_fast_increase_factor = 100.
- primal_regularization_initial_factor = 1e-4
- primal_regularization_lb = 1e-20
- primal_regularization_slow_increase_factor = 8.
- print_solution = no
- progress_norm = L1
- protect_actual_reduction_against_roundoff = yes
- regularization_failure_threshold = 1e40
- regularization_increase_factor = 2
- regularization_initial_value = 1e-4
- residual_norm = INF
- residual_scaling_threshold = 100.
- scale_functions = yes
- scale_residuals = yes
- sparse_format = COO
- statistics_LS_step_length_column_order = 10
- statistics_SOC_column_order = 9
- statistics_TR_radius_column_order = 10
- statistics_barrier_parameter_column_order = 8
- statistics_complementarity_column_order = 105
- statistics_dual_feasibility_column_order = 102
- statistics_funnel_width_column_order = 25
- statistics_major_column_order = 1
- statistics_minor_column_order = 2
- statistics_objective_column_order = 100
- statistics_penalty_parameter_column_order = 5
- statistics_primal_feasibility_column_order = 101
- statistics_print_header_every_iterations = 15
- statistics_regularization_column_order = 21
- statistics_restoration_phase_column_order = 20
- statistics_stationarity_column_order = 104
- statistics_status_column_order = 200
- statistics_step_norm_column_order = 31
- subproblem = primal_dual_interior_point
- switch_to_optimality_requires_linearized_feasibility = no
- switching_delta = 1
- switching_infeasibility_exponent = 2
- threshold_unsuccessful_attempts = 8
- time_limit = inf
- tolerance = 1e-8
- unbounded_objective_threshold = -1e20
Problem /tmp/uno/model.nl_scaled_equalityconstrained_boundrelaxed
2 variables, 2 constraints

Options:
- AMPL_write_solution_to_file = yes
- LS_backtracking_ratio = 0.5
- LS_min_step_length = 5e-7
- LS_scale_duals_with_step_length = yes
- armijo_decrease_fraction = 1e-8
- armijo_tolerance = 1e-9
- barrier_damping_factor = 1e-5
- barrier_default_multiplier = 1
- barrier_initial_parameter = 0.1
- barrier_k_epsilon = 10
- barrier_k_mu = 0.2
- barrier_k_sigma = 1e10
- barrier_push_variable_to_interior_k1 = 1e-2
- barrier_push_variable_to_interior_k2 = 1e-2
- barrier_regularization_exponent = 0.25
- barrier_small_direction_factor = 10.
- barrier_tau_min = 0.99
- barrier_theta_mu = 1.5
- barrier_update_fraction = 10
- constraint_relaxation_strategy = feasibility_restoration
- dual_regularization_fraction = 1e-8
- filter_beta = 0.99999
- filter_capacity = 50
- filter_fact = 1e4
- filter_gamma = 1e-8
- filter_sufficient_infeasibility_decrease_factor = 0.9
- filter_type = standard
- filter_ubd = 1e4
- function_scaling_threshold = 100
- globalization_mechanism = LS
- globalization_strategy = waechter_filter_method
- l1_constraint_violation_coefficient = 1000.
- least_square_multiplier_max_norm = 1e3
- linear_solver = MUMPS
- logger = INFO
- loose_tolerance = 1e-6
- loose_tolerance_consecutive_iteration_threshold = 15
- max_iterations = 2000
- primal_regularization_decrease_factor = 3.
- primal_regularization_fast_increase_factor = 100.
- primal_regularization_initial_factor = 1e-4
- primal_regularization_lb = 1e-20
- primal_regularization_slow_increase_factor = 8.
- progress_norm = L1
- protect_actual_reduction_against_roundoff = yes
- regularization_failure_threshold = 1e40
- residual_norm = INF
- residual_scaling_threshold = 100.
- scale_functions = yes
- sparse_format = COO
- statistics_LS_step_length_column_order = 10
- statistics_barrier_parameter_column_order = 8
- statistics_complementarity_column_order = 105
- statistics_major_column_order = 1
- statistics_minor_column_order = 2
- statistics_objective_column_order = 100
- statistics_primal_feasibility_column_order = 101
- statistics_print_header_every_iterations = 15
- statistics_regularization_column_order = 21
- statistics_restoration_phase_column_order = 20
- statistics_stationarity_column_order = 104
- statistics_status_column_order = 200
- statistics_step_norm_column_order = 31
- subproblem = primal_dual_interior_point
- switch_to_optimality_requires_linearized_feasibility = no
- switching_delta = 1
- switching_infeasibility_exponent = 2
- threshold_unsuccessful_attempts = 8
- time_limit = inf
- tolerance = 1e-8
- unbounded_objective_threshold = -1e20
┌───────┬─────────┬────────────────┬─────────────┬───────┬────────────────┬──────────────┬─────────────┬───────────────┬──────────────┬─────────────────┬────────────────────────┐
│ iter  │ LS iter │ barrier param. │ step length │ phase │ regularization │ step norm    │ objective   │ primal feas.  │ stationarity │ complementarity │ status                 │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 0---           │ OPT   │ --0100               │ initial point          │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 110.021           │ OPT   │ 0101--               │ rejected (h-type)      │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -2-0.5--0.500.7500               │ accepted (h-type)      │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 2-0.02-           │ OPT   │ -------                      │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ 210.51           │ FEAS  │ 00.048304100.753481--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -2-0.5--0.024152100.750873--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -3-0.25--0.01207600.750218--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -4-0.125--0.0060380200.750055--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -5-0.0625--0.0030190100.750014--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -6-0.03125--0.001509500.750003--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -7-0.015625--0.00075475200.750001--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -8-0.0078125--0.00037737600.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -9-0.00390625--0.00018868800.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -10-0.00195312--9.4344e-0500.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -11-0.000976562--4.7172e-0500.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ iter  │ LS iter │ barrier param. │ step length │ phase │ regularization │ step norm    │ objective   │ primal feas.  │ stationarity │ complementarity │ status                 │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -12-0.000488281--2.3586e-0500.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -13-0.000244141--1.1793e-0500.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -14-0.00012207--5.8965e-0600.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -15-6.10352e-05--2.94825e-0600.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -16-3.05176e-05--1.47413e-0600.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -17-1.52588e-05--7.37063e-0700.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -18-7.62939e-06--3.68531e-0700.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -19-3.8147e-06--1.84266e-0700.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -20-1.90735e-06--9.21328e-0800.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -21-9.53674e-07--4.60664e-0800.75--               │ rejected (restoration) │
├───────┼─────────┼────────────────┼─────────────┼───────┼────────────────┼──────────────┼─────────────┼───────────────┼──────────────┼─────────────────┼────────────────────────┤
│ -----------               │ LS failed              │
└───────┴─────────┴────────────────┴─────────────┴───────┴────────────────┴──────────────┴─────────────┴───────────────┴──────────────┴─────────────────┴────────────────────────┘


Uno (LS feasibility_restoration waechter_filter_method primal_dual_interior_point)
Mon Oct 21 08:57:38 2024
────────────────────────────────────────
Status:					Failed with suboptimal point
Objective value:			0
Primal feasibility:			0.5
┌ Stationarity residual:		0
└ Complementarity residual:		0
┌ Feasibility stationarity residual:	0
└ Feasibility complementarity residual:	0
┌ Infeasibility measure:		0.75
│ Objective measure:			0
└ Auxiliary measure:			0
CPU time:				0.006235s
Iterations:				2
Objective evaluations:			3
Constraints evaluations:		25
Objective gradient evaluations:		4
Jacobian evaluations:			4
Hessian evaluations:			3
Number of subproblems solved:		2
* Solver : AmplNLWriter

* Status
  Result count       : 1
  Termination status : OTHER_LIMIT
  Message from the solver:
  ""

* Candidate solution (result #1)
  Primal status      : UNKNOWN_RESULT_STATUS
  Dual status        : NO_SOLUTION
  Objective value    : 0.00000e+00
  Dual objective value : 0.00000e+00

* Work counters
  Solve time (sec)   : 6.65090e-02


julia> print(read("/tmp/uno/model.nl", String))
g3 1 1 0
 2 2 1 0 2 0
 2 1
 0 0
 2 0 0
 0 0 0 1
 0 0 0 0 0
 4 0
 0 0
 0 0 0 0 0
C0
o1
v1
o44
v0
C1
o2
n-1
o2
v1
v1
O0 0
n0
x2
0 0
1 0
r
4 0
4 0
b
3
3
k1
2
J0 2
0 0
1 0
J1 2
0 1
1 0
@cvanaret cvanaret self-assigned this Oct 20, 2024
@cvanaret cvanaret added the bug Something isn't working label Oct 20, 2024
@cvanaret
Copy link
Owner

Infeasibility is indeed not detected. Here, the line search during feasibility restoration fails and it could be that the termination criteria of the feasibility problem are not tested. I will investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants