@@ -115,11 +115,14 @@ controller minimizes the following objective function at each discrete time ``k`
115115 + E J_E(\m athbf{U}_E, \m athbf{Ŷ}_E, \m athbf{D̂}_E, \m athbf{p})
116116\e nd{aligned}
117117```
118- See [`LinMPC`](@ref) for the variable definitions. The custom economic function ``J_E`` can
119- penalizes solutions with high economic costs. Setting all the weights to 0 except ``E``
120- creates a pure economic model predictive controller (EMPC). The arguments of ``J_E`` include
121- the manipulated inputs, the predicted outputs and measured disturbances from ``k`` to
122- ``k+H_p`` inclusively:
118+ subject to [`setconstraint!`](@ref) bounds, and the custom economic inequality constraints:
119+ ```math
120+ \m athbf{g}_E(\m athbf{U}_E, \m athbf{Ŷ}_E, \m athbf{D̂}_E, \m athbf{p}, ε) ≤ \m athbf{0}
121+ ````
122+ The economic function ``J_E`` can penalizes solutions with high economic costs. Setting all
123+ the weights to 0 except ``E`` creates a pure economic model predictive controller (EMPC).
124+ The arguments of ``J_E`` include the manipulated inputs, the predicted outputs and measured
125+ disturbances from ``k`` to ``k+H_p`` inclusively:
123126```math
124127 \m athbf{U}_E = \b egin{bmatrix} \m athbf{U} \\ \m athbf{u}(k+H_p-1) \e nd{bmatrix} , \q uad
125128 \m athbf{Ŷ}_E = \b egin{bmatrix} \m athbf{ŷ}(k) \\ \m athbf{Ŷ} \e nd{bmatrix} , \q uad
@@ -133,7 +136,8 @@ mutable one if you want to modify it later e.g.: a vector.
133136!!! tip
134137 Replace any of the 4 arguments with `_` if not needed (see `JE` default value below).
135138
136- This method uses the default state estimator :
139+ See [`LinMPC`](@ref) for the definition of the other variables. This method uses the default
140+ state estimator :
137141
138142- if `model` is a [`LinModel`](@ref), a [`SteadyKalmanFilter`](@ref) with default arguments;
139143- else, an [`UnscentedKalmanFilter`](@ref) with default arguments.
@@ -154,7 +158,10 @@ This method uses the default state estimator :
154158- `L_Hp=diagm(repeat(Lwt,Hp))` : positive semidefinite symmetric matrix ``\m athbf{L}_{H_p}``.
155159- `Cwt=1e5` : slack variable weight ``C`` (scalar), use `Cwt=Inf` for hard constraints only.
156160- `Ewt=0.0` : economic costs weight ``E`` (scalar).
157- - `JE=(_,_,_,_)->0.0` : economic function ``J_E(\m athbf{U}_E, \m athbf{Ŷ}_E, \m athbf{D̂}_E, \m athbf{p})``.
161+ - `JE=(_,_,_,_)->0.0` : economic (or custom) cost function
162+ ``J_E(\m athbf{U}_E, \m athbf{Ŷ}_E, \m athbf{D̂}_E, \m athbf{p})``.
163+ - `gE=(_,_,_,_,_)->[]` : economic (or custom) constraint function
164+ ``\m athbf{g}_E(\m athbf{U}_E, \m athbf{Ŷ}_E, \m athbf{D̂}_E, \m athbf{p}, ε)``.
158165- `p=model.p` : ``J_E`` function parameter ``\m athbf{p}`` (any type).
159166- `optim=JuMP.Model(Ipopt.Optimizer)` : nonlinear optimizer used in the predictive
160167 controller, provided as a [`JuMP.Model`](https://jump.dev/JuMP.jl/stable/api/JuMP/#JuMP.Model)
0 commit comments