Skip to content

Latest commit

 

History

History
361 lines (286 loc) · 14.6 KB

min_prob.rst

File metadata and controls

361 lines (286 loc) · 14.6 KB

urbs

Minimal Optimization Model

The minimal model in urbs is a simple expansion and dispatch model with only processes being able to fulfill the given demands. All spatial information is neglected in this case. The minimal model is already multiple-input/multiple output (mimo) and the variable vector takes the following form:

$$x^{\text{T}}=(\zeta, \underbrace{\rho_{ct}}_{\text{commodity variables}}, \underbrace{\kappa_{p}, \widehat{\kappa}_{p}, \tau_{pt}, \epsilon^{\text{in}}_{cpt}, \epsilon^{\text{out}}_{cpt}}_{\text{process variables}}).$$

Here, ζ represents the total annualized system cost, ρct the amount of commodities c taken from a virtual, infinite stock at time t, κp and κ̂p the total and the newly installed process capacities of processes p, τpt the operational state of processes p at time t and ϵcptin and ϵcptout the total inputs and outputs of commodities c to and from process p at time t, respectively.

Objective

For any urbs problem, as the objective function, either the total system costs or the total emissions of CO2 can be chosen. In the former (standard) case this leads to an objective vector of:


cTx = (ζ, 0, 0, 0, 0, 0, 0) with cT = (1, 0, 0, 0, 0, 0, 0),

where only the costs are part of the objective function. For the latter choice of objective no such simple structure can be written.

Costs

In the minimal model the total cost variable can be split into the following sum:


ζ = ζinv + ζfix + ζvar + ζfuel + ζenv,

where ζinv are the annualized invest costs, ζfix the annual fixed costs, ζvar the total variable costs accumulating over one year, ζfuel the accumulated fuel costs over one year and ζenv the annual penalties for environmental pollution. These costs are then calculated in the following way:

Annualized Investment Costs

Investments' values are typically depreciated with time. This devaluation happens in general longer time horizons than our model's standard of one year. However to overcome distortions in the overall cost function, urbs uses the annual cash flow (CAPEX) for the calculation of the investment costs in the cost function. This is captured by multiplying the total invest costs for a given process Cp with the annuity factor fp, i.e.:


ζinv, p = fp ⋅ Cp

For an interest rate of i and a depreciation period of n years the annuity factor can be derived using the remaining debt after k payments Ck:

$$\begin{aligned} &\text{After 0 Payments:}~C_0=C(1+i)\\\ &\text{After 1 Payment:}~~C_1=(C_0-fC)(1+i)=C(1+i)^2-fC(1+i)\\\ &\text{After 2 Payments:}~C_2=(C_1-fC)(1+i)=C(1+i)^3-fC(1+i)^2-fC(1+i)\\\ &...\\\ &\text{After n Payments:}~C_n=C(1+i)^n+C\sum_{k=0}^{n-1}(1+i)^k=(1+i)^n + f\left(\frac{1-(1+i)^n}{i}\right). \end{aligned}$$

Since the outstanding debt becomes 0 at the end of the depreciation period this leads to:

$$f=\frac{(1+i)^n\cdot i}{(1+i)^n-1}$$

The annualized invest costs for all investments made by the optimizer are then given by:


ζinv = ∑p ∈ Pexpfpkpinvκ̂p,

where kpinv signifies the specific invest costs of process p per unit capacity and Pexp is the subset of all processes that are actually expanded.

Annual Fixed Costs

The annual fixed costs represent maintenance and staff payments the processes used. They are playing a role for unit expansion only and are given as parameters for all allowed processes. Fixed costs scale with the capacity (in W) of the processes, and can be calculated using:


ζfix = ∑p ∈ Pkpfixκp,

where kpfix represents the specific annual fix costs for process p.

Annual Variable Costs

Variable costs represent both, additional maintenance requirements due to usage of processes and taxes or tariffs. They scale with the utilization of processes (in Wh) and can be calculated in the following way:

$$\begin{aligned} \zeta_{\text{var}}=w \Delta t \sum_{t \in T_m\\ p \in P} k^{\text{var}}_{pt}\tau_{pt}, \end{aligned}$$

where kptvar are the specific variable costs per time integrated process usage, and w and Δt are a weight factor that extrapolates the actual modeled time horizon to one year and the timestep length in hours, respectively.

Annual Fuel Costs

The usage of fuel adds an additional cost factor to the total costs. As with variable costs these costs occur when processes are used and are dependent on the total usage of the fuel (Stock <stock-commodity-def>) commodities:

