odys.optimization.formulations.energy_market¶
The energy market formulation: sell and buy volumes and the trade mode, their constraints, the markets' power injection (purchases minus sales) and the trading revenue in the profit.
The variables, constraints and objective terms are written out on the Markets formulation page.
See also Market for the domain model and entity_arrays for the parameter arrays.
Model formulation of energy markets.
EnergyMarketFormulation
¶
Bases: VariableFormulation[EnergyMarketVariables]
Energy markets: volume limits, buy-or-sell exclusivity, trade direction and non-anticipativity.
Source code in src/odys/optimization/formulations/energy_market.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
__init__(markets, context)
¶
Initialize with the energy markets of the system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
markets
|
Sequence[EnergyMarket]
|
The energy markets, at least one. |
required |
context
|
ModelContext
|
The shared indexing of the problem. |
required |
Source code in src/odys/optimization/formulations/energy_market.py
43 44 45 46 47 48 49 50 51 52 | |
build(inputs)
classmethod
¶
Return the formulation of the energy markets, or None if there are none.
Source code in src/odys/optimization/formulations/energy_market.py
54 55 56 57 58 | |
dispatch(solution)
¶
Return the sell, buy and net (sell minus buy) volumes of the markets.
Source code in src/odys/optimization/formulations/energy_market.py
155 156 157 158 159 160 161 | |
power_injection()
¶
Return the net purchase (buy minus sell volume), summed over markets.
Source code in src/odys/optimization/formulations/energy_market.py
142 143 144 145 146 | |
profit()
¶
Return the trading revenue per scenario: (sell minus buy volume) times step length times price.
Source code in src/odys/optimization/formulations/energy_market.py
148 149 150 151 152 153 | |
EnergyMarketVariables
¶
Bases: BaseModel
Decision variables of the energy markets.
Source code in src/odys/optimization/formulations/energy_market.py
24 25 26 27 28 29 30 31 | |