Closed NargesChinichian closed 1 year ago
Multiple outputs and one input
mvs_tool -i tests/benchmark_test_inputs/Feature_output_flows_as_list -ext csv -f
t1 = solph.Transformer(
label='diesel_generator',
inputs={Electricity (diesel): solph.Flow(max=1, min=0)},
outputs={Electricity: solph.Flow(variable_costs=0.3, max=1, nominal_value=1250, min=0), Heat: solph.Flow(variable_costs=0.5, max=1, nominal_value=1250, min=0)},
conversion_factors={Electricity: [0.3], Heat: [0.5], Electricity (diesel): [1]},
)
Multiple inputs and one output
t1 = solph.Transformer(
label='diesel_generator',
inputs={Electricity (diesel): solph.Flow(min=0, max=1), Electricity: solph.Flow(min=0, variable_costs=0.15, max=1)},
outputs={Electricity: solph.Flow(nominal_value=1250, min=0, max=1)},
conversion_factors={Electricity (diesel): [0.6], Electricity: [1]},
)
I only changed the changelog and the tests did not trigger, I will merge as the previous status was passing
fix #802, fix #799, fix #541, fix #599, fix #507
fix transformer_constant_efficiency_fix to accept multiple inputs OR multiple outputs.
Changes proposed in this pull request:
transformer_constant_efficiency_fix
andtransformer_constant_efficiency_optimize
accepts multiple in/outputs.transformer_constant_efficiency_fix
EFFICIENCY
(conversion_factors
parameter ofTransformer
object) are assigned to input flows and "INSTALLED_CAP"s (nominal_values) are assigned to output.DISPATCH_PRICE
andEFFICIENCY
are provided to output flows and input flow is left emptyDISPATCH_PRICE
,EFFICIENCY
are not provided as a list, there is an error raisedtransformer_constant_efficiency_optimize
DISPATCH_PRICE
s (variable_costs) andEFFICIENCY
(conversion_factors
parameter ofTransformer
object) are assigned to input flows andINSTALLED_CAP
(existing
parameter ofInvestment
object),MAXIMUM_ADD_CAP
(maximum
parameter ofInvestment
object) andSIMULATION_ANNUITY
(ep_costs
parameter ofInvestment
object) are assigned to output.DISPATCH_PRICE
andEFFICIENCY
are provided to output flows and input flow is left emptyDISPATCH_PRICE
,EFFICIENCY
are not provided as a list, there is an error raisedThe following steps were realized, as well (if applies):
black . --exclude docs/
)EXECUTE_TESTS_ON=master pytest
)For more information on how to contribute check the CONTRIBUTING.md.