$$\begin{aligned} \zeta_{\text{fuel}}=w \Delta t \sum_{t \in T_m\\ c \in C_{\text{stock}}} k^{\text{fuel}}_{c}\rho_{c}, \end{aligned}$$

where kcfuel are the specific fuel costs. The distinction between variable and fuel costs is introduced for clarity of the results, both could in principle be merged into one class of costs.

Annual Environmental Costs

Environmental costs occur when the emission of an environmental commodity is penalized by a fine. Environmental commodities do not have to be balanced but can be emitted to the surrounding. The total production of the polluting environmental commodity is then given by:

$$\begin{aligned} \zeta_{\text{env}}=-w \Delta t \sum_{t \in T_m\\ c \in C_{\text{env}}} k^{\text{env}}_{c}\text{CB}(c,t), \end{aligned}$$

where kcenv are the specific costs per unit of environmental commodity and CB is the momentary commodity balance of commodity c at time t. The minus sign is due to the sign convention used for the commodity balance which is positive when the system takes in a unit of a commodity.

After this discussion of the individual cost terms the constraints making up the matrices A and B are discussed now.

Process Expansion Constraints

The unit expansion constraints are independent of the modeled time. In case of the minimal model they are restricted to two constraints only limiting the allowed capacity expansion for each process. The total capacity of a given process is simply given by:

$$\begin{aligned} &\forall p \in P:\\\ &\kappa_{p}=K_p + \widehat{\kappa}_p, \end{aligned}$$

where Kp is the already installed capacity of process p.

Process Capacity Limit Rule

The capacity of each process p is limited by a maximal and minimal capacity, $\overline{K}_p$ and $\underline{K}_p$, respectively, which are both given to the model as parameters:

$$\begin{aligned} &\forall p \in P:\\\ &\underline{K}_p\leq\kappa_{p}\leq\overline{K}_p. \end{aligned}$$

All further constraints are time dependent and are determinants of the unit commitment, i.e. the time series of operation of all processes and commodity flows.

Commodity Dispatch Constraints

In this part the rules governing the commodity flow timeseries are shown.

Vertex Rule ("Kirchhoff's Current Law")

This rule is the central rule for the commodity flows and states that all commodity flows, (except for those of environmental commodities) have to be balanced in each time step. As a helper function the already mentioned commodity balance is calculated in the following way:

$$\begin{aligned} &\forall c \in C,~t\in T_m:\\\\\ &\text{CB}(c,t)= \sum_{(c,p)\in C^{\mathrm{in}}_p}\epsilon^{\text{in}}_{cpt}- \sum_{(c,p)\in C^{\mathrm{out}}_p}\epsilon^{\text{out}}_{cpt}. \end{aligned}$$

Here, the tuple sets Cpin, out represent all input and output commodities of process p, respectively. The commodity balance thus simply calculates how much more of commodity c is emitted by than added to the system via process p in timestep t. Using this term the vertex rule for the various commodity types can now be written in the following way:


c ∈ Cstt ∈ Tm : ρct ≥ CB(c, t),

where Cst is the set of stock commodities and:


c ∈ Cdemt ∈ Tm :  − dct ≥ CB(c, t),

where Cdem is the set of demand commodities and dct the corresponding demand for commodity c at time t. These two rules thus state that all stock commodities that are consumed at any time in any process must be taken from the stock and that all demands have to be fulfilled at each time step.

Stock Commodity Limitations

There are two rules that govern the retrieval of stock <stock-commodity-def> commodities from stock: The total stock and the stock per hour rule. The former limits the total amount of stock commodity that can be retrieved annually and the latter limits the same quantity per timestep. the two rules take the following form:

$$\begin{aligned} &\forall c \in C_{\text{st}}:\\\ &w \sum_{t\in T_{m}}\rho_{ct}\leq \overline{L}_c\\\\\ &\forall c \in C_{\text{st}},~t\in T_m:\\\ &\rho_{ct}\leq \Delta t \cdot \overline{l}_{c} \end{aligned}$$

where $\overline{L}_c$ and $\overline{l}_c$ are the totally allowed annual and hourly retrieval of commodity c from the stock, respectively.

Environmental Commodity Limitations

Similar to stock commodities, environmental commodities<env-commodity-def> can also be limited per hour or per year. Both properties are assured by the following two rules:

$$\begin{aligned} &\forall c \in C_{\text{env}}:\\\ &-w \sum_{t\in T_{m}}\text{CB}(c,t)\leq \overline{M}_c\\\\\ &\forall c \in C_{\text{env}},~t\in T_m:\\\ & -\text{CB}(c,t)\leq \Delta t \cdot \overline{m}_{c}, \end{aligned}$$

