NonConvex
EnNonConvex
¶
Bases: EnBaseModel
Represents a non-convex energy model with constraints and cost attributes.
Defines attributes and limitations associated with non-convex behavior, including cost structures, operational constraints, and gradient limits, for modeling purposes in an energy system optimization context.
Attributes:
Name | Type | Description |
---|---|---|
startup_costs |
float | list[float] | None
|
Costs associated with a start of the flow (representing a unit). |
shutdown_costs |
float | list[float] | None
|
Costs associated with the shutdown of the flow (representing a unit). |
activity_costs |
float | list[float] | None
|
Costs associated with the active operation of the flow, independently from the actual output. |
inactivity_costs |
float | list[float] | None
|
Costs associated with not operating the flow. |
minimum_uptime |
int | list[int] | None
|
Minimum number of time steps that a flow must be greater than its minimum flow after startup. Be aware that minimum up and downtimes can contradict each other and may lead to infeasible problems. |
minimum_downtime |
int | list[int] | None
|
Minimum number of time steps a flow is forced to zero after shutting down. Be aware that minimum up and downtimes can contradict each other and may lead to infeasible problems. |
maximum_startups |
int | None
|
Maximum number of start-ups in the optimization timeframe. |
maximum_shutdowns |
int | None
|
Maximum number of shutdowns in the optimization timeframe. |
initial_status |
int
|
Integer value indicating the status of the flow in the first time step (0 = off, 1 = on). For minimum up and downtimes, the initial status is set for the respective values in the beginning, e.g., if a minimum uptime of four timesteps is defined and the initial status is set to one, the initial status is fixed for the four first timesteps of the optimization period. Otherwise, if the initial status is set to zero, the first timesteps are fixed for the number of minimum downtime steps. |
positive_gradient_limit |
dict | None
|
The normed upper bound on the positive difference (flow[t-1] < flow[t]) of two consecutive flow values. |
negative_gradient_limit |
dict | None
|
The normed upper bound on the negative difference (flow[t-1] > flow[t]) of two consecutive flow values. |
Source code in backend/app/ensys/components/nonconvex.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 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 |
|
to_oemof(energysystem)
¶
Converts the given energy system into an oemof.solph.NonConvex object using
parameters built by the build_kwargs
method. This function prepares the
necessary parameters by interacting with the provided energy system and
constructs the required non-convex properties for the output.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
energysystem
|
EnergySystem
|
The energy system instance that holds the data and configuration required to create an |
required |
Returns:
Type | Description |
---|---|
solph.NonConvex
|
An instance of |