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

Cleaner regularization code #60

Merged
merged 9 commits into from
Oct 13, 2023
Merged

Cleaner regularization code #60

merged 9 commits into from
Oct 13, 2023

Conversation

apozharski
Copy link
Collaborator

Fixes a bug in Lin-Fukushima, and makes explicit the bounds relaxations for regularizations that don't have strict lower bounds.

Also fixes some typos.

else
psi_mpcc = alpha*(a+b-sqrt(a^2+b^2+sigma^2))+(1-alpha)*(a*b-sigma);
end
case CFunctionType.STEFFENSON_ULBRICH
Copy link
Owner

Choose a reason for hiding this comment

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

It is "Steffensen"

z = x/normalized_sigma;
y_sin = normalized_sigma*((2/pi)*sin(z*pi/2+3*pi/2)+1);
psi_mpcc = a+b-if_else(abs(x)>=normalized_sigma,abs(x),y_sin);
case CFunctionType.STEFFENSON_ULBRICH_POLY
Copy link
Owner

Choose a reason for hiding this comment

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

Steffensen

Copy link
Owner

@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, just fix the typos 👍

@nurkanovic nurkanovic merged commit c4651d9 into main Oct 13, 2023
1 check passed
@nurkanovic nurkanovic deleted the cleaner-relaxations branch October 13, 2023 09:50
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.

2 participants