Skip to content

slsqp: check ptot>n, not p>n (proper fix for #592) #598

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

Merged
merged 1 commit into from
Feb 25, 2025

Conversation

kkofler
Copy link
Contributor

@kkofler kkofler commented Feb 24, 2025

src/algs/slsqp/slsqp.c (src/algs/slsqp/slsqp.c): Fix the check for more equality constraints than variables (introduced by PR #593 to fix #592) so that vector constraints (mconstraints) are correctly counted: the count to consider here is ptot (the total number of scalar equality constraints), not p (the number of equality constraints that may be vector constraints).

src/algs/slsqp/slsqp.c (src/algs/slsqp/slsqp.c): Fix the check for more
equality constraints than variables (introduced by PR stevengj#593 to fix stevengj#592)
so that vector constraints (mconstraints) are correctly counted: the
count to consider here is ptot (the total number of scalar equality
constraints), not p (the number of equality constraints that may be
vector constraints).
@jschueller jschueller merged commit f61115a into stevengj:master Feb 25, 2025
3 checks passed
@jschueller
Copy link
Collaborator

thanks

@kkofler kkofler deleted the slsqp-crash-fix-typo-fix branch March 4, 2025 01:09
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.

SLSQP crashes on bad problem dimensions (more equality constraints than variables)
2 participants