demand

This module contains constraints related to demand. The model computes the power balance for each hour, in each time period, for each year, and in each zone, as follows:

\[ \begin{align}\begin{aligned}{{\rm{DEMAND}}}_{h,m,y,z}\times\Delta h = \sum_{z_{\rm{from}}\in {\mathcal{Z}}\backslash{\{z\}}}{{\rm{import}}_{h,m,y,z_{\rm{from}},z}} - \sum_{z_{\rm{to}}\in {\mathcal{Z}}\backslash{\{z\}}} {{\rm{export}}_{h,m,y,z,z_{\rm{to}}}}\\+ \sum_{e\in {\mathcal{E}}}{{\rm{gen}}_{h,m,y,z,e}} - \sum_{e\in {\mathcal{STOR}}}{{\rm{charge}}_{h,m,y,z,e}} \quad\forall h,m,y,z\end{aligned}\end{align} \]
class prepshot._model.demand.AddDemandConstraints(model)[source]

Bases: object

This class contains demand constraints.

Parameters

model (object) --

__init__(model)[source]

Initialize the class and add constraints.

Parameters

model (object) -- Model object depending on the solver.

Return type

None

power_balance_rule(h, m, y, z)[source]

Nodal power balance. The total electricity demand for each time period and in each zone should be met by the following.

  1. The sum of imported power energy from other zones.

  2. The generation from zone z minus the sum of exported power energy from zone z to other zones.

  3. The charging power energy of storage technologies in zone z.

Parameters
  • h (int) -- Hour.

  • m (int) -- Month.

  • y (int) -- Year.

  • z (str) -- Zone.

Returns

The constraint of the model.

Return type

poi.ConstraintIndex