-
Notifications
You must be signed in to change notification settings - Fork 136
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
Maximum uptime constraint #859
base: dev
Are you sure you want to change the base?
Conversation
@@ -373,6 +373,13 @@ def _create(self, group=None): | |||
if g[2].nonconvex.minimum_uptime is not None | |||
] | |||
) | |||
self.MAXUPTIMEFLOWS = Set( |
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.
Must be placed close to
self.MINUPTIMEFLOWS = Set( |
@@ -545,6 +552,34 @@ def _min_uptime_rule(block, i, o, t): | |||
self.MINUPTIMEFLOWS, m.TIMESTEPS, rule=_min_uptime_rule | |||
) | |||
|
|||
def _max_uptime_rule(block, i, o, t): |
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.
Here it seems it should be set similar to
def _min_downtime_constraint(self): |
It seems that here we would also need a def _max_downtime_constraint(self)
to wrap around max_uptime_rule
This PR adds a maximum uptime constraint for NonConvex flows.
The motivation is a scheduling problem for industrial processes, if you have e.g. a cyclic industrial process (block profile) with a certain time between each process and a fixed length of the process. With a
maximum_uptime
attribute and in combination with the existingminimum_downtime
and other attributes, it is possible to model this problem within oemof.solph. See the example.The API is an additional attribute at the NonConvex class:
The constraint itself is based on the rule that the sum of
maximum_uptime
+1 consecutive binary decision variables of the flow need to be smaller or equal the maximum operation timemaximum_uptime
.If there is nothing against the implementation of this constraint, I would continue to implement docstrings, tests, etc. I would a appreciate a short feedback on that.
p.s.: This constraint would allow the scheduling of block profiles. We would be also interested to schedule fixed but fluctuating profiles. Any ideas?