-
Notifications
You must be signed in to change notification settings - Fork 0
Redistribute operation models #104
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
Open
acostarelli
wants to merge
5
commits into
main
Choose a base branch
from
ac/move_op
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+225
−917
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6da7392
Introduce AbstractOptimizationProblem; remove power-flavoured taxonomy
58e5901
Remove power-flavoured inner constructor from EmulationModel
a2a0135
Rename OperationModel to AbstractOptimizationModel
8f4a79b
Move DecisionModel/EmulationModel generic constructors back to IOM
efd19e8
formatting; rename operation -> optimization
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,75 +1,19 @@ | ||
| """ | ||
| Abstract type for Decision Model and Emulation Model. OperationModel structs are parameterized with DecisionProblem or Emulation Problem structs | ||
| """ | ||
| abstract type OperationModel end | ||
|
|
||
| #TODO: Document the required interfaces for custom types | ||
| """ | ||
| Abstract type for Decision Problems | ||
| Abstract type for any optimization problem. Concrete subtypes are provided by | ||
| downstream domain libraries (e.g. PowerOperationsModels). `DecisionModel{M}` and | ||
| `EmulationModel{M}` are parameterized over this type so any optimization problem | ||
| can be wrapped without IOM knowing its domain. | ||
|
|
||
| # Example | ||
|
|
||
| import InfrastructureOptimizationModels | ||
| const POM = InfrastructureOptimizationModels | ||
| struct MyCustomProblem <: POM.DecisionProblem | ||
| const IOM = InfrastructureOptimizationModels | ||
| struct MyCustomProblem <: IOM.AbstractOptimizationProblem end | ||
| """ | ||
| abstract type DecisionProblem end | ||
| abstract type AbstractOptimizationProblem end | ||
|
|
||
| """ | ||
| Abstract type for Emulation Problems | ||
|
|
||
| # Example | ||
|
|
||
| import InfrastructureOptimizationModels | ||
| const POM = InfrastructureOptimizationModels | ||
| struct MyCustomEmulator <: POM.EmulationProblem | ||
| Abstract supertype for `DecisionModel` and `EmulationModel`. Concrete subtypes | ||
| are parameterized with an `AbstractOptimizationProblem` subtype. | ||
| """ | ||
| abstract type EmulationProblem end | ||
|
|
||
| ################################################################################# | ||
| # Simulation Models Container | ||
| # Holds references to models in a simulation | ||
| # Used for display/printing purposes | ||
| struct SimulationModels | ||
| decision_models::Vector{<:OperationModel} | ||
| emulation_model::Union{Nothing, OperationModel} | ||
| end | ||
|
|
||
| function SimulationModels(; | ||
| decision_models, | ||
| emulation_model::Union{Nothing, OperationModel} = nothing, | ||
| ) | ||
| return SimulationModels(decision_models, emulation_model) | ||
| end | ||
|
|
||
| ################################################################################# | ||
| # Simulation Sequence | ||
| # Holds the execution sequence information for a simulation | ||
| # This is a placeholder struct - concrete implementation in PowerSimulations | ||
| struct SimulationSequence | ||
| executions_by_model::Dict | ||
| horizons::Dict | ||
| intervals::Dict | ||
| SimulationSequence() = new(Dict(), Dict(), Dict()) | ||
| end | ||
|
|
||
| # Placeholder accessor function for simulation sequence | ||
| get_step_resolution(::SimulationSequence) = Dates.Hour(1) | ||
|
|
||
| ################################################################################# | ||
| # Simulation Type | ||
| # Abstract type for simulation objects | ||
| # Concrete implementation should be in PowerSimulations | ||
| abstract type Simulation end | ||
|
|
||
| ################################################################################# | ||
| # Simulation Outputs Type | ||
| # Abstract type for simulation outputs | ||
| # Concrete implementation should be in PowerSimulations | ||
| abstract type SimulationOutputs end | ||
|
|
||
| ################################################################################# | ||
| # Simulation Problem Outputs Type | ||
| # Abstract type for individual problem outputs within a simulation | ||
| # Concrete implementation should be in PowerSimulations | ||
| abstract type SimulationProblemOutputs end | ||
| abstract type AbstractOptimizationModel end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
@jd-lara What do you think about keeping the constructors here?