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

Integration of Funnel Method in Uno main branch #13

Merged
merged 49 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
a6ecead
Unified the funnel in UNO
david0oo Apr 17, 2024
c0936cb
Merge remote-tracking branch 'origin/main' into funnel_method
david0oo Apr 17, 2024
25bec8b
Added column for funnel in output
david0oo Apr 17, 2024
abafaa9
Close to finalizing the method
david0oo Apr 18, 2024
1000e7c
Merge remote-tracking branch 'charlie_uno/main' into funnel_method
david0oo Apr 18, 2024
cb6aeec
Implemented the funnel method newly and performance looks good
david0oo Apr 18, 2024
fc9cf4b
Changed order in reduction of feasibility restoration
david0oo Apr 18, 2024
f61f6d6
Resolved merge conflicts. But funnel method still needs to be adjusted
david0oo May 8, 2024
4642eb1
Refactored funnel according to latest UNO changes, but probably perfo…
david0oo May 8, 2024
0b55b7f
Merge branch 'main' into funnel_method
david0oo May 13, 2024
9a873ef
Merge branch 'main' into funnel_method
david0oo Jun 1, 2024
903e5ff
Merged latest UNO changes, but funnel not running atm
david0oo Jun 3, 2024
4808c60
Merge branch 'main' into funnel_method
david0oo Jun 3, 2024
81bf77f
Changed Funnel for latest changes
david0oo Jun 3, 2024
06f1a76
Cleaned Up funnel functions
david0oo Jun 3, 2024
ad8ec83
Improved funnel such that it compiles
david0oo Jun 3, 2024
96ff682
Removed some options
david0oo Jun 3, 2024
d2cdc44
Merge branch 'main' into funnel_method
david0oo Jun 3, 2024
643e970
Changed solver for convergence
david0oo Jun 3, 2024
0f9cdfd
Removed current broadcast function
david0oo Jun 3, 2024
ba7a1cf
Funnel is finally back at its good performance
david0oo Jun 3, 2024
93c93b8
Merge remote-tracking branch 'origin/main' into funnel_method
david0oo Jul 2, 2024
b4da817
Removed option funnel_gamma since it is not used
david0oo Jul 9, 2024
2c2688e
Merge branch 'main' into funnel_method
david0oo Jul 9, 2024
a5604bc
Merge branch 'main' into funnel_method
david0oo Aug 12, 2024
c589fb8
Renamed options for initialization of funnel
david0oo Aug 12, 2024
85d2772
Removed get_funnel_width to avoid redundancy
david0oo Aug 12, 2024
175f204
Funnel file compiles so far
david0oo Aug 12, 2024
b207a92
Changed options
david0oo Aug 12, 2024
6b35108
Funnel should be again in same format as filter globalization strategy
david0oo Aug 12, 2024
7f707dc
Added functions for acceptability check wrt current iterate, but not …
david0oo Aug 13, 2024
9e9ac65
Added if statement for check of current iterate
david0oo Aug 13, 2024
e9165db
Renamed scenario in funnel
david0oo Aug 14, 2024
65657e1
Funnel update seems to be working well now
david0oo Aug 14, 2024
f431805
Added some different funnel update strategies
david0oo Aug 22, 2024
30c516c
Latest state of Uno funnel for paper submission
david0oo Sep 12, 2024
7795762
Resolved merge conflicts
david0oo Sep 12, 2024
6475c79
Added namespace, files are compiling now
david0oo Sep 12, 2024
7cd32eb
Update 2 print was removed
david0oo Sep 12, 2024
ec70bd6
Removed a std::cout
david0oo Sep 12, 2024
1163499
Moved funnel width to DEBUG
david0oo Sep 12, 2024
18e7ab4
Changed code such that it is coherent with paper
david0oo Sep 12, 2024
37f3f89
Changed parameters such that they coincide with names in funnel paper
david0oo Sep 12, 2024
b0c102a
Changed copyright notice
david0oo Sep 12, 2024
1c4a6bc
GlobalizationStrategyFactory: fixed indentation, and names in availab…
cvanaret Sep 12, 2024
b76fd75
FunnelMethod: fixed indentation and fixed closing bracket in namespace
cvanaret Sep 12, 2024
e083701
FunnelMethod: fixed indentation and simplified some functions
cvanaret Sep 12, 2024
56cd4bb
FunnelMethod: renamed first argument of is_infeasibility_sufficiently…
cvanaret Sep 12, 2024
4e040b5
Simplifed FunnelMethod (current infeasibility upon switching to resto…
cvanaret Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added if statement for check of current iterate
  • Loading branch information
david0oo committed Aug 13, 2024
commit 9e9ac65b39ec3145ade8a5ad4cc904e722b540a8
66 changes: 39 additions & 27 deletions uno/ingredients/globalization_strategy/FunnelMethod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ FunnelMethod::FunnelMethod(const Options& options) :
options.get_double("funnel_kappa_infeasibility_2"),
options.get_double("funnel_beta"),
options.get_double("funnel_gamma")
})
}),
check_for_current_iterate(options.get_bool("funnel_check_current_point"))
{}

