Transformer investment mode while considering for existing capacity

oemof

#1

Dear oemof experts,

I’m using oemof to create a combined dispatch & investment model. Right at the beginning of the model writing I stumbled upon an odd error message. My transformer modeling looks like

solph.Transformer(
                    label='sample_transformer',
                    inputs={<fuel_bus>: solph.Flow()},
                    outputs={<electricity_bus>: solph.Flow(
                        nominal_value=42,
                        variable_cost=3,
                        investment=solph.Investment(
                            ep_costs=23
                        ))},
                    conversion_factors={<electricity_bus>: 0.5})

which returns me a "Using the investment object the nominal_value has to be set to None.".

Now, I find myself asking: how should I model it with oemof? Is it really necessary to include two transformers of the same type? one representing the existing capacity and the other for new investments into this technology…
Or did I simply overlooked something?


#2

Actually you are right, this is not possible atm. You could set the ‘minimum’ attribute of the Investment object, but the investment costs will occur for this capacity, resulting in something different that you want.

I think this is something we could add easily (and I wonder why it’s not possible yet). Can you create an issue in the repository?


#3

Have a look at the Pullrequest of @simnh.

The feature will be part of the v0.2.2 release scheduled for 15 June 2018. If you need it earlier you have to checkout the developer branch.


#4

Guys, you’re fast! Thanks simnh for immediately starting to include this! I won’t write an additional issue as you already started resolving it. Let’s dicuss further in the PR.


#5

EDIT - SEEMS TO BE WORKING
Note to myself, don’t mix up different oemof commits…


#6

You have reasonable doubts :slight_smile: I think it is more a bug report than a user question and we should discuss it on github. Furthermore, this is related to the developing version an no official version.

We have to find out whether it is a bug or something else. To get close to the problem you could check the LP file (3 time steps). It also helps to create a very reduced example in which the results can be anticipated. As it is a beta version we need the commit you use.