Loading pyehub/outputter.py +6 −2 Original line number Diff line number Diff line Loading @@ -389,6 +389,8 @@ def plot_storages(results: dict, **kwargs) -> None: pl_net_dch = kwargs.get('pl_net_dch', True) pl_decay = kwargs.get('pl_decay', True) size = kwargs.get('size', (10, 5)) if size[0] == 0 or size[1] == 0: raise ValueError("Please pass non-zero values in the 'size' tuple.") percentage = kwargs.get('percentage', False) for storage in attributes['storages']: Loading Loading @@ -473,6 +475,8 @@ def plot_energy_balance(model, results: dict, **kwargs) -> None: streams_wo_sources = [x for x in model.streams if x not in model.sources] size = kwargs.get('size', (9, 5)) if size[0] == 0 or size[1] == 0: raise ValueError("Please pass non-zero values in the 'size' tuple.") lw = kwargs.get('lw', 2) dl = kwargs.get('dl', 3) Loading pyehub/plots.py +3 −2 Original line number Diff line number Diff line Loading @@ -24,9 +24,10 @@ def main(): results = model.solve() results1=model1.solve() # print(results['solution'] == results1['solution']) plot_storages(results) # plot_storages(results,size=(0,1)) plot_energy_balance(model1, results) plot_energy_balance(model1, results,size=(0,5)) # pretty_print(results) # print(results['solution'] == results1['solution']) Loading Loading
pyehub/outputter.py +6 −2 Original line number Diff line number Diff line Loading @@ -389,6 +389,8 @@ def plot_storages(results: dict, **kwargs) -> None: pl_net_dch = kwargs.get('pl_net_dch', True) pl_decay = kwargs.get('pl_decay', True) size = kwargs.get('size', (10, 5)) if size[0] == 0 or size[1] == 0: raise ValueError("Please pass non-zero values in the 'size' tuple.") percentage = kwargs.get('percentage', False) for storage in attributes['storages']: Loading Loading @@ -473,6 +475,8 @@ def plot_energy_balance(model, results: dict, **kwargs) -> None: streams_wo_sources = [x for x in model.streams if x not in model.sources] size = kwargs.get('size', (9, 5)) if size[0] == 0 or size[1] == 0: raise ValueError("Please pass non-zero values in the 'size' tuple.") lw = kwargs.get('lw', 2) dl = kwargs.get('dl', 3) Loading
pyehub/plots.py +3 −2 Original line number Diff line number Diff line Loading @@ -24,9 +24,10 @@ def main(): results = model.solve() results1=model1.solve() # print(results['solution'] == results1['solution']) plot_storages(results) # plot_storages(results,size=(0,1)) plot_energy_balance(model1, results) plot_energy_balance(model1, results,size=(0,5)) # pretty_print(results) # print(results['solution'] == results1['solution']) Loading