Skip to content

Conversation

@apozharski
Copy link
Member

Lifting now maintains structure if a vdx mpcc is passed.

@nosnoc-ci-bot
Copy link

nosnoc-ci-bot commented Mar 10, 2025

Summary - mpecopt coverage

Summary
Generated on: 03/17/2025 - 20:23:33
Coverage date: 03/17/2025 - 20:23:15
Parser: Cobertura
Assemblies: 2
Classes: 47
Files: 47
Line coverage: 31.3% (1175 of 3746)
Covered lines: 1175
Uncovered lines: 2571
Coverable lines: 3746
Total lines: 5926
Covered branches: 0
Total branches: 0
Method coverage: Feature is only available for sponsors
Tag: 21_13909076109

Coverage

- 15.5%
Name Line Branch
**** 15.5% ****
addaptive_active_set_identification 0%
BNLPProjectionStrategy
check_feasiblity_of_lpec 0%
check_if_B_stationary 0%
create_comparison_table 0%
create_lpec_functions 100%
create_lpec_subproblem 48.9%
create_mpec_functions 68.7%
create_phase_i_nlp_solver 0%
create_phase_i_nlp_solver_dev 0%
determine_multipliers_based_stationary_point 14.6%
fast_B_stationarity_check 0%
find_active_sets 100%
find_active_sets_piece_nlp 68%
find_nonscalar 88.2%
HomotopySolverOptions 100%
HomotopySteering
InitializationStrategy
lpec_fallback_strategy 0%
lpec_fallback_strategy_phase_ii 0%
lpec_solver 20%
LpecSolver
LPECSolverOptions 100%
mpec_active_set_generate_problem_functions 0%
mpec_active_set_nosnoc 0%
mpec_active_set_preprocess 0%
mpec_homotopy_solver 0%
mpec_optimizer 0%
mpecopt_phase_ii 0%
nice_plot_colors 0%
PieceNLPStartegy
plot_lpec 0%
print_iter_details 0%
print_iter_header 100%
print_iter_header_objective 0%
print_iter_line 100%
print_iter_line_objective 0%
print_iter_stats 91.6%
print_iter_stats_objective 0%
print_iter_summary 100%
print_iter_summary_scholtes 0%
print_phase_i 100%
print_phase_ii 100%
project_to_bounds 100%
unfold_struct 0%
mpecopt - 62.4%
Name Line Branch
mpecopt 62.4% ****
mpecopt.Options 100%
mpecopt.Solver 61.7%

stats.lambda_x_opt = full(results_nlp.lam_x);
stats.n_active_ineq = sum(abs(lambda_g_opt(ind_g_ineq))>settings.tol);
stats.n_active_box = sum(abs((lambda_x_opt))>settings.tol & lbx_bnlp_k~=ubx_bnlp_k);
stats.lambda_g_opt = full(results_nlp.lam_g(dims.map_g));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated to you changes the multipliers should should be in results to be consistent with reg_homotopy?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea I think so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is very welcome. :D

@nurkanovic
Copy link
Member

running examples/cardinality_optimization.m shows that

  • the new interface is broken - diverging iterates (maybe wrong lower bounds for comps?)
  • also the legacy interface mpec_optimizer used in all benchmarks is also broken, changes in mpceopt_phase_ii broke it.
    (as the phase ii is anyway a method in the new interface, keeping the old working as it was would be ok)

@nurkanovic
Copy link
Member

also benchmarks are broken due to breaking the mpecopt_phase_ii

Error in mpecopt_phase_ii (line 395)
solution.x = x_k(dims.map_w(1:dims.n_primal_non_lifted));

Error in mpec_optimizer (line 588)
[solution,stats] = mpecopt_phase_ii(mpec_casadi,lpec_casadi,dims,settings,solver_initalization,stats,phase_ii);

Error in mpec_benchmark_dtable_loop (line 84)
        [result,stats] = solver_functions{ii}(mpec_struct,solver_initalization,options);

obj.lpec_casadi = lpec_casadi;
end

function [solution,stats] = phase_II(obj,mpec_casadi,lpec_casadi,dims,opts,solver_initialization,stats,phase_ii)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would make sense to have also phase_I as a method to be more consistent.
can be a seperate PR/issue for requesting refactoring.

end


function X = all_combinations(varargin)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add some comments what are these specalized functons doing and what are they needed for?

@apozharski
Copy link
Member Author

The benchmarks and other bugs should now have been fixed.

@nurkanovic nurkanovic self-requested a review March 18, 2025 09:02
Copy link
Member

@nurkanovic nurkanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@nurkanovic nurkanovic merged commit c277a81 into main Mar 18, 2025
12 checks passed
@nurkanovic nurkanovic deleted the feat/block-band-structure branch March 18, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants