Commit 10e3b875 authored by Topi Rasku's avatar Topi Rasku
Browse files

Fix the "3b_inputsLoop.gms" to work with multiple read timeseries.

parent 8265d914
......@@ -23,20 +23,41 @@ put log 'ord tSolve: ';
put log ord(tSolve) /;
putclose log;
loop(mTimeseries_loop_read(mSolve, timeseries)${ord(tSolve) >= tForecastNext(mSolve)},
put_utility 'gdxin' / 'input\' timeseries.tl:0 '\' tSolve.tl:0 '.gdx';
if (mTimeseries_loop_read(mSolve, 'ts_unit'), execute_load ts_unit);
if (mTimeseries_loop_read(mSolve, 'ts_effUnit'), execute_load ts_effUnit);
if (mTimeseries_loop_read(mSolve, 'ts_effGroupUnit'), execute_load ts_effGroupUnit);
if (mTimeseries_loop_read(mSolve, 'ts_influx'), execute_load ts_influx);
if (mTimeseries_loop_read(mSolve, 'ts_cf'), execute_load ts_cf);
if (mTimeseries_loop_read(mSolve, 'ts_reserveDemand'), execute_load ts_reserveDemand);
if (mTimeseries_loop_read(mSolve, 'ts_node'), execute_load ts_node);
if (mTimeseries_loop_read(mSolve, 'ts_fuelPriceChange'), execute_load ts_fuelPriceChange);
if (mTimeseries_loop_read(mSolve, 'ts_unavailability'), execute_load ts_unavailability);
);
if (ord(tSolve) >= tForecastNext(mSolve),
// Read data defined to be updated
if (mTimeseries_loop_read(mSolve, 'ts_effUnit'),
put_utility 'gdxin' / 'input\ts_effUnit\' tSolve.tl:0 '.gdx';
execute_load ts_effUnit
);
if (mTimeseries_loop_read(mSolve, 'ts_effGroupUnit'),
put_utility 'gdxin' / 'input\ts_effGroupUnit\' tSolve.tl:0 '.gdx';
execute_load ts_effGroupUnit
);
if (mTimeseries_loop_read(mSolve, 'ts_influx'),
put_utility 'gdxin' / 'input\ts_influx\' tSolve.tl:0 '.gdx';
execute_load ts_influx
);
if (mTimeseries_loop_read(mSolve, 'ts_cf'),
put_utility 'gdxin' / 'input\ts_cf\' tSolve.tl:0 '.gdx';
execute_load ts_cf
);
if (mTimeseries_loop_read(mSolve, 'ts_reserveDemand'),
put_utility 'gdxin' / 'input\ts_reserveDemand\' tSolve.tl:0 '.gdx';
execute_load ts_reserveDemand
);
if (mTimeseries_loop_read(mSolve, 'ts_node'),
put_utility 'gdxin' / 'input\ts_node\' tSolve.tl:0 '.gdx';
execute_load ts_node
);
if (mTimeseries_loop_read(mSolve, 'ts_fuelPriceChange'),
put_utility 'gdxin' / 'input\ts_fuelPriceChange\' tSolve.tl:0 '.gdx';
execute_load ts_fuelPriceChange
);
if (mTimeseries_loop_read(mSolve, 'ts_unavailability'),
put_utility 'gdxin' / 'input\ts_unavailability\' tSolve.tl:0 '.gdx';
execute_load ts_unavailability
);
// Update the next forecast
tForecastNext(mSolve)
= tForecastNext(mSolve) + mSettings(mSolve, 't_forecastJump');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment