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

Switch quadratic interaction in diet example to ints #228

Open
JoelPasvolsky opened this issue Sep 20, 2022 · 0 comments
Open

Switch quadratic interaction in diet example to ints #228

JoelPasvolsky opened this issue Sep 20, 2022 · 0 comments

Comments

@JoelPasvolsky
Copy link
Collaborator

JoelPasvolsky commented Sep 20, 2022

Description
Diet Example has this code:

>>> quantities[0] * quantities[1]          
QuadraticModel({'rice': 0.0, 'tofu': 0.0}, {('tofu', 'rice'): 1.0}, 0.0,
           {'rice': 'REAL', 'tofu': 'REAL'}, dtype='float64')

It should be switched to

>>> quantities[2] * quantities[5]
Out[7]: QuadraticModel({'banana': 0.0, 'avocado': 0.0}, {('avocado', 'banana'): 1.0}, 0.0, {'banana': 'INTEGER', 'avocado': 'INTEGER'}, dtype='float64')   

To Reproduce
See above

Expected behavior
Need int vars, not real

Environment:

  • OS: Any
  • Python version: Any

Additional context
CC @tmittal7

And remove the # doctest: +SKIP that kept us from catching this earlier.

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