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

Transform linear constraints for variables with nonlinear normalization to nonlinear constraints #107

Open
schmoelder opened this issue Mar 14, 2024 · 1 comment

Comments

@schmoelder
Copy link
Contributor

schmoelder commented Mar 14, 2024

When adding optimization variables with non-linear normalization transforms, linear constraints become nonlinear since the optimizer only "sees" the transformed variables.

E.g.

optimization_problem.add_variable('var_0', lb=0, ub=1, transform='linear')
optimization_problem.add_variable('var_1', lb=0, ub=1000, transform='log')

optimization_problem.add_linear_constraint(['var_0', 'var_1'], [1, -1], 0)

Currently, this raises an error for most optimizers (i.e. those that explicitly use the form A * x <= b).
Some optimizers such as pymoo can still handle this since the just explicitly call evaluate_linear_constraints(x_transformed, untransform=True).

To solve this more generally, we could consider transforming the linear constraint to a nonlinear constraint.

@schmoelder
Copy link
Contributor Author

We have a similar situation for variables with variable dependencies that might be part of linear constraints. This also currently raises an error. (Maybe a separate issue?)

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

1 participant