Closed nickrobinson251 closed 3 years ago
@daniel-thom seems that the transform isn't setting the interval correctly
In case it's helpful, the code i'm trying to update (from PSys v0.28 -> v1) looks roughly like
for load in get_components(PowerLoad, system)
- add_forecast!(
+ add_time_series!(
system,
load,
- Deterministic(
- "get_max_active_power",
- TimeArray(datetimes, values),
+ SingleTimeSeries(
+ name="max_active_power",
+ data=TimeArray(datetimes, values),
+ scaling_factor_multiplier=get_max_active_power,
)
)
where datetimes = initial_time:Hour(1):(initial_time + Hour(23))
and in the updated version we call transform_single_time_series!(sys, 24, Hour(1))
once the system is constructed
I'm trying to update some private code from PowerSystems.jl v0.28 to v1
Below is using PowerSystems v1.3.0 and InfrastructureSystems v1.3.6
I'm testing with a 3 bus system, which should have
SingleTimeSeries
for each of thePowerLoad
andThermalStandard
I convert these time-series to forecasts, with
transform_single_time_series!
, and that seems to work (no error or other output is shown)but when I then see an error upon trying to show the resulting system:
Seemingly from an
AssertionError
inget_forecast_initial_times(sys)