Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edits in documentations #44

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/HSC/model/g2p/h2_g2p_commit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ This module creates decision variables, expressions, and constraints related to

This function defines the following decision variables:

$\nu_{y,t,z}$ designates the commitment state of g2p generator cluster $h$ in zone $z$ at time $t$;
$\chi_{y,t,z}$ represents number of g2p startup decisions in cluster $h$ in zone $z$ at time $t$;
$\zeta_{y,t,z}$ represents number of g2p shutdown decisions in cluster $h$ in zone $z$ at time $t$.
$\nu_{h,t,z}$ designates the commitment state of g2p generator cluster $h$ in zone $z$ at time $t$;
$\chi_{h,t,z}$ represents number of g2p startup decisions in cluster $h$ in zone $z$ at time $t$;
$\zeta_{h,t,z}$ represents number of g2p shutdown decisions in cluster $h$ in zone $z$ at time $t$.

**Cost expressions:**

The total cost of start-ups across g2p generators subject to unit commitment ($h \in UC$) and all time periods, t is expressed as:
```math
\begin{aligned}
C^{start} = \sum_{h \in UC, t \in T} \omega_t \times start\_cost_{h} \times \chi_{h,t}
\pi^{start} = \sum_{h \in UC, t \in T} \omega_t \times start\_cost_{h} \times \chi_{h,t}
\end{aligned}
```

Expand Down Expand Up @@ -86,7 +86,7 @@ Like other time-coupling constraints, this constraint wraps around to link the c

**Ramping constraints**

Thermal resources subject to unit commitment ($h \in UC$) adhere to the following ramping constraints on hourly changes in power output:
Hydrogen to power resources subject to unit commitment ($h \in UC$) adhere to the following ramping constraints on hourly changes in power output:

```math
\begin{aligned}
Expand All @@ -109,7 +109,7 @@ where decision $\Theta_{h,z,t}$ is the energy injected into the grid by technolo

**Minimum and maximum power output**

If not modeling regulation and spinning reserves, thermal resources subject to unit commitment adhere to the following constraints that ensure power output does not exceed minimum and maximum feasible levels:
If not modeling regulation and spinning reserves, hydrogen to power resources subject to unit commitment adhere to the following constraints that ensure power output does not exceed minimum and maximum feasible levels:

```math
\begin{aligned}
Expand All @@ -120,7 +120,7 @@ If not modeling regulation and spinning reserves, thermal resources subject to u

```math
\begin{aligned}
\Theta_{h,z,t} \geq \rho^{max}_{h,z} \times \Omega^{size}_{h,z} \times \nu_{h,z,t}
\Theta_{h,z,t} \leq \rho^{max}_{h,z} \times \Omega^{size}_{h,z} \times \nu_{h,z,t}
\hspace{1.5cm} \forall h \in \mathcal{UC}, \forall z \in \mathcal{Z}, \forall t \in \mathcal{T}
\end{aligned}
```
Expand All @@ -129,7 +129,7 @@ If not modeling regulation and spinning reserves, thermal resources subject to u

**Minimum and maximum up and down time**

Thermal resources subject to unit commitment adhere to the following constraints on the minimum time steps after start-up before a unit can shutdown again (minimum up time) and the minimum time steps after shut-down before a unit can start-up again (minimum down time):
Hydrogen to power resources subject to unit commitment adhere to the following constraints on the minimum time steps after start-up before a unit can shutdown again (minimum up time) and the minimum time steps after shut-down before a unit can start-up again (minimum down time):