where $\overline{M}_c$ and $\overline{m}_c$ are the totally allowed annual and hourly emissions of environmental commodity c to the atmosphere, respectively.

Process Dispatch Constraints

So far, apart from the commodity balance function, the interaction between processes and commodities have not been discussed. It is perhaps in order to start with the general idea behind the modeling of the process operation. In urbs all processes are mimo-processes, i.e., in general they take in multiple commodities as inputs and give out multiple commodities as outputs. The respective ratios between the respective commodity flows remain normally fixed. The operational state of the process is then captured in just one variable, the process throughput τpt and is linked to the commodity flows via the following two rules:

$$\begin{aligned} &\forall p\in P,~c\in C,~t \in T_m:\\\ &\epsilon^{\text{in}}_{pct}=r^{\text{in}}_{pc}\tau_{pt}\\\ &\epsilon^{\text{out}}_{pct}=r^{\text{out}}_{pc}\tau_{pt}, \end{aligned}$$

where rpcin, out are the constant factors linking the commodity flow to the operational state. The efficiency η of the process p for the conversion of commodity c1 into commodity c2 is then simply given by:

$$\eta=\frac{r^{\text{out}}_{pc_2}}{r^{\text{in}}_{pc_1}}.$$

Basic Process Throughput Rules

The throughput τpt of a process is limited by its installed capacity and the specified minimal operational state. Furthermore, the switching speed of a process can be limited:

$$\begin{aligned} &\forall p\in P,~t\in T_m:\\\ &\tau_{pt}\leq \Delta t \kappa_{p}\\\ &\tau_{pt}\geq \Delta t \underline{P}_{p}\kappa_{p}\\\ &|\tau_{pt}-\tau_{p(t-1)}|\leq \Delta t\overline{PG}_p\kappa_{p}, \end{aligned}$$

where $\underline{P}_{p}$ is the normalized, minimal operational state of the process and $\overline{PG}_p$ the normalized, maximal gradient of the operational state in full capacity per timestep.

Intermittent Supply Rule

If the input commodity is of type SupIm <supply-intermmittent-def>, which means that it represents an operational state rather than a proper material flow, the operational state of the process is governed by this alone. This feature is typically used for renewable energies but can be used whenever a certain operation time series of a given process is desired

$$\begin{aligned} &\forall p\in P,~c\in C_{\text{sup}},~t\in T_m:\\\ &\epsilon^{\text{in}}_{cpt}= \Delta t s_{ct}\kappa_{p}. \end{aligned}$$

Here, sct is the time series that governs the exact operation of process p, leaving only its capacity κp as a free variable.

Part Load Behavior

Many processes show a non-trivial part-load behavior. In particular, often a nonlinear reaction of the efficiency on the operational state is given. Although urbs itself is a linear program this can with some caveats be captured in many cases. The reason for this is, that the efficiency of a process is itself not modeled but only the ratio between input and output multipliers. It is thus possible to use purely linear functions to get a nonlinear behavior of the efficiency of the form:

$$\eta=\frac{a+b\tau_{pt}}{c+d\tau_{pt}},$$

where a,b,c and d are some constants. Specifically, the input and output ratios can be set to vary linearly between their respective values at full load rpcin,out and their values at the minimal allowed operational state $\underline{P}_{p}\kappa_p$, which are given by $\underline{r}^{\text{in,out}}_{pc}$. This is achieved with the following equations:

$$\begin{aligned} &\forall p\in P^{\text{partload}},~c\in C,~t\in T_m:\\\\\ &\epsilon^{\text{in,out}}_{pct}=\Delta t\cdot\left( \frac{\underline{r}^{\text{in,out}}_{pc}-r^{\text{in,out}}_{pc}} {1-\underline{P}_p}\cdot \underline{P}_p\cdot \kappa_p+ \frac{r^{\text{in,out}}_{pc}- \underline{P}_p\underline{r}^{\text{in,out}}_{pc}} {1-\underline{P}_p}\cdot \tau_{pt}\right). \end{aligned}$$

A few restrictions have to be kept in mind when using this feature:

  • $\underline{P}_p$ has to be set larger than 0 otherwise the feature will work but not have any effect.
  • Environmental output commodities have to mimic the behavior of the inputs by which they are generated. Otherwise the emissions per unit of input would change together with the efficiency, which is typically not the desired behavior.

This concludes the minimal model.