-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
Removing the initial value for bigM might not be a good option. Can we try something else? @AlbertLee125 |
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.
|
Please check how the BigM parameter is initialized in the examples from the Pyomo repo and implement it that way. |
The example to set values for BigM is here. |
gdplib/biofuel/model.py
Outdated
@@ -52,7 +52,7 @@ def build_model(): | |||
[2] Chen, Q., & Grossmann, I. E. (2019). Effective generalized disjunctive programming models for modular process synthesis. Industrial & Engineering Chemistry Research, 58(15), 5873-5886. https://doi.org/10.1021/acs.iecr.8b04600 | |||
""" | |||
m = ConcreteModel('Biofuel processing network') | |||
m.bigM = Suffix(direction=Suffix.LOCAL, initialize=7000) | |||
m.bigM = Suffix(direction=Suffix.LOCAL)#, initialize=7000) # Removed the initialize argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to provide the same initial guess for the Big-M parameter here
Testing the model by running it. The error has been resolved. |
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