```math
\begin{aligned}
Expand All @@ -140,7 +140,7 @@ Thermal resources subject to unit commitment adhere to the following constraints

```math
\begin{aligned}
\frac{\overline{\Delta_{h,z}} + \Omega_{h,z} - \Delta_{h,z}}{\Omega^{size}_{h,z}} - \nu_{h,z,t} \geq \displaystyle \sum_{\hat{t} = t-\tau^{down}_{h,z}}^t \zeta_{h,z,\hat{t}}
\frac{\Delta^{\text{total}}_{h,z}}{\Omega^{size}_{h,z}} - \nu_{h,z,t} \geq \displaystyle \sum_{\hat{t} = t-\tau^{down}_{h,z}}^t \zeta_{h,z,\hat{t}}
\hspace{1.5cm} \forall h \in \mathcal{UC}, \forall z \in \mathcal{Z}, \forall t \in \mathcal{T}
\end{aligned}
```
Expand All @@ -149,7 +149,7 @@ Thermal resources subject to unit commitment adhere to the following constraints
where $\tau_{h,z}^{up|down}$ is the minimum up or down time for units in generating cluster $h$ in zone $z$.

Like with the ramping constraints, the minimum up and down constraint time also wrap around from the start of each time period to the end of each period.
It is recommended that users of GenX must use longer subperiods than the longest min up/down time if modeling UC. Otherwise, the model will report error.
It is recommended that users of DOLPHYN must use longer subperiods than the longest min up/down time if modeling UC. Otherwise, the model will report error.
"""
function h2_g2p_commit(EP::Model, inputs::Dict, setup::Dict)

Expand Down
2 changes: 1 addition & 1 deletion src/HSC/model/g2p/h2_g2p_discharge.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This module additionally defines contributions to the objective function from va
```math
\begin{aligned}
Obj_{Var\_g2p} =
\sum_{h \in \mathcal{H}} \sum_{t \in \mathcal{T}}\omega_{t}\times(\pi^{VOM}_{h}
\sum_{h \in \mathcal{H}} \sum_{t \in \mathcal{T}}\omega_{t}\times(\pi^{VOM}_{h} \times \theta_{h,z,t})
\end{aligned}
```
"""
Expand Down
2 changes: 1 addition & 1 deletion src/HSC/model/g2p/h2_g2p_no_commit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This set of time-coupling constraints wrap around to ensure the power output in

**Minimum and maximum power output**

When not modeling regulation and reserves, thermal units not subject to unit commitment decisions are bound by the following limits on maximum and minimum power output:
When not modeling regulation and reserves, hydrogen units not subject to unit commitment decisions are bound by the following limits on maximum and minimum power output:

```math
\begin{aligned}
Expand Down
18 changes: 9 additions & 9 deletions src/HSC/model/generation/h2_production_commit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ The h2_generation module creates decision variables, expressions, and constraint

Documentation to follow ******

**Power balance expression**
**Hydrogen balance expression**

This function adds the sum of power generation from thermal units subject to unit commitment ($\Theta_{y \in UC,t \in T,z \in Z}$) to the power balance expression.
This function adds the sum of hydrogen generation from hydrogen units subject to unit commitment ($\Theta_{y \in UC,t \in T,z \in Z}$) to the power balance expression.

**Startup and shutdown events (thermal plant cycling)**

*Capacitated limits on unit commitment decision variables*

Thermal resources subject to unit commitment ($y \in \mathcal{UC}$) adhere to the following constraints on commitment states, startup events, and shutdown events, which limit each decision to be no greater than the maximum number of discrete units installed (as per the following three constraints):
Hydrogen resources subject to unit commitment ($y \in \mathcal{UC}$) adhere to the following constraints on commitment states, startup events, and shutdown events, which limit each decision to be no greater than the maximum number of discrete units installed (as per the following three constraints):

```math
\begin{aligned}
Expand Down Expand Up @@ -92,11 +92,11 @@ Thermal resources subject to unit commitment ($y \in UC$) adhere to the followin
```
(See Constraints 5-6 in the code)

where decision $\Theta_{y,z,t}$ is the energy injected into the grid by technology $y$ in zone $z$ at time $t$, parameter $\kappa_{y,z,t}^{up|down}$ is the maximum ramp-up or ramp-down rate as a percentage of installed capacity, parameter $\rho_{y,z}^{min}$ is the minimum stable power output per unit of installed capacity, and parameter $\rho_{y,z,t}^{max}$ is the maximum available generation per unit of installed capacity. These constraints account for the ramping limits for committed (online) units as well as faster changes in power enabled by units starting or shutting down in the current time step.
where decision $\Theta_{y,z,t}$ is the hydrogen injected into the grid by technology $y$ in zone $z$ at time $t$, parameter $\kappa_{y,z,t}^{up|down}$ is the maximum ramp-up or ramp-down rate as a percentage of installed capacity, parameter $\rho_{y,z}^{min}$ is the minimum stable power output per unit of installed capacity, and parameter $\rho_{y,z,t}^{max}$ is the maximum available generation per unit of installed capacity. These constraints account for the ramping limits for committed (online) units as well as faster changes in power enabled by units starting or shutting down in the current time step.

**Minimum and maximum power output**
**Minimum and maximum hydrogen output**

If not modeling regulation and spinning reserves, thermal resources subject to unit commitment adhere to the following constraints that ensure power output does not exceed minimum and maximum feasible levels:
If not modeling regulation and spinning reserves, hydrogen resources subject to unit commitment adhere to the following constraints that ensure power output does not exceed minimum and maximum feasible levels:

```math
\begin{aligned}
Expand All @@ -107,14 +107,14 @@ If not modeling regulation and spinning reserves, thermal resources subject to u

```math
\begin{aligned}
\Theta_{y,z,t} \geq \rho^{max}_{y,z} \times \Omega^{size}_{y,z} \times \nu_{y,z,t}
\Theta_{y,z,t} \leq \rho^{max}_{y,z} \times \Omega^{size}_{y,z} \times \nu_{y,z,t}
\hspace{1.5cm} \forall y \in \mathcal{UC}, \forall z \in \mathcal{Z}, \forall t \in \mathcal{T}
\end{aligned}
```

(See Constraints 7-8 the code)

If modeling reserves and regulation, these constraints are replaced by those established in this ```thermal_commit_reserves()```.


**Minimum and maximum up and down time**

Expand All @@ -129,7 +129,7 @@ Thermal resources subject to unit commitment adhere to the following constraints

```math
\begin{aligned}
\frac{\overline{\Delta_{y,z}} + \Omega_{y,z} - \Delta_{y,z}}{\Omega^{size}_{y,z}} - \nu_{y,z,t} \geq \displaystyle \sum_{\hat{t} = t-\tau^{down}_{y,z}}^t \zeta_{y,z,\hat{t}}
\frac{\Delta^{\text{total}}_{y,z}}{\Omega^{size}_{y,z}} - \nu_{y,z,t} \geq \displaystyle \sum_{\hat{t} = t-\tau^{down}_{y,z}}^t \zeta_{y,z,\hat{t}}
\hspace{1.5cm} \forall y \in \mathcal{UC}, \forall z \in \mathcal{Z}, \forall t \in \mathcal{T}
\end{aligned}
```
Expand Down
8 changes: 4 additions & 4 deletions src/HSC/model/generation/h2_production_no_commit.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The h2_generation module creates decision variables, expressions, and constraint

**Ramping limits**

Thermal resources not subject to unit commitment ($y \in H \setminus UC$) adhere instead to the following ramping limits on hourly changes in power output:
Hydrogen resources not subject to unit commitment ($y \in H \setminus UC$) adhere instead to the following ramping limits on hourly changes in power output:

```math
\begin{aligned}
Expand All @@ -36,11 +36,11 @@ Thermal resources not subject to unit commitment ($y \in H \setminus UC$) adhere
```
(See Constraints 1-2 in the code)

This set of time-coupling constraints wrap around to ensure the power output in the first time step of each year (or each representative period), $t \in \mathcal{T}^{start}$, is within the eligible ramp of the power output in the final time step of the year (or each representative period), $t+\tau^{period}-1$.
This set of time-coupling constraints wrap around to ensure the hydrogen output in the first time step of each year (or each representative period), $t \in \mathcal{T}^{start}$, is within the eligible ramp of the power output in the final time step of the year (or each representative period), $t+\tau^{period}-1$.

**Minimum and maximum power output**
**Minimum and maximum hydrogen output**

When not modeling regulation and reserves, thermal units not subject to unit commitment decisions are bound by the following limits on maximum and minimum power output:
When not modeling regulation and reserves, hydrogen units not subject to unit commitment decisions are bound by the following limits on maximum and minimum power output:

```math
\begin{aligned}
Expand Down
4 changes: 2 additions & 2 deletions src/HSC/model/truck/h2_long_duration_truck.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ State of charge of truck at beginning of each modeled period n.

```math
\begin{aligned}
v_{n}^{SOC} \geqslant 0,v_{z,j,n}^{SOC}\leqslant v_{j}^{TRU}
v_{n}^{SOC} \geq 0
\end{aligned}
```

Expand All @@ -37,7 +37,7 @@ State of charge of truck at beginning of each modeled period n.
State of charge of truck at beginning of each modeled period cannot exceed installed energy capacity
```math
\begin{aligned}
v_{z,j,n}^{SOC}< v_{j}^{TRU}
v_{z,j,n}^{SOC} \leq v_{j}^{TRU}
\end{aligned}
```

Expand Down
2 changes: 1 addition & 1 deletion src/HSC/model/truck/h2_truck_all.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ received this license file. If not, see <http://www.gnu.org/licenses/>.
@doc raw"""
h2_truck_all(EP::Model, inputs::Dict, setup::Dict)

This function defines a series of operationg variables,expresstions and constraints in truck scheduling and routing model.
This function defines a series of operating variables, expressions and constraints in truck scheduling and routing model.

**Variables**

Expand Down
10 changes: 5 additions & 5 deletions src/HSC/model/truck/h2_truck_investment.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,25 @@ This function includes investment variables, expressions and related constraints
## Truck capacity built and retired
```math
\begin{aligned}
v_{CAP,j}^{TRU} \geqslant 0
v_{CAP,j}^{TRU} \geq 0
\end{aligned}
```

```math
\begin{aligned}
v_{RETCAP,j}^{TRU} \geqslant 0
v_{RETCAP,j}^{TRU} \geq 0
\end{aligned}
```

```math
\begin{aligned}
v_{CAP,j}^{TRU} \geqslant 0
v_{CAP,j}^{TRU} \geq 0
\end{aligned}
```

```math
\begin{aligned}
v_{NEWCAP,j}^{TRU} \geqslant 0
v_{NEWCAP,j}^{TRU} \geq 0
\end{aligned}
```

Expand All @@ -54,7 +54,7 @@ Truck retirements cannot retire more charge capacity than existing charge capaci
v_{RETCAPNUM,j}^{TRU} \le v_{ExistNum,j}^{TRU}
\end{aligned}
```
Truck compression energyCannot retire more energy capacity than existing energy capacity
Truck compression energy: Cannot retire more energy capacity than existing energy capacity
```math
\begin{aligned}
v_{RETCAPEnergy,j}^{TRU} \le v_{ExistEnergyCap,j}^{TRU}
Expand Down