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

Upper bound and Lower Bound #16

Open
easydisco opened this issue Oct 17, 2019 · 1 comment
Open

Upper bound and Lower Bound #16

easydisco opened this issue Oct 17, 2019 · 1 comment

Comments

@easydisco
Copy link

How can i optimize something with upper and lower bound using this code?

@WPMGPRoSToTeMa
Copy link

WPMGPRoSToTeMa commented Apr 18, 2020

Given:
ai <= xi <= bi
Split it in two inequations:

ai <= xi
xi <= bi

Swap left and right sides and change <= to >=:

xi >= ai
bi >= xi

Move ai to the left side in the first inequality and xi to the left side in the second equality:

 xi - ai >= 0
-xi + bi >= 0

You can find how to specify the last two inequations as constraints in QuadProg++.hh and main.cc.

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

No branches or pull requests

2 participants