void FunnelMethod::initialize(Statistics& statistics, const Iterate& initial_iterate, const Options& options)
Expand Down Expand Up @@ -181,38 +182,49 @@ bool FunnelMethod::is_regular_iterate_acceptable(Statistics& statistics, const P
DEBUG << "Trial: (infeasibility, objective + auxiliary) = (" << trial_progress.infeasibility << ", " << trial_merit << ")\n";
DEBUG << "Unconstrained predicted reduction = " << merit_predicted_reduction << '\n';

// f-type step
if (this->switching_condition(merit_predicted_reduction, current_progress.infeasibility, this->parameters.delta))
// IF check_for_current_iterate == false, then condition always fulfilled, we never check
// If true, then first part is false, and we always check fur current iterate
if (!this->check_for_current_iterate || this->acceptable_wrt_current_iterate(current_progress.infeasibility, current_merit, trial_progress.infeasibility, trial_merit))
{
DEBUG << "\t\tTrial iterate satisfies switching condition ....\n";
// unconstrained Armijo sufficient decrease condition (predicted reduction should be positive)
const double objective_actual_reduction = this->compute_actual_objective_reduction(current_merit, current_progress.infeasibility,
trial_merit);
DEBUG << "Unconstrained actual reduction = " << objective_actual_reduction << '\n';
if (this->armijo_sufficient_decrease(merit_predicted_reduction, objective_actual_reduction))

// f-type step
if (this->switching_condition(merit_predicted_reduction, current_progress.infeasibility, this->parameters.delta))
{
DEBUG << "\t\tTrial iterate (f-type) was ACCEPTED by satisfying Armijo condition\n";
accept = true;
DEBUG << "\t\tTrial iterate satisfies switching condition ....\n";
// unconstrained Armijo sufficient decrease condition (predicted reduction should be positive)
const double objective_actual_reduction = this->compute_actual_objective_reduction(current_merit, current_progress.infeasibility,
trial_merit);
DEBUG << "Unconstrained actual reduction = " << objective_actual_reduction << '\n';
if (this->armijo_sufficient_decrease(merit_predicted_reduction, objective_actual_reduction))
{
DEBUG << "\t\tTrial iterate (f-type) was ACCEPTED by satisfying Armijo condition\n";
accept = true;
}
else
{ // switching condition holds, but not Armijo condition
DEBUG << "\t\tTrial iterate (f-type) was REJECTED by violating the Armijo condition\n";
}
scenario = "f-type Armijo";
}
else
{ // switching condition holds, but not Armijo condition
DEBUG << "\t\tTrial iterate (f-type) was REJECTED by violating the Armijo condition\n";
// h-type step
else if(this->is_funnel_sufficient_decrease_satisfied(trial_progress.infeasibility))
{
DEBUG << "\t\tTrial iterate (h-type) ACCEPTED by violating the switching condition ...\n";
accept = true; // accept the step and reduce the tr-radius
DEBUG << "\t\tEntering funnel reduction mechanism\n";
this->update_funnel_width(current_progress.infeasibility, trial_progress.infeasibility);
statistics.set("funnel width", this->funnel_width);
scenario = "h-type";
}
else
{
DEBUG << "\t\tTrial iterate REJECTED by violating switching and funnel sufficient decrease condition\n";
scenario = "current point";
}
scenario = "f-type Armijo";
}
// h-type step
else if(this->is_funnel_sufficient_decrease_satisfied(trial_progress.infeasibility))
{
DEBUG << "\t\tTrial iterate (h-type) ACCEPTED by violating the switching condition ...\n";
accept = true; // accept the step and reduce the tr-radius
DEBUG << "\t\tEntering funnel reduction mechanism\n";
this->update_funnel_width(current_progress.infeasibility, trial_progress.infeasibility);
statistics.set("funnel width", this->funnel_width);
scenario = "h-type";
}
else
else
{
DEBUG << "\t\tTrial iterate REJECTED by violating switching and funnel sufficient decrease condition\n";
DEBUG << "Trial iterate not acceptable with respect to current point\n";
scenario = "current point";
}
}
Expand Down
1 change: 1 addition & 0 deletions uno/ingredients/globalization_strategy/FunnelMethod.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class FunnelMethod : public GlobalizationStrategy {
const FunnelMethodParameters parameters; /*!< Set of constants */
bool in_restoration_phase;
bool first_iteration_in_solver_phase; // determines if first iteration of solver phase is used
bool check_for_current_iterate;

[[nodiscard]] bool is_feasibility_iterate_acceptable(Statistics& statistics, const ProgressMeasures& current_progress,
const ProgressMeasures& trial_progress, const ProgressMeasures& predicted_reduction);
Expand Down