quintel / etsource

Data source for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
12 stars 8 forks source link

Discussion: Flex_max solution needed for more complex situations #77

Closed AlexanderWirtz closed 12 years ago

AlexanderWirtz commented 12 years ago

The situation drawn below simplifies a problem we would like to solve with flex_max funcitonality, but can't. For FCE we need flex_max to be a bit more powerful.

Situation:

Also, we want to set the maximum to biogas availability by maximizing the CONVERTER identified as the bottleneck for biogas production. Let's say it is g: corn production.

Complication:

This maximization does not propagate all the way to b: greengas distribution, which needs it to see how much import of greengas is required and how much can be met domestically. The present flex_max functionality only allows for c: biogas upgrade or the link b --> c to be maximized.

Causes:

  1. We do not know demand from the biogas CHP, which is to have priority over biogas upgrade
  2. We cannot as yet assign priorities for which to handle first: a ---> d or c ---> d

    Other complication:

    • Slider determining biogas CHP demand needs to be capped in interface (can be done using GQL statement)

Solution proposed by @hasclass for a simpler problem does not work here: Assign maximum to link b ---> c, the value of which is a pointer to the maximum of corn. This pointer can handle basic arithmetic to deal with the 50% input conversions, so only corn needs to be maximized and the link will follow.

Even if we assign a maximum to c using a pointer to the maximum of g and the input conversion for e, there is no way to handle this if both a and c demand 1000.

@dennisschoenmakers , @ChaelKruip and @WvanLelyveld please comment.

(image edited on 23-05-2012)

ChaelKruip commented 12 years ago

This example combines many different issues so I'll try to break it down to the essential parts. The main issues from a modeling point of view are the inability of the graph to:

  1. Assign priorities 'from many to one' (i.e, parents to children). As in a --> d and c --> d.
  2. Communicate a MAX (cap) value from right to left through the graph. E.g., g --> e --> d --> c

The first issue necessitates that a converter can treat requests from its parents (left in the graph) sequentially. Every request needs to be followed through completely before the next is executed.

The second issue requires three things:

  1. A way to detect at a converter (say 'c' in the above example) that it is limited by a MAX further along the way.
  2. A method that follows the graph down to the last converter with a MAX and communicates the result (taking into account all shares along the way) back to the starting converter.
  3. A way to update/store the used/remaining quantity (of corn for example). This should be easy.
WvanLelyveld commented 12 years ago

I like the way Chael has put it. It seems like prioritization and right-to-left calculation is what is needed for this.

ChaelKruip commented 12 years ago

A simple example of the desired prioritization is given by The cap of 'b' depends on the what 'a' asks from 'c'. This info needs to be updated after 'a' has taken its share as stated in

A way to update/store the used/remaining quantity (of corn for example). This should be easy.

A number-based example of the above situation where both 'a' and 'b' get some of the content of 'c'

Another example, where 'a', the converter with highest priority, gets all the spoils

ChaelKruip commented 12 years ago

The right to left calculation needs to deal with situations as displayed below:

       demand=200                                max=100                         max=100
  +-----------------------+                +-----------------------+          +--------------------+
  |                       |                |                       |          |                    |
  |                       |                |                       |          |                    |
  |         a             |     flex-max   |          b            |  flex-max|        c           |
  |                       +---------------->                       +---------->                    |
  |                       |                |                       |          |                    |
  |                       |                |                       |          |                    |
  +-----------------------+                +-----------------------+          +--------------------+

First converter 'a' has to become aware that it is entering a special case when requesting energy from 'b'. The request has to travel through 'b' (and possibly more converters) until the primary demand side has been reached (complete right). Here the information about the maximum of converter 'c' must travel 'from right to left' up to converter 'a'.

dennisquintel commented 12 years ago

This ticket is not specific (atomic) enough. Let's keep this as reference material. I am closing this now. @ChaelKruip: could you try to make atomic tickets with concrete examples of desired (and if it exists: current) functionality?

dennisquintel commented 12 years ago

New tickets (on ET-Engine):