Sign convention for time series
Intro
Question:
How does IESopt interpret positive and negative values in a Profile connected using
node_from
?
Answer:
When modeling energy systems in IESopt, you might have a fixed Profile representing both energy demand and supply — the proper sign of generation / consumption then depends on the way it is configured and connects to other components. Understanding how to correctly connect this Profile to a Node is crucial for accurate results.
Details
Understanding node_from
and node_to
Generally the following intuition applies:
node_from
: Indicates that the component draws energy from the specified Node.node_to
: Indicates that the component injects energy into the specified Node.
Example: node_from
If you connect your fixed Profile (mode: fixed
, which is the default) to a Node using node_from
, here’s how IESopt interprets the values:
Why does this happen?
In IESopt, drawing a negative amount of energy from a Node (-x kWh
) is mathematically equivalent to injecting a positive amount of energy (+x kWh
) into it. This means, the following are equal:
Practical example
Suppose you have a fixed Profile connected to an electricity grid Node:
myprofile:
type: Profile
carrier: electricity
node_from: elec_grid_node
value: [100, -50, 150, -75] # in kW
At time step 1: The Profile draws with a power of 100 kW from the Node (consumption).
At time step 2: The Profile injects with a power of 50 kW into the Node (generation).
And so on.
Alternative approach with node_to
If you prefer to handle injections explicitly, you can use node_to
:
Summary
Using
node_from
:Using
node_to
:
By correctly setting up your Profile and understanding the sign conventions, you ensure that your model accurately reflects the intended energy flows.