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

Removed the initialize argument #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

AlbertLee125
Copy link
Member

The bigM has the initialize argument
resulting me to initialize a Suffix with an integer value, which is not iterable.
I tried to resolve the issue BigM: TypeError: 'int' object is not iterable #31 by removing the initialize parameter.

#31

@ZedongPeng
Copy link
Member

Removing the initial value for bigM might not be a good option. Can we try something else? @AlbertLee125

@AlbertLee125
Copy link
Member Author

m.bigM = Suffix(direction=Suffix.LOCAL, initialize=7000)

The initial parameter for a Suffix object in Pyomo expects a dictionary or a callable (such as a function) that maps components to values. It does not accept a single integer value.
It would be better to remove or modify the benchmark.py.

TransformationFactory('gdp.bigm').apply_to(m, bigM=7000)

@bernalde
Copy link
Member

Please check how the BigM parameter is initialized in the examples from the Pyomo repo and implement it that way.
Also, make sure that the tests pass before requesting for review

@ZedongPeng
Copy link
Member

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.

None yet

3 participants