diff --git a/runme.py b/runme.py index c72e66f9..a90700ae 100644 --- a/runme.py +++ b/runme.py @@ -115,11 +115,6 @@ def run_scenario(input_file, timesteps, scenario, result_dir, plot_periods={}): os.path.join(result_dir, '{}.xlsx').format(sce), prob.com_demand, prob.sit) - # store optimisation problem for later re-analysis - urbs.save( - prob, - os.path.join(result_dir, '{}.pgz').format(sce)) - urbs.result_figures( prob, os.path.join(result_dir, '{}'.format(sce)), diff --git a/urbs.py b/urbs.py index 18183e9a..8b39e3d8 100644 --- a/urbs.py +++ b/urbs.py @@ -1525,10 +1525,6 @@ def get_entity(instance, name): # convert to Series results = results[name] - - # if Series has MultiIndex, sort it to avoid PerformanceWarnings - if isinstance(results.index, pd.core.index.MultiIndex): - results = results.sortlevel() return results @@ -1781,8 +1777,10 @@ def get_timeseries(instance, com, sit, timesteps=None): dsmup = get_entity(instance, 'dsm_up') dsmdo = get_entity(instance, 'dsm_down') - dsmup = dsmup.xs(sit, level = 'sit').xs(com, level = 'com') - dsmdo = dsmdo.xs(sit, level = 'sit').xs(com, level = 'com') + dsmup = dsmup.xs(sit, level = 'sit') + dsmup = dsmup.xs(com, level = 'com') + dsmdo = dsmdo.xs(sit, level = 'sit') + dsmdo = dsmdo.xs(com, level = 'com') # series by summing the first time step set dsmdo = dsmdo.unstack().sum(axis=0)