-
Notifications
You must be signed in to change notification settings - Fork 67
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
Jd/move structs to is #1068
Jd/move structs to is #1068
Conversation
* add place holders * add requires_reconciliation trait * afc/created test for ic * afc/added functions on PSI for ic reconciliation * afc/fixed rounding, tested Still getting the same error as before on T=7 * add place holders * add requires_reconciliation trait * afc/created test for ic * afc/added functions on PSI for ic reconciliation * afc/fixed rounding, tested Still getting the same error as before on T=7 * add place holders * add requires_reconciliation trait * afc/created test for ic * afc/added functions on PSI for ic reconciliation * afc/fixed rounding, tested Still getting the same error as before on T=7 * add place holders * afc/created test for ic * afc/added functions on PSI for ic reconciliation * afc/fixed rounding, tested Still getting the same error as before on T=7 * formatter --------- Co-authored-by: alefcastelli <alef.castelli@gmail.com>
Co-authored-by: lpstreitmatter <61252469+lpstreitmatter@users.noreply.github.com>
…PowerSimulations.jl into jd/move_structs_to_is
…PowerSimulations.jl into jd/move_structs_to_is
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.
Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit
src/core/definitions.jl
Outdated
@@ -123,21 +118,7 @@ function get_enum_value(enum, value::String) | |||
return ENUM_MAPPINGS[enum][val] | |||
end | |||
|
|||
Base.convert(::Type{BuildStatus}, val::String) = get_enum_value(BuildStatus, val) | |||
Base.convert(::Type{SimulationBuildStatus}, val::String) = get_enum_value(SimulationBuildStatus, val) |
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.
[JuliaFormatter] reported by reviewdog 🐶
Base.convert(::Type{SimulationBuildStatus}, val::String) = get_enum_value(SimulationBuildStatus, val) | |
Base.convert(::Type{SimulationBuildStatus}, val::String) = | |
get_enum_value(SimulationBuildStatus, val) |
src/simulation/simulation.jl
Outdated
error("Simulation status is invalid, you need to rebuild the simulation") | ||
sim_status = get_simulation_build_status(sim) | ||
if (sim_status != SimulationBuildStatus.BUILT) || (sim_status != RunStatus.READY) | ||
error("Simulation status $sim_status is invalid, you need to rebuild the simulation") |
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.
[JuliaFormatter] reported by reviewdog 🐶
error("Simulation status $sim_status is invalid, you need to rebuild the simulation") | |
error( | |
"Simulation status $sim_status is invalid, you need to rebuild the simulation", | |
) |
@@ -27,7 +27,7 @@ end | |||
limits = PSY.get_flow_limits(PSY.get_component(MonitoredLine, system, "1")) | |||
template = get_thermal_dispatch_template_network(ACPPowerModel) | |||
model_m = DecisionModel(template, system; optimizer = ipopt_optimizer) | |||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
set_device_model!(template, DeviceModel(TwoTerminalHVDCLine, HVDCTwoTerminalLossless)) | ||
model_m = DecisionModel(template, system; optimizer = HiGHS_optimizer) | ||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | ||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
@@ -559,7 +571,7 @@ end | |||
) | |||
set_device_model!(template, DeviceModel(PhaseShiftingTransformer, PhaseAngleControl)) | |||
model_m = DecisionModel(template, system; optimizer = HiGHS_optimizer) | |||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model_m; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
test/test_services_constructor.jl
Outdated
@@ -57,15 +57,15 @@ end | |||
|
|||
c_sys5_uc = PSB.build_system(PSITestSystems, "c_sys5_uc"; add_reserves = true) | |||
model = DecisionModel(template, c_sys5_uc) | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
test/test_services_constructor.jl
Outdated
@@ -95,7 +95,7 @@ end | |||
c_sys5_uc = PSB.build_system(PSITestSystems, "c_sys5_uc"; add_reserves = true) | |||
|
|||
model = DecisionModel(template, c_sys5_uc; optimizer = cbc_optimizer) | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
test/test_services_constructor.jl
Outdated
@@ -112,7 +112,7 @@ end | |||
|
|||
c_sys5_uc = PSB.build_system(PSITestSystems, "c_sys5_uc_non_spin"; add_reserves = true) | |||
model = DecisionModel(template, c_sys5_uc; optimizer = HiGHS_optimizer) | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
test/test_services_constructor.jl
Outdated
@@ -131,7 +131,7 @@ end | |||
|
|||
c_sys5_re = PSB.build_system(PSITestSystems, "c_sys5_re"; add_reserves = true) | |||
model = DecisionModel(template, c_sys5_re) | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
test/test_services_constructor.jl
Outdated
@@ -154,7 +154,7 @@ end | |||
|
|||
c_sys5_hyd = PSB.build_system(PSITestSystems, "c_sys5_hyd"; add_reserves = true) | |||
model = DecisionModel(template, c_sys5_hyd) | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.BuildStatus.BUILT | |||
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT |
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.
[JuliaFormatter] reported by reviewdog 🐶
@test build!(model; output_dir = mktempdir(; cleanup = true)) == PSI.ModelBuildStatus.BUILT | |
@test build!(model; output_dir = mktempdir(; cleanup = true)) == | |
PSI.ModelBuildStatus.BUILT |
Companion PR to NREL-Sienna/InfrastructureSystems.jl#335