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

some sum optimisations #97

Open
tias opened this issue Jan 21, 2022 · 3 comments
Open

some sum optimisations #97

tias opened this issue Jan 21, 2022 · 3 comments

Comments

@tias
Copy link
Collaborator

tias commented Jan 21, 2022

to implement, e.g.
e = sum(x[:2]) == sum(x[2:])
flatten_constraint(e)

@tias
Copy link
Collaborator Author

tias commented Jan 21, 2022

in a new 'simplify' transformation?

@IgnaceBleukx
Copy link
Collaborator

IgnaceBleukx commented Jan 24, 2022

Another possible optimization:
Current situation:

e = wsum([3,5], [x,y])
1 + e = sum(1, e)

Improvement:
1 + e = wsum([1,3,5],[1,x,y])

Hmm, although const + 3 * x + 5 * y is the standard form of a LinExpr...
Not sure we should convert it then...

@Wout4
Copy link
Collaborator

Wout4 commented Jun 30, 2023

@tias what should this get simplified to?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants