Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides a first proof of concept for the potentially new component bypassing functionality discussed in #600.
Definition
To summarise, a bypassed
Component
has no affect on the properties of the inlet and outlet streams - effectively the inlet and outlet streams are directly connected to one another.Implementation
Component
property calledstatus
- this would eventually be added to every component. For the time being the default status is "active" and can be set to "bypassed" if a component is to be bypassed.Component
method calledget_bypass_constraints
- this mirrorsget_mandatory_constraints
method and will eventually have to be implemented specifically for each componentComponent
preprocess
method was adjusted to only add parameter functions if the component is active, otherwise only the bypass constraints are considered.Example
In the following example bypassing the
SimpleHeatExchanger
ignores the parameters set (i.e. defining the duty and pressure ratio)Issues
Component
level, but instead for the incomming/outgoingConnections
...Component
from the network, although with on-going refactoring in mind this may lose significance.