You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easiest way would be to fully implement the calculation using the time series data in sys.
Best to test results using two different approaches.
Refers to this test:
@testset"MULTI-PERIOD power flows evaluation: NR"for ACSolver in
(
NLSolveACPowerFlow,
KLUACPowerFlow,
PowerFlows.LUACPowerFlow,
)
# get system
sys = PSB.build_system(PSB.PSITestSystems, "c_sys14"; add_forecasts =false)
# create structure for multi-period case
pf =ACPowerFlow(ACSolver)
time_steps =24
data =PowerFlowData(pf, sys; time_steps = time_steps)
# allocate timeseries data from csvprepare_ts_data!(data, time_steps)
# get power flows with NR KLU method and write resultssolve_powerflow!(data; pf = pf)
# check results# for t in 1:length(data.timestep_map)# res_t = solve_powerflow(pf, sys, t) # does not work - ts data not set in sys# flow_ft = res_t["flow_results"].P_from_to# flow_tf = res_t["flow_results"].P_to_from# ts_flow_ft = results[data.timestep_map[t]]["flow_results"].P_from_to# ts_flow_tf = results[data.timestep_map[t]]["flow_results"].P_to_from# @test isapprox(ts_flow_ft, flow_ft, atol = 1e-9)# @test isapprox(ts_flow_tf, flow_tf, atol = 1e-9)# endend
The text was updated successfully, but these errors were encountered:
The easiest way would be to fully implement the calculation using the time series data in sys.
Best to test results using two different approaches.
Refers to this test:
The text was updated successfully, but these errors were encountered: