---
jupytext:
text_representation:
extension: .md
format_name: myst
format_version: 0.13
jupytext_version: 1.13.8
kernelspec:
display_name: 'Python 3'
name: python3
---
(gate)=
# gate
A general water rout that is used to move water from an upstream reservoir to the downstream reservoir
| | |
|---|---|
|Input connections|{ref}`reservoir`, {ref}`creek_intake`, {ref}`discharge_group`|
|Output connections|{ref}`reservoir`, {ref}`junction`, {ref}`discharge_group`|
|License|SHOP_OPEN|
|Release version|13.0.0.a|
```{contents}
:local:
:depth: 1
```
```{warning}
The gate object is old and will be deprecated in the future. A gate can be replaced with either the newer [](river) or [](tunnel) objects.
```
## Examples
- [](ramping)
## Attributes
```{code-cell} ipython3
:tags: ['remove-input', 'full-width']
from IPython.core.display import HTML
HTML("""
""")
```
(gate:time_delay)=
### time_delay
Future deprecation: All time delay should be modelled by using the river object (does not require additional license). The delay between water leaving the gate and until it ends up in the downstream reservoir (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:add_slack)=
### add_slack
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Include slack variables for the corresponding delta meter gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:max_discharge)=
### max_discharge
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Maximum discharge capacity for the gate (xUnit: M3/S, yUnit: M3/S)
(gate:lin_rel_a)=
### lin_rel_a
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Linear approximation to model gate discharge (in Mm3) as a function of upstream reservoir volume: gate_flow = lin_rel_a*up_rsv_volume + lin_rel_b (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:lin_rel_b)=
### lin_rel_b
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Linear approximation to model gate discharge (in Mm3) as a function of upstream reservoir volume: gate_flow = lin_rel_a*up_rsv_volume + lin_rel_b (xUnit: MM3, yUnit: MM3)
(gate:shape_discharge)=
### shape_discharge
Future deprecation: All time delay should be modelled by using the river object (does not require additional license). Describes the wave shape of the delayed discharge for a gate by ratios as a function of time delays (xUnit: HOUR, yUnit: NO_UNIT)
(gate:spill_cost_curve)=
### spill_cost_curve
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Describes a piece-wise constant cost curve for the flow in the gate. This is only available for spill gates, and overrides the default overflow penalty in SHOP. (xUnit: M3/S, yUnit: NOK/M3/S)
(gate:peak_flow_cost_curve)=
### peak_flow_cost_curve
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Describes the piece-wise constant cost curve for the highest achieved flow rate in the gate over the optimization horizon (xUnit: M3/S, yUnit: NOK/M3/S)
(gate:peak_flow_penalty)=
### peak_flow_penalty
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). The penalty incurred based on the peak_flow_cost_curve and the highest achieved flow rate in the gate over the optimization horizon (xUnit: NO_UNIT, yUnit: NOK)
(gate:functions_meter_m3s)=
### functions_meter_m3s
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). The relation between the head and opening of the gate or weir to define the discharge function of the gate (xUnit: METER, yUnit: M3/S)
(gate:functions_deltameter_m3s)=
### functions_deltameter_m3s
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Relationship between flow through the gate and water level in upper reservoir and difference in water level between upper and lower reservoir (xUnit: DELTA_METER, yUnit: M3/S)
(gate:min_flow)=
### min_flow
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Minimum flow constraint on the gate (xUnit: NO_UNIT, yUnit: M3/S)
(gate:min_flow_flag)=
### min_flow_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether the min_flow should be used (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:max_flow)=
### max_flow
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Maximum flow constraint on the gate (xUnit: NO_UNIT, yUnit: M3/S)
(gate:max_flow_flag)=
### max_flow_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether the max_flow should be used (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:schedule_m3s)=
### schedule_m3s
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Gate discharge schedule (xUnit: NO_UNIT, yUnit: M3/S)
(gate:schedule_percent)=
### schedule_percent
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Gate schedule in percent opening of the gate (xUnit: NO_UNIT, yUnit: %)
(gate:schedule_flag)=
### schedule_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining how the gate schedule should be used: 0 = no discharge schedule; 1 = discharge schedule; 2 = flow is calculated from reservoir water level and flow function for the gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:setting)=
### setting
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Predefined position of the gate to be used for determining gate flow together with functions and upstream water level (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:setting_flag)=
### setting_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether the gate setting should be used to determine the flow through the gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:discharge_fee)=
### discharge_fee
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Cost of discharging water through the gate referred to the time of discharge (xUnit: NO_UNIT, yUnit: NOK/MM3)
(gate:discharge_fee_flag)=
### discharge_fee_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether discharge_fee should be used in the optimization model (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:block_merge_tolerance)=
### block_merge_tolerance
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Maximum deviation in discharge between two time steps that forces these hours to have the same discharge in later iterations (xUnit: NO_UNIT, yUnit: M3/S)
(gate:min_q_penalty_flag)=
### min_q_penalty_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). A flag enabling the penalty cost for the minimum discharge constraint on the gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:max_q_penalty_flag)=
### max_q_penalty_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). A flag enabling the penalty cost for the maximum discharge constraint on the gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:ramping_up)=
### ramping_up
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Maximum limit for increase in gate discharge per hour (xUnit: NO_UNIT, yUnit: M3SEC_HOUR)
(gate:ramping_up_flag)=
### ramping_up_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). A flag for toggling the upper ramping limit constraint on and off for this gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:ramping_down)=
### ramping_down
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Maximum limit for decrease in gate discharge per hour (xUnit: NO_UNIT, yUnit: M3SEC_HOUR)
(gate:ramping_down_flag)=
### ramping_down_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). A flag for toggling the lower ramping limit constraint on and off for this gate (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:ramp_penalty_cost)=
### ramp_penalty_cost
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). The penalty cost for breaking the upper or lower discharge ramping limits for the gate (xUnit: NO_UNIT, yUnit: NOK/M3/S)
(gate:ramp_penalty_cost_flag)=
### ramp_penalty_cost_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). A flag for toggling the use of the specified ramping penalty cost for this gate on or off (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:max_q_penalty_cost)=
### max_q_penalty_cost
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). The penalty cost for the gate maximum discharge constraint (xUnit: NO_UNIT, yUnit: NOK/MM3)
(gate:min_q_penalty_cost)=
### min_q_penalty_cost
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). The penalty cost for the gate minimum discharge constraint (xUnit: NO_UNIT, yUnit: NOK/MM3)
(gate:max_q_penalty_cost_flag)=
### max_q_penalty_cost_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether max_q_penalty_cost should be included in the optimization model (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:min_q_penalty_cost_flag)=
### min_q_penalty_cost_flag
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Flag determining whether min_q_penalty_cost should be included in the optimization model (xUnit: NO_UNIT, yUnit: NO_UNIT)
(gate:min_q_penalty)=
### min_q_penalty
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Resulting penalty when the gate minimum discharge is violated (xUnit: NO_UNIT, yUnit: NOK)
(gate:max_q_penalty)=
### max_q_penalty
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Resulting penalty when the gate maximum discharge is violated (xUnit: NO_UNIT, yUnit: NOK)
(gate:discharge)=
### discharge
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Resulting gate discharge (xUnit: NO_UNIT, yUnit: M3/S)
(gate:sim_discharge)=
### sim_discharge
Future deprecation: All gates should be modelled by using the river or tunnel objects (does not require additional license). Simulated gate discharge (xUnit: NO_UNIT, yUnit: M3/S)