-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor: calculate timesteps separately #284
Conversation
2567733
to
dcfcb34
Compare
|
||
ComponentID = str | ||
|
||
|
||
@dataclass | ||
class PriorityOptimizerResult(Generic[TResult]): | ||
priorities_used: TimeSeriesString | ||
priority_used: PriorityID |
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.
<3
|
||
def __lt__(self, other: Pressure) -> bool: | ||
if self.unit != other.unit: | ||
raise ValueError("Unit mismatch") |
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 should use domain specific exceptions, but they can perhaps extend ValueError in order to easily catch higher up?
self._operational_settings: Optional[CompressorOperationalSettings] = None | ||
|
||
def get_max_rate(self, inlet_stream: StreamConditions, target_pressure: TimeSeriesFloat) -> List[float]: | ||
def get_max_rate(self, inlet_stream: StreamConditions, target_pressure: Pressure) -> float: |
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.
Remove "For each timestep" in docstring.
dcfcb34
to
f9008a7
Compare
Process one timestep at a time in v2
f9008a7
to
53e3c12
Compare
Process one timestep at a time in v2
Process one timestep at a time in v2