Hello,
i would like to optimize the capacity and the input/output ratio of a storage.
I want to create a loop in which the storage change its input_ratio.
How can i reconfigure a storage after the initialization?
bat=solph.components.GenericStorage(label='Batterie',
inputs={bel: solph.Flow()},
outputs={bel: solph.Flow()},
nominal_input_capacity_ratio=0.2,
nominal_output_capacity_ratio=0.2,
capacity_loss=0.001,
inflow_conversion_factor=0.95,
outflow_conversion_factor=0.95,
investment=solph.Investment(ep_costs=epc))
energysystem.add(bat)
for x in range(0, 3):
bat=energysystem.flows(inputs={bel: solph.Flow()}, ##### HOW TO CHANGE?
outputs={bel: solph.Flow()},
nominal_input_capacity_ratio=0.2*x,
nominal_output_capacity_ratio=0.2*x,
capacity_loss=0.001,
inflow_conversion_factor=0.95,
outflow_conversion_factor=0.95,
investment=solph.Investment(ep_costs=epc))
# initialise the operational model (create problem)
om = solph.Model(energysystem)
om.solve(solver='cbc', solve_kwargs={'tee': True})
my_results = processing.results(om)
batcap[x]= outputlib.views.node(my_results, 'None')['scalars'][0]