# Optimal Control Applied to an Irrigation Planning Problem

Authors: Sofia O. Lopes; Fernando A. C. C. Fontes; Rui M. S. Pereira; MdR de Pinho; A. Manuela Gonçalves
Journal: Mathematical Problems in Engineering
 (2016)

---

## Abstract

We propose a mathematical model to study the water usage for the irrigation of given farmland to guarantee that the field crop is kept in a good state of preservation. This problem is formulated as an optimal control problem. The lack of analytic solution leads us to turn to numerical methods to solve the problem numerically. We then apply necessary conditions of optimality to validate the numerical solution. To deal with the high degree of unpredictability of water inflow due to weather, we further propose a replan strategy and we implement it.


---

## Body

## 1. Introduction

The climate system and the ecosystems are under accelerated change while human cultures, economic activities, and national interactions are undergoing dramatic and sometimes exponential changes [1]. The world population is increasing and according to some estimates it will pass 8 billion by 2030. At the same time an increasing number of people are becoming more prosperous and need more water, in the form of the liquid itself and through the use of other products, virtual water.According to [2], the water flow needs that typically occur every year in the spring/summer period, with a marked intensity in Southern Europe, namely, Portugal, limit strongly the agriculture production. Consequently, it is appropriate to discuss the use of water in these conditions, trying to find the best technical solutions making it possible to improve the efficiency of water use, in response to the environmental concerns. Agriculture exerts pressure on the environment, especially on water, in terms of quantity and quality. An appropriate water management throughout the irrigation processes is the right way to go.In this paper, we propose a simple mathematical model that will help to plan the water used in a field of potatoes in the Lisbon area. This model is based on a dynamic equation that can translate the hydrological balance equation.We assume that the soil is homogeneous and that the soil has one cubic meter of volume. A first model is used as a prototype to qualitatively validate irrigation of a farm field. In the literature, there are some examples for irrigation of potatoes farm fields in the Lisbon area. Using their inputs, we are able to qualitatively reproduce the literature outputs. The next step is to calibrate and test our model in a real farm [3].In order to characterize the solution to our problem, we guarantee the existence of solution via Clarke’s theorem [4]. Next we characterize the solution using the necessary conditions of optimality in the normal form and then we use such information to validate the numerical solution.Although preliminary results on this subjects are presented in [5–9], here we improve them and discuss them in detail. Additionally, here we propose the implementation of the replan methodology. Due to weather unpredictability, rainfall might be difficult to estimate accurately. To account for this fact, we propose the recalculation of the optimal strategy every time we obtain new data: a replanning or receding horizon strategy.


## 2. Characterization of the Solution of the Irrigation Problem

Our problem consists in optimizing the planning of the water used in the irrigation of farm fields by means of the optimal control, where the trajectory(
x
) is the water in the soil and the control (
u
) is the flow of water introduced in the soil via its irrigation system. The formulation is as follows:OCP is as follows:(1)
min
⁡
∫
0
T
u
t
d
t
subject to:
x
˙
t
=
f
t
,
x
t
,
u
t
a.e.
t
∈
0
,
T
x
t
≥
x
min
⁡
∀
t
∈
0
,
T
u
t
∈
0
,
M
a.e
.
x
0
=
x
0
,where f is the hydrologic balance function, x
m
i
n is the hydrological need of the crop (according to [3]), x
0 is an initial state, T is a given time, and M is the maximum flow of water that comes from tap.The dynamic function that represents the hydrologic balance is given byf
(
t
,
x
,
u
)
=
u
+
g
(
t
)
-
β
x, where g
(
t
) is the rainfall minus the evapotranspiration and β is the percentage of losses of water due to the runoff and deep infiltration [10]. Without loss of generality, we assume that g is a continuous function. This optimal control problem has inequality state constraints that can be written in the form h
(
x
(
t
)
)
≤
0, where h
(
x
(
t
)
)
=
-
x
(
t
)
+
x
m
i
n.Since our optimal control problem has inequality constraints, applying the Maximum Principle to this problem does not allow us to get the explicit analytical solution to the problem.To guarantee that our problem is meaningful we first prove the existence of the solution. Next, we apply necessary conditions to get some characterization of the optimal solution.


### 2.1. Existence of Solution and Normality

Here, we discuss the existence of an admissible solution, the existence of an optimal solution, and normality of the optimality conditions. The existence of solution asserts the meaningfulness of our problem. The information extracted from necessary conditions will be of use to validate the numerical results. In order to guarantee that there exists an admissible solution, we have to guarantee that we start at a feasible state and that the maximum flow of incoming water is sufficient to satisfy the needs of the crop throughout the year. We show that, in these conditions, we can also guarantee the existence of an optimal solution to the OCP and that the necessary optimality conditions for this problem can be written in a normal form.Existence of solution was introduced by Tonelli [11] when he proposed the first theorem of existence of solution for calculus of variations problems. Even today, Tonelli’s theorem remains the central existence theorem for dynamic problems, although the hypotheses of the theorem can be relaxed: see, for example, [12]. In this section, we apply theorem 23.10 in [4] to guarantee the existence of solution for our OCP. Moreover, we also verify that our problem satisfies the constraint qualification that allows writing the Maximum Principle (MP) in the normal form: the multiplier associated with the objective function λ is not zero (see [13, 14] for discussion of normal forms of the MP for optimal control problems with state constraints).Normal forms of the Maximum Principle can be established if the problem satisfies suitable constraint qualification [13–15]. In this section, we verify that constraint qualification in [14] is satisfied for our problem.Let functionH represent the unmaximized Hamiltonian function:(2)
H
t
,
x
,
p
,
u
,
λ
=
p
u
+
g
t
-
β
x
-
λ
u
,where p and λ are multipliers.We note that the functiong is mensurable.Proposition 1 (existence of solution and normality).
Ifx
0
≥
x
min
⁡ and M
≥
β
x
(
t
)
-
g
(
t
) for all t
∈
[
0
,
T
], then(i)
there exits an admissible solution;
(ii)
there exists an optimal solution;
(iii)
the Maximum Principle can be written withλ
=
1.Proof.
Existence of an Admissible Solution. It is easier to see that an admissible solution to OCP is (3)
x
t
,
u
t
=
∫
0
t
v
s
d
s
+
x
0
,
M
,where v
(
t
)
=
M
+
g
(
t
)
-
β
x
(
t
).
We note that sinceM
≥
β
x
(
t
)
-
g
(
t
), then v
(
t
)
≥
0. As x
0
≥
x
m
i
n, then x
(
t
)
≥
x
m
i
n.
Existence of an Optimal Solution. Let us verify the conditions of theorem 23.10 in [4]; see Theorem A.1 (in Appendix).
To apply theorem 23.10, the OCP is written as follows:
O
C
P
m is as follows: (4)
min
⁡
y
T
subject to:
x
˙
t
=
f
t
,
x
t
,
u
t
a.e.
t
∈
0
,
T
y
˙
t
=
u
t
a.e.
t
∈
0
,
T
x
t
∈
x
m
i
n
,
+
∞
∀
t
∈
0
,
T
u
t
∈
0
,
M
a.e
.
x
0
=
x
0
y
0
=
0
,where f
(
t
,
x
,
u
)
=
u
+
g
(
t
)
-
β
x.
Let us verify the conditions of theorem 23.10 toO
C
P
m:(i)
The dynamic function(
u
+
g
(
t
)
-
β
x
,
u
) is continuous with respect to the states and control variable and measurable in t.
(ii)
Ω
=
[
0
,
M
] is a compact set.
(iii)
In this condition, we have to verify that there is a summable functionN such that x
∈
x
min
⁡
,
+
∞
,
u
∈
0
,
M
⇒:(5)
u
+
g
t
-
β
x
,
u
2
≤
N
t
1
+
x
,
y
2
.
We note that(
u
+
g
(
t
)
-
β
x
,
u
)
2
≤
2
|
u
|
+
|
g
(
t
)
|
+
|
β
x
|.
Asu
∈
[
0
,
M
] and g is a continuous function on [
0
,
T
], then (6)
u
+
g
t
-
β
x
,
u
2
≤
P
+
β
x
.
LetP
¯
=
m
a
x
{
P
,
|
β
|
}; then (7)
u
+
g
t
-
β
x
,
u
2
≤
P
¯
1
+
x
≤
P
¯
1
+
x
,
y
2
.
(iv)
For eachx
∈
[
x
m
i
n
,
+
∞
[ and y, the set (
u
+
g
(
t
)
-
β
x
,
u
)
:
u
∈
[
0
,
M
] is convex.
(v)
The setsQ
=
[
x
m
i
n
,
+
∞
[ and E
=
{
(
x
0
,
0
)
}
×
R
×
R are closed and the cost function is continuous.
(vi)
The set{
(
x
0
,
0
)
} is bounded.
The assumptions of theorem 23.10 in [4] are verified; therefore there exists one admissible (
x
,
u
) for OCP with a finite value on the cost functional; then there is a solution to OCP.
The Maximum Principle Can Be Written with
λ
=
1. In Rampazzo and Vinter [14], the MP can be written with λ
=
1, if there exists continuous feedback u
=
η
(
t
,
ξ
) such that(8)
d
h
ξ
t
d
t
=
h
t
t
,
ξ
+
h
x
t
,
ξ
·
f
t
,
ξ
,
η
t
,
ξ
<
-
γ
′for some positive γ
′, whenever (
t
,
ξ
) is close to the graph of the optimal trajectory, x
¯
(
·
), and ξ is near to the state constraint boundary. There should exist a control (flow of water provided by the irrigation systems) pulling the state variable away from the state constraint boundary (this guarantees that the crop survives).
In our problemh
(
x
)
=
x
m
i
n
-
x and, from (8), we write(9)
d
h
ξ
t
d
t
=
h
x
ξ
t
·
f
t
,
ξ
,
η
t
,
ξ
=
-
η
t
,
ξ
+
Δ
t
,
ξ
≤
-
γ
′
,where Δ
(
t
,
ξ
)
=
g
(
t
)
-
β
ξ. For ξ on a neighbourhood of x
¯, we can always choose η sufficiently large so that (9) is satisfied, as long as M
>
β
x
¯
(
t
)
-
g
(
t
), a condition we can impose with loss of generality.
Thus the inward pointing condition (9) is satisfied and normality follows.


### 2.2. Necessary Conditions

In this section, we apply the MP in the normal form.Proposition 2 (necessary conditions).
If the pair(
x
,
u
) is a minimizer for the OCP, then there exists an absolutely continuous function p and μ
∈
C
∗
(
0,1
) such that (10)
p
˙
t
=
β
q
t
,
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
,
supp
⁡
μ
⊂
t
∈
0
,
T
:
x
¯
t
=
x
min
⁡
,
q
T
=
0
,where q
(
t
) is defined as follows: (11)
q
t
=
p
t
-
∫
0
,
t
μ
d
s
,
t
∈
0
,
T
p
T
-
∫
0
,
T
μ
d
s
,
t
=
T
.Proof.
A known form of the normal MP for smooth problems with state constraints [1, 3, 15] is as follows.
Let(
x
¯
,
u
¯
) be a minimizer for OCP. Then there exists an absolutely continuous function p and μ
∈
C
∗
(
0,1
) such that(12)
-
p
˙
t
=
H
x
t
,
x
¯
t
,
q
t
,
u
¯
t
,
1
,
H
t
,
x
¯
t
,
q
t
,
u
¯
t
,
1
=
max
v
∈
0
,
M
⁡
H
t
,
x
¯
t
,
q
t
,
v
,
1
a.e.
;
supp
⁡
μ
⊂
t
∈
0
,
T
:
h
x
¯
t
=
0
,
q
T
=
0
.
Applying these conditions to our problem, we have(13)
p
˙
t
=
β
q
t
,
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
,
supp
⁡
μ
⊂
t
∈
0
,
T
:
x
¯
t
=
x
min
⁡
,
q
T
=
0
.


### 2.3. Characterization

Now, we characterize the optimal solution for OCP studying the Weierstrass condition of the MP foru
¯
=
0, u
¯
=
M, and u
¯
∈
0
,
M.Proposition 3 (characterization of the optimal solution).
Letu
¯ be the optimal control to OCP and let q be the multiplier associated with the dynamic function on the MP. Then the bounded variation function q in Proposition 2 satisfies (14)
q
t
≤
1
i
f
u
¯
=
0
,
q
t
≥
1
i
f
u
¯
=
M
,
q
t
=
1
i
f
u
¯
∈
0
,
M
.Proof.
Ifu
¯
=
0, we have that, for all u
(
t
)
∈
[
0
,
M
], (15)
q
t
u
t
-
u
t
≤
0
⟺
q
t
≤
1
.
Ifu
¯
=
M, we have that, for all u
(
t
)
∈
[
0
,
M
], (16)
q
t
-
1
M
-
u
≥
0
⟺
q
t
≥
1
.
In the remaining case (i.e.,u
¯
∈
0
,
M), we have (17)
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
⟺
q
t
-
1
u
¯
t
-
u
t
≥
0
⟺
q
t
=
1
.We will use all the above information to validate the numerical solution (already presented in [7]) of our problem. In order to obtain this numerical solution, we consider next a discretized version of our problem.


## 2.1. Existence of Solution and Normality

Here, we discuss the existence of an admissible solution, the existence of an optimal solution, and normality of the optimality conditions. The existence of solution asserts the meaningfulness of our problem. The information extracted from necessary conditions will be of use to validate the numerical results. In order to guarantee that there exists an admissible solution, we have to guarantee that we start at a feasible state and that the maximum flow of incoming water is sufficient to satisfy the needs of the crop throughout the year. We show that, in these conditions, we can also guarantee the existence of an optimal solution to the OCP and that the necessary optimality conditions for this problem can be written in a normal form.Existence of solution was introduced by Tonelli [11] when he proposed the first theorem of existence of solution for calculus of variations problems. Even today, Tonelli’s theorem remains the central existence theorem for dynamic problems, although the hypotheses of the theorem can be relaxed: see, for example, [12]. In this section, we apply theorem 23.10 in [4] to guarantee the existence of solution for our OCP. Moreover, we also verify that our problem satisfies the constraint qualification that allows writing the Maximum Principle (MP) in the normal form: the multiplier associated with the objective function λ is not zero (see [13, 14] for discussion of normal forms of the MP for optimal control problems with state constraints).Normal forms of the Maximum Principle can be established if the problem satisfies suitable constraint qualification [13–15]. In this section, we verify that constraint qualification in [14] is satisfied for our problem.Let functionH represent the unmaximized Hamiltonian function:(2)
H
t
,
x
,
p
,
u
,
λ
=
p
u
+
g
t
-
β
x
-
λ
u
,where p and λ are multipliers.We note that the functiong is mensurable.Proposition 1 (existence of solution and normality).
Ifx
0
≥
x
min
⁡ and M
≥
β
x
(
t
)
-
g
(
t
) for all t
∈
[
0
,
T
], then(i)
there exits an admissible solution;
(ii)
there exists an optimal solution;
(iii)
the Maximum Principle can be written withλ
=
1.Proof.
Existence of an Admissible Solution. It is easier to see that an admissible solution to OCP is (3)
x
t
,
u
t
=
∫
0
t
v
s
d
s
+
x
0
,
M
,where v
(
t
)
=
M
+
g
(
t
)
-
β
x
(
t
).
We note that sinceM
≥
β
x
(
t
)
-
g
(
t
), then v
(
t
)
≥
0. As x
0
≥
x
m
i
n, then x
(
t
)
≥
x
m
i
n.
Existence of an Optimal Solution. Let us verify the conditions of theorem 23.10 in [4]; see Theorem A.1 (in Appendix).
To apply theorem 23.10, the OCP is written as follows:
O
C
P
m is as follows: (4)
min
⁡
y
T
subject to:
x
˙
t
=
f
t
,
x
t
,
u
t
a.e.
t
∈
0
,
T
y
˙
t
=
u
t
a.e.
t
∈
0
,
T
x
t
∈
x
m
i
n
,
+
∞
∀
t
∈
0
,
T
u
t
∈
0
,
M
a.e
.
x
0
=
x
0
y
0
=
0
,where f
(
t
,
x
,
u
)
=
u
+
g
(
t
)
-
β
x.
Let us verify the conditions of theorem 23.10 toO
C
P
m:(i)
The dynamic function(
u
+
g
(
t
)
-
β
x
,
u
) is continuous with respect to the states and control variable and measurable in t.
(ii)
Ω
=
[
0
,
M
] is a compact set.
(iii)
In this condition, we have to verify that there is a summable functionN such that x
∈
x
min
⁡
,
+
∞
,
u
∈
0
,
M
⇒:(5)
u
+
g
t
-
β
x
,
u
2
≤
N
t
1
+
x
,
y
2
.
We note that(
u
+
g
(
t
)
-
β
x
,
u
)
2
≤
2
|
u
|
+
|
g
(
t
)
|
+
|
β
x
|.
Asu
∈
[
0
,
M
] and g is a continuous function on [
0
,
T
], then (6)
u
+
g
t
-
β
x
,
u
2
≤
P
+
β
x
.
LetP
¯
=
m
a
x
{
P
,
|
β
|
}; then (7)
u
+
g
t
-
β
x
,
u
2
≤
P
¯
1
+
x
≤
P
¯
1
+
x
,
y
2
.
(iv)
For eachx
∈
[
x
m
i
n
,
+
∞
[ and y, the set (
u
+
g
(
t
)
-
β
x
,
u
)
:
u
∈
[
0
,
M
] is convex.
(v)
The setsQ
=
[
x
m
i
n
,
+
∞
[ and E
=
{
(
x
0
,
0
)
}
×
R
×
R are closed and the cost function is continuous.
(vi)
The set{
(
x
0
,
0
)
} is bounded.
The assumptions of theorem 23.10 in [4] are verified; therefore there exists one admissible (
x
,
u
) for OCP with a finite value on the cost functional; then there is a solution to OCP.
The Maximum Principle Can Be Written with
λ
=
1. In Rampazzo and Vinter [14], the MP can be written with λ
=
1, if there exists continuous feedback u
=
η
(
t
,
ξ
) such that(8)
d
h
ξ
t
d
t
=
h
t
t
,
ξ
+
h
x
t
,
ξ
·
f
t
,
ξ
,
η
t
,
ξ
<
-
γ
′for some positive γ
′, whenever (
t
,
ξ
) is close to the graph of the optimal trajectory, x
¯
(
·
), and ξ is near to the state constraint boundary. There should exist a control (flow of water provided by the irrigation systems) pulling the state variable away from the state constraint boundary (this guarantees that the crop survives).
In our problemh
(
x
)
=
x
m
i
n
-
x and, from (8), we write(9)
d
h
ξ
t
d
t
=
h
x
ξ
t
·
f
t
,
ξ
,
η
t
,
ξ
=
-
η
t
,
ξ
+
Δ
t
,
ξ
≤
-
γ
′
,where Δ
(
t
,
ξ
)
=
g
(
t
)
-
β
ξ. For ξ on a neighbourhood of x
¯, we can always choose η sufficiently large so that (9) is satisfied, as long as M
>
β
x
¯
(
t
)
-
g
(
t
), a condition we can impose with loss of generality.
Thus the inward pointing condition (9) is satisfied and normality follows.


## 2.2. Necessary Conditions

In this section, we apply the MP in the normal form.Proposition 2 (necessary conditions).
If the pair(
x
,
u
) is a minimizer for the OCP, then there exists an absolutely continuous function p and μ
∈
C
∗
(
0,1
) such that (10)
p
˙
t
=
β
q
t
,
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
,
supp
⁡
μ
⊂
t
∈
0
,
T
:
x
¯
t
=
x
min
⁡
,
q
T
=
0
,where q
(
t
) is defined as follows: (11)
q
t
=
p
t
-
∫
0
,
t
μ
d
s
,
t
∈
0
,
T
p
T
-
∫
0
,
T
μ
d
s
,
t
=
T
.Proof.
A known form of the normal MP for smooth problems with state constraints [1, 3, 15] is as follows.
Let(
x
¯
,
u
¯
) be a minimizer for OCP. Then there exists an absolutely continuous function p and μ
∈
C
∗
(
0,1
) such that(12)
-
p
˙
t
=
H
x
t
,
x
¯
t
,
q
t
,
u
¯
t
,
1
,
H
t
,
x
¯
t
,
q
t
,
u
¯
t
,
1
=
max
v
∈
0
,
M
⁡
H
t
,
x
¯
t
,
q
t
,
v
,
1
a.e.
;
supp
⁡
μ
⊂
t
∈
0
,
T
:
h
x
¯
t
=
0
,
q
T
=
0
.
Applying these conditions to our problem, we have(13)
p
˙
t
=
β
q
t
,
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
,
supp
⁡
μ
⊂
t
∈
0
,
T
:
x
¯
t
=
x
min
⁡
,
q
T
=
0
.


## 2.3. Characterization

Now, we characterize the optimal solution for OCP studying the Weierstrass condition of the MP foru
¯
=
0, u
¯
=
M, and u
¯
∈
0
,
M.Proposition 3 (characterization of the optimal solution).
Letu
¯ be the optimal control to OCP and let q be the multiplier associated with the dynamic function on the MP. Then the bounded variation function q in Proposition 2 satisfies (14)
q
t
≤
1
i
f
u
¯
=
0
,
q
t
≥
1
i
f
u
¯
=
M
,
q
t
=
1
i
f
u
¯
∈
0
,
M
.Proof.
Ifu
¯
=
0, we have that, for all u
(
t
)
∈
[
0
,
M
], (15)
q
t
u
t
-
u
t
≤
0
⟺
q
t
≤
1
.
Ifu
¯
=
M, we have that, for all u
(
t
)
∈
[
0
,
M
], (16)
q
t
-
1
M
-
u
≥
0
⟺
q
t
≥
1
.
In the remaining case (i.e.,u
¯
∈
0
,
M), we have (17)
q
t
u
¯
t
-
u
t
-
u
¯
t
-
u
t
≥
0
⟺
q
t
-
1
u
¯
t
-
u
t
≥
0
⟺
q
t
=
1
.We will use all the above information to validate the numerical solution (already presented in [7]) of our problem. In order to obtain this numerical solution, we consider next a discretized version of our problem.


## 3. Numerical Model for the Irrigation Problem

In this section, we obtain the numerical solution to our problem using sequence of finite dimensional nonlinear programming problems. From now on, we consider the following corresponding discrete-time model:OCPN is as follows:(18)
min
⁡
θ
∑
i
=
0
N
-
1
u
i
s.t.:
x
i
+
1
=
x
i
+
θ
F
t
i
,
x
i
,
u
i
,
a.e.
i
=
0
,
…
,
N
-
1
x
i
≥
x
min
⁡
,
i
=
0
,
…
,
N
u
i
∈
0
,
M
,
a.e.
i
=
0
,
…
,
N
-
1
x
0
=
a
,where x is the trajectory, u is the control, F is balance water function, x
m
i
n is the hydrological need of the crop, a is an initial state, θ is the time step discretization, and N
=
12
/
θ. The dynamic equation implements the water balance in the soil:(19)
F
t
i
,
x
i
,
u
i
=
u
i
+
rainfall
t
i
-
evapotranspiration
t
i
-
losses
x
i
,where the evapotranspiration is the evaporation of the soil and the transpiration of the crop and the losses are the losses of water due to the runoff and deep infiltration. The rainfall, evapotranspiration, and losses models are described next, as presented in [10].


### 3.1. Rainfall Models

To estimate rainfall, we use the monthly rainfall data from Instituto Português do Mar e da Atmosfera (http://www.meteo.pt/), in the Lisbon area. We defined average (using the 10-year data) rainfall for each month of the year; the rain monthly average is as follows:(20)
J
F
M
A
M
J
J
A
S
O
N
D
111.4
94.7
80.2
57.1
29.62
18.84
1.26
7.04
30.6
127
121.98
119.3
×
10
-
3
m
3
/
m
o
n
t
h
.To create the possibility of different weather scenarios, therain monthly average is multiplied by aprecipitation factor. That means (21)
rainfall
1
t
i
=
precipitation factor
×
rain monthly average
t
i
,where the precipitation factor allows us to consider a typical year if this factor is 1, a drought year if it is less than 1, and a rainy year if it is above 1. This model is based on rain monthly average, so it is interesting if we are solving the yearly problem, for instance, if we want to design a reservoir [6] that can provide the necessary amount of water to our culture.


### 3.2. Evapotranspiration Model

We used the Pennman-Monteith methodology [16] to calculate evapotranspiration of our culture along the year. In order to do so, we use the following formulation: (22)
E
T
t
i
=
K
c
E
T
0
t
i
,where K
c
=
0.825 is the culture coefficient for the evapotranspiration (in our case potatoes) and E
T
0 is the tabulated reference value of evapotranspiration that we consulted in [3] for the Lisbon region. The evapotranspiration of our culture in Lisbon is given by the following table: (23)
J
F
M
A
M
J
J
A
S
O
N
D
19.8
28.0
55.27
89.1
116.32
137.77
155.92
136.95
84.97
53.62
22.27
16.5
×
10
-
3
m
3
/
m
o
n
t
h
.


### 3.3. Modeling “Losses” of Water

Our model of infiltration is based on the postulate of Horton’s equation that says that infiltration decreases exponentially with time [17]. That means the dynamical equation is(24)
x
i
+
1
=
x
i
+
θ
g
t
i
,
u
i
-
β
x
i
,where g
(
t
i
,
u
i
)
=
u
i
+
r
a
i
n
f
a
l
l
(
t
i
)
-
e
v
a
p
o
t
r
a
n
s
p
i
r
a
t
i
o
n
(
t
i
). Note that we have a first-order linear ordinary differential equation with integrating factor equal to e
β
t.From (19) and (24), one may say that l
o
s
s
e
s
(
t
i
)
=
β
x
(
t
i
), where β depends on the type of soil.


### 3.4. Results and Validation

We consider a field of potatoes in the region of Lisbon, Portugal. We assume that(25)
x
min
⁡
=
0.56
12
m
3
/
month
,
T
=
12
,
x
0
=
4
x
min
⁡
m
3
/
month
,
β
=
15
%
,
M
=
1
m
3
/
month
.To obtain the numerical solution for the optimal control problem we have approximated the problem by a sequence of finite dimensional nonlinear programming problems (see [18]).To implement this optimization problem, we usefmincon function of MatLab with the algorithm “active set,” by default, and the parameter “Tolfun” is considered 1
E
-
6. The numerical solution and the expected multipliers are plotted in Figure 1.Figure 1
Numerical solution.Note that the green line represents the hydrological need of the crop.It can be seen that the value of the optimal amount of water in the soil stays at the minimum allowed value from June till September. The irrigation should start in May; the maximum value is in June and stops in September. The water needs are 0.4612m
3
/
y
e
a
r. The code produces results that are according to what is expected for this region [3].We can observe that(26)
q
t
≤
1
if
u
¯
=
0
,
q
t
=
1
if
u
¯
∈
0,1and since u
¯ is never equal to 1, q is never greater than 1, as expected from Section 3.3. From here, we can say that although the analytical explicit solution was not obtained, the numerical solution fulfils the necessary optimality conditions.Our numerical findings suggest that the trajectory has a “boundary interval”[
t
i
n
,
t
o
u
t
], with t
i
n
>
0 and t
o
u
t
<
12 (i.e., x
¯
(
t
)
=
x
m
i
n for all t
∈
[
t
i
n
,
t
o
u
t
] and x
¯
(
t
)
≠
x
m
i
n for t
∉
[
t
i
n
,
t
o
u
t
]) and that q is absolutely continuous function excepted at t
o
u
t where it exhibits a jump. Taking these information into account we now get an analytical characterization of the solution and q multiplier.Step 1 (h
(
x
¯
(
t
)
)
<
0 for t
∈
t
o
u
t
,
12).
Since the inequality constraint is not active, thenp
(
t
)
=
q
(
t
). Thus we most have p
(
12
)
=
0 and since p
˙
(
t
)
=
β
p
(
t
), by the adjoint equation of the MP, we can conclude that p
(
t
)
=
q
(
t
)
=
0.
Applying the Weierstrass condition of MP, we getu
¯
≤
u,  ∀
u
∈
[
0
,
M
]. Thus u
¯
=
0.
Replacingu
¯ by zero in the dynamics, we have (27)
x
¯
˙
t
=
g
t
-
β
x
¯
t
.
Asx
¯
(
t
o
u
t
)
=
x
m
i
n, then x
¯
(
t
)
=
e
-
β
(
t
-
t
o
u
t
)
∫
t
o
u
t
t
e
β
(
s
-
t
o
u
t
)
g
(
s
)
d
s
+
x
m
i
n, for t
∈
]
t
o
u
t
,
12
].
Therefore(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
e
-
β
(
t
-
t
o
u
t
)
∫
t
o
u
t
t
e
β
(
s
-
t
o
u
t
)
g
(
s
)
d
s
+
x
m
i
n
,
0
) and q
(
t
)
=
0, for t
∈
]
t
o
u
t
,
12
].Step 2 (h
(
x
¯
(
t
)
)
=
0 for t
∈
[
t
i
n
,
t
o
u
t
]).
As fort
∈
[
t
in
,
t
o
u
t
]: h
(
x
¯
(
t
)
)
=
0, we have x
¯
(
t
)
=
x
m
i
n. Therefore (28)
x
¯
˙
t
=
0
⟺
u
¯
t
=
-
g
t
+
β
x
min
⁡
.
And we may conclude that(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
x
m
i
n
,
-
g
(
t
)
+
β
x
m
i
n
) for t
∈
]
t
i
n
,
t
o
u
t
[.
Sinceu
¯
(
t
)
>
0 for t
∈
]
t
i
n
,
t
o
u
t
[, then by the MP we also conclude that q
(
t
)
=
1, t
∈
t
i
n
,
t
o
u
t.Step 3 (h
(
x
¯
(
t
)
)
<
0 for t
∈
0
,
t
i
n).
Sinceh
(
x
¯
(
t
)
)
<
0, then p
(
t
)
=
q
(
t
). Again, as p
(
t
i
n
)
=
1 and p
˙
(
t
)
=
β
p
(
t
), by the adjoint equation of the MP, we can conclude that p
(
t
)
=
q
(
t
)
=
e
β
(
t
-
t
i
n
).
On the other handp
(
t
)
=
q
(
t
)
<
1; then by Weierstrass condition we get u
¯
≤
u,  ∀
u
∈
[
0
,
M
]. Therefore u
¯
=
0.
Consequently, our dynamics is written as follows:(29)
x
¯
˙
t
=
g
t
-
β
x
¯
t
.
Sincex
¯
(
0
)
=
x
0, then x
¯
(
t
)
=
e
-
β
t
∫
0
t
e
β
s
g
(
s
)
d
s
+
x
0, for t
∈
[
0
,
t
i
n
[.
Therefore(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
e
-
β
t
∫
0
t
e
β
s
g
(
s
)
d
s
+
x
0
,
0
) and q
(
t
)
=
e
β
(
t
-
t
i
n
), for t
∈
[
0
,
t
i
n
[.Briefly,(30)
x
¯
t
=
e
-
β
t
∫
0
t
e
β
s
g
s
d
s
+
x
0
t
∈
0
,
t
in
x
min
⁡
t
∈
t
in
,
t
out
e
-
β
t
-
t
out
∫
t
out
t
e
β
s
-
t
out
g
s
d
s
+
x
min
⁡
t
∈
t
out
,
12
,
u
¯
t
=
0
t
∈
0
,
t
in
-
g
t
+
β
x
min
⁡
t
∈
t
in
,
t
out
0
t
∈
t
out
,
12
,
q
t
=
e
β
t
-
t
in
t
∈
0
,
t
in
1
t
∈
t
in
,
t
out
0
t
∈
t
out
,
12
.In Figure2, we plot the numerical and analytical solution obtained. We confirm that the numerical solution agrees with the results shown in Section 3. The analytical and estimated results of trajectory, control, and multipliers coincide.Figure 2
(a) Numerical and analytical solution for the trajectory and control. (b) Estimated and analytical multipliers.
(a)
(b)


### 3.5. Replan

In the previous section, we have computed optimal yearly planning for the needs of water. However, such planning is open-loop, meaning that the input used the prediction for the rainfall along the year as known in the beginning of the year. As we advance through the year, knowledge of the effective past rainfall and a better prediction of the rainfall for the coming months is available. In this section we propose to use this newly available knowledge by resolving the optimal control problem at each month using the new rainfall information, in a receding horizon framework.In fact, due to the unpredictability of weather conditions, the numerical model presented in the previous section may not provide the real needs of water for the crop. If we have an atypical year, values obtained by the rainfall model may be a lot different from reality, meaning that there is a high probability that the results obtained may not properly describe the reality (if we use as input in our previous model the effective rainfall in each month, the estimated irrigation needs may be higher than if we use as input the rainfall model proposed in Section3.1).In Figure3 we show the results for the years 2004 and 2005 which were severe drought years in Portugal.Figure 3
Solutions obtained for the years 2004 and 2005.
(a)
(b)For the year 2004, if we look at real data, one can see that the irrigation should start in the mid-April. Using the rainfall as input, the irrigation should start in May. The total amount of water used estimated using the rainfall model is0.4612
m
3
/
y
e
a
r and the real amount of water needed would be 0.5124
m
3
/
y
e
a
r.For the year 2005 if we look at real data, one can see that the irrigation should start in the beginning of March. Using the rainfall model as input, the irrigation should start in May. The real amount of water needed would be0.6814
m
3
/
y
e
a
r.This is due to the unpredictability of the weather. The rainfall was much different from the expected, and, as a consequence, in such a scenario the proposed model would fail.To overcome this drawback, we propose replan strategy: see Figure4. To replan the systems we use model predictive control techniques. The predictive control technique generates a feedback strategy by solving a sequence of open-loop optimal control problems. In terms of the problem, this means that the irrigation strategy is frequently recomputed (replan) every time taking into account the measured system variable (previous pluviosity). In our case, we determine the optimal solution based on the OCPN and then at every time step we recalculate a new dynamic based on real data for rainfall.Figure 4
Replan strategy.We test the replan model for the last ten years and we observe that state constraint is violated in the years 2003, 2005, 2007, 2008, and 2009. For data of year 2005, the result obtained is described in Figure5.Figure 5
Results for the replan strategy for the year 2005 considering hard state constraints.To avoid violation of the state constraint (because of use of real data) an improved model had to be considered. In this new model, we use soft state constraints instead of hard state constraint. Therefore, we consider an optimal control problem with penalization in the cost function:(31)
min
⁡
θ
∑
i
=
0
N
-
1
u
i
-
w
v
i
s.t.:
x
i
+
1
=
x
i
+
θ
f
t
i
,
x
i
,
u
i
,
a.e.
i
=
0
,
…
,
N
-
1
u
i
≥
0
,
a.e.
i
=
0
,
…
,
N
-
1
x
0
=
a
.In this case(32)
w
v
i
=
0
if
v
i
≥
0
5
ln
⁡
v
i
+
1
otherwise
,where v
i
=
x
i
-
x
m
i
n
S
m. Note that the condition x
0
=
a is reused at each time step considering the real value of rainfall at that time step.Note thatS
m represents a safety margin that will guarantee that if weather conditions are very severe, the plant survives. In our case we consider =
1.3
S
m meaning that the amount of water necessary is 30
% above the plants’ needs. However, should time step be smaller, this safety margin may be reduced.Results for the improved replan strategy can be seen in Figure6.Figure 6
Results for the replan strategy for the year 2005 considering soft state constraints. (a) Optimal solution with replan; (b) optimal solution known prior to the rainfall.
(a)
(b)Figure6 shows that for the year 2005 the state constraint is not violated and the result is very close to the optimal solution obtained knowing the rainfall a priori. The water flow needs obtained knowing the rainfall a priori were 0.6803
m
3
/
y
e
a
r. The water flow needs estimation using the replan strategy was 0.6853
m
3
/
y
e
a
r. Similar results were observed for the remaining years.


## 3.1. Rainfall Models

To estimate rainfall, we use the monthly rainfall data from Instituto Português do Mar e da Atmosfera (http://www.meteo.pt/), in the Lisbon area. We defined average (using the 10-year data) rainfall for each month of the year; the rain monthly average is as follows:(20)
J
F
M
A
M
J
J
A
S
O
N
D
111.4
94.7
80.2
57.1
29.62
18.84
1.26
7.04
30.6
127
121.98
119.3
×
10
-
3
m
3
/
m
o
n
t
h
.To create the possibility of different weather scenarios, therain monthly average is multiplied by aprecipitation factor. That means (21)
rainfall
1
t
i
=
precipitation factor
×
rain monthly average
t
i
,where the precipitation factor allows us to consider a typical year if this factor is 1, a drought year if it is less than 1, and a rainy year if it is above 1. This model is based on rain monthly average, so it is interesting if we are solving the yearly problem, for instance, if we want to design a reservoir [6] that can provide the necessary amount of water to our culture.


## 3.2. Evapotranspiration Model

We used the Pennman-Monteith methodology [16] to calculate evapotranspiration of our culture along the year. In order to do so, we use the following formulation: (22)
E
T
t
i
=
K
c
E
T
0
t
i
,where K
c
=
0.825 is the culture coefficient for the evapotranspiration (in our case potatoes) and E
T
0 is the tabulated reference value of evapotranspiration that we consulted in [3] for the Lisbon region. The evapotranspiration of our culture in Lisbon is given by the following table: (23)
J
F
M
A
M
J
J
A
S
O
N
D
19.8
28.0
55.27
89.1
116.32
137.77
155.92
136.95
84.97
53.62
22.27
16.5
×
10
-
3
m
3
/
m
o
n
t
h
.


## 3.3. Modeling “Losses” of Water

Our model of infiltration is based on the postulate of Horton’s equation that says that infiltration decreases exponentially with time [17]. That means the dynamical equation is(24)
x
i
+
1
=
x
i
+
θ
g
t
i
,
u
i
-
β
x
i
,where g
(
t
i
,
u
i
)
=
u
i
+
r
a
i
n
f
a
l
l
(
t
i
)
-
e
v
a
p
o
t
r
a
n
s
p
i
r
a
t
i
o
n
(
t
i
). Note that we have a first-order linear ordinary differential equation with integrating factor equal to e
β
t.From (19) and (24), one may say that l
o
s
s
e
s
(
t
i
)
=
β
x
(
t
i
), where β depends on the type of soil.


## 3.4. Results and Validation

We consider a field of potatoes in the region of Lisbon, Portugal. We assume that(25)
x
min
⁡
=
0.56
12
m
3
/
month
,
T
=
12
,
x
0
=
4
x
min
⁡
m
3
/
month
,
β
=
15
%
,
M
=
1
m
3
/
month
.To obtain the numerical solution for the optimal control problem we have approximated the problem by a sequence of finite dimensional nonlinear programming problems (see [18]).To implement this optimization problem, we usefmincon function of MatLab with the algorithm “active set,” by default, and the parameter “Tolfun” is considered 1
E
-
6. The numerical solution and the expected multipliers are plotted in Figure 1.Figure 1
Numerical solution.Note that the green line represents the hydrological need of the crop.It can be seen that the value of the optimal amount of water in the soil stays at the minimum allowed value from June till September. The irrigation should start in May; the maximum value is in June and stops in September. The water needs are 0.4612m
3
/
y
e
a
r. The code produces results that are according to what is expected for this region [3].We can observe that(26)
q
t
≤
1
if
u
¯
=
0
,
q
t
=
1
if
u
¯
∈
0,1and since u
¯ is never equal to 1, q is never greater than 1, as expected from Section 3.3. From here, we can say that although the analytical explicit solution was not obtained, the numerical solution fulfils the necessary optimality conditions.Our numerical findings suggest that the trajectory has a “boundary interval”[
t
i
n
,
t
o
u
t
], with t
i
n
>
0 and t
o
u
t
<
12 (i.e., x
¯
(
t
)
=
x
m
i
n for all t
∈
[
t
i
n
,
t
o
u
t
] and x
¯
(
t
)
≠
x
m
i
n for t
∉
[
t
i
n
,
t
o
u
t
]) and that q is absolutely continuous function excepted at t
o
u
t where it exhibits a jump. Taking these information into account we now get an analytical characterization of the solution and q multiplier.Step 1 (h
(
x
¯
(
t
)
)
<
0 for t
∈
t
o
u
t
,
12).
Since the inequality constraint is not active, thenp
(
t
)
=
q
(
t
). Thus we most have p
(
12
)
=
0 and since p
˙
(
t
)
=
β
p
(
t
), by the adjoint equation of the MP, we can conclude that p
(
t
)
=
q
(
t
)
=
0.
Applying the Weierstrass condition of MP, we getu
¯
≤
u,  ∀
u
∈
[
0
,
M
]. Thus u
¯
=
0.
Replacingu
¯ by zero in the dynamics, we have (27)
x
¯
˙
t
=
g
t
-
β
x
¯
t
.
Asx
¯
(
t
o
u
t
)
=
x
m
i
n, then x
¯
(
t
)
=
e
-
β
(
t
-
t
o
u
t
)
∫
t
o
u
t
t
e
β
(
s
-
t
o
u
t
)
g
(
s
)
d
s
+
x
m
i
n, for t
∈
]
t
o
u
t
,
12
].
Therefore(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
e
-
β
(
t
-
t
o
u
t
)
∫
t
o
u
t
t
e
β
(
s
-
t
o
u
t
)
g
(
s
)
d
s
+
x
m
i
n
,
0
) and q
(
t
)
=
0, for t
∈
]
t
o
u
t
,
12
].Step 2 (h
(
x
¯
(
t
)
)
=
0 for t
∈
[
t
i
n
,
t
o
u
t
]).
As fort
∈
[
t
in
,
t
o
u
t
]: h
(
x
¯
(
t
)
)
=
0, we have x
¯
(
t
)
=
x
m
i
n. Therefore (28)
x
¯
˙
t
=
0
⟺
u
¯
t
=
-
g
t
+
β
x
min
⁡
.
And we may conclude that(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
x
m
i
n
,
-
g
(
t
)
+
β
x
m
i
n
) for t
∈
]
t
i
n
,
t
o
u
t
[.
Sinceu
¯
(
t
)
>
0 for t
∈
]
t
i
n
,
t
o
u
t
[, then by the MP we also conclude that q
(
t
)
=
1, t
∈
t
i
n
,
t
o
u
t.Step 3 (h
(
x
¯
(
t
)
)
<
0 for t
∈
0
,
t
i
n).
Sinceh
(
x
¯
(
t
)
)
<
0, then p
(
t
)
=
q
(
t
). Again, as p
(
t
i
n
)
=
1 and p
˙
(
t
)
=
β
p
(
t
), by the adjoint equation of the MP, we can conclude that p
(
t
)
=
q
(
t
)
=
e
β
(
t
-
t
i
n
).
On the other handp
(
t
)
=
q
(
t
)
<
1; then by Weierstrass condition we get u
¯
≤
u,  ∀
u
∈
[
0
,
M
]. Therefore u
¯
=
0.
Consequently, our dynamics is written as follows:(29)
x
¯
˙
t
=
g
t
-
β
x
¯
t
.
Sincex
¯
(
0
)
=
x
0, then x
¯
(
t
)
=
e
-
β
t
∫
0
t
e
β
s
g
(
s
)
d
s
+
x
0, for t
∈
[
0
,
t
i
n
[.
Therefore(
x
¯
(
t
)
,
u
¯
(
t
)
)
=
(
e
-
β
t
∫
0
t
e
β
s
g
(
s
)
d
s
+
x
0
,
0
) and q
(
t
)
=
e
β
(
t
-
t
i
n
), for t
∈
[
0
,
t
i
n
[.Briefly,(30)
x
¯
t
=
e
-
β
t
∫
0
t
e
β
s
g
s
d
s
+
x
0
t
∈
0
,
t
in
x
min
⁡
t
∈
t
in
,
t
out
e
-
β
t
-
t
out
∫
t
out
t
e
β
s
-
t
out
g
s
d
s
+
x
min
⁡
t
∈
t
out
,
12
,
u
¯
t
=
0
t
∈
0
,
t
in
-
g
t
+
β
x
min
⁡
t
∈
t
in
,
t
out
0
t
∈
t
out
,
12
,
q
t
=
e
β
t
-
t
in
t
∈
0
,
t
in
1
t
∈
t
in
,
t
out
0
t
∈
t
out
,
12
.In Figure2, we plot the numerical and analytical solution obtained. We confirm that the numerical solution agrees with the results shown in Section 3. The analytical and estimated results of trajectory, control, and multipliers coincide.Figure 2
(a) Numerical and analytical solution for the trajectory and control. (b) Estimated and analytical multipliers.
(a)
(b)


## 3.5. Replan

In the previous section, we have computed optimal yearly planning for the needs of water. However, such planning is open-loop, meaning that the input used the prediction for the rainfall along the year as known in the beginning of the year. As we advance through the year, knowledge of the effective past rainfall and a better prediction of the rainfall for the coming months is available. In this section we propose to use this newly available knowledge by resolving the optimal control problem at each month using the new rainfall information, in a receding horizon framework.In fact, due to the unpredictability of weather conditions, the numerical model presented in the previous section may not provide the real needs of water for the crop. If we have an atypical year, values obtained by the rainfall model may be a lot different from reality, meaning that there is a high probability that the results obtained may not properly describe the reality (if we use as input in our previous model the effective rainfall in each month, the estimated irrigation needs may be higher than if we use as input the rainfall model proposed in Section3.1).In Figure3 we show the results for the years 2004 and 2005 which were severe drought years in Portugal.Figure 3
Solutions obtained for the years 2004 and 2005.
(a)
(b)For the year 2004, if we look at real data, one can see that the irrigation should start in the mid-April. Using the rainfall as input, the irrigation should start in May. The total amount of water used estimated using the rainfall model is0.4612
m
3
/
y
e
a
r and the real amount of water needed would be 0.5124
m
3
/
y
e
a
r.For the year 2005 if we look at real data, one can see that the irrigation should start in the beginning of March. Using the rainfall model as input, the irrigation should start in May. The real amount of water needed would be0.6814
m
3
/
y
e
a
r.This is due to the unpredictability of the weather. The rainfall was much different from the expected, and, as a consequence, in such a scenario the proposed model would fail.To overcome this drawback, we propose replan strategy: see Figure4. To replan the systems we use model predictive control techniques. The predictive control technique generates a feedback strategy by solving a sequence of open-loop optimal control problems. In terms of the problem, this means that the irrigation strategy is frequently recomputed (replan) every time taking into account the measured system variable (previous pluviosity). In our case, we determine the optimal solution based on the OCPN and then at every time step we recalculate a new dynamic based on real data for rainfall.Figure 4
Replan strategy.We test the replan model for the last ten years and we observe that state constraint is violated in the years 2003, 2005, 2007, 2008, and 2009. For data of year 2005, the result obtained is described in Figure5.Figure 5
Results for the replan strategy for the year 2005 considering hard state constraints.To avoid violation of the state constraint (because of use of real data) an improved model had to be considered. In this new model, we use soft state constraints instead of hard state constraint. Therefore, we consider an optimal control problem with penalization in the cost function:(31)
min
⁡
θ
∑
i
=
0
N
-
1
u
i
-
w
v
i
s.t.:
x
i
+
1
=
x
i
+
θ
f
t
i
,
x
i
,
u
i
,
a.e.
i
=
0
,
…
,
N
-
1
u
i
≥
0
,
a.e.
i
=
0
,
…
,
N
-
1
x
0
=
a
.In this case(32)
w
v
i
=
0
if
v
i
≥
0
5
ln
⁡
v
i
+
1
otherwise
,where v
i
=
x
i
-
x
m
i
n
S
m. Note that the condition x
0
=
a is reused at each time step considering the real value of rainfall at that time step.Note thatS
m represents a safety margin that will guarantee that if weather conditions are very severe, the plant survives. In our case we consider =
1.3
S
m meaning that the amount of water necessary is 30
% above the plants’ needs. However, should time step be smaller, this safety margin may be reduced.Results for the improved replan strategy can be seen in Figure6.Figure 6
Results for the replan strategy for the year 2005 considering soft state constraints. (a) Optimal solution with replan; (b) optimal solution known prior to the rainfall.
(a)
(b)Figure6 shows that for the year 2005 the state constraint is not violated and the result is very close to the optimal solution obtained knowing the rainfall a priori. The water flow needs obtained knowing the rainfall a priori were 0.6803
m
3
/
y
e
a
r. The water flow needs estimation using the replan strategy was 0.6853
m
3
/
y
e
a
r. Similar results were observed for the remaining years.


## 4. Conclusion

Our problem consists in optimizing the use of water in irrigation of a farm field by means of optimal control with inequality constraints. We proposed minimizing the irrigation (control) so that the flow of water introduced in the soil (trajectory) fulfils the cultivation water requirements. The corresponding discrete problem was then formulated and the numerical solution obtained. In order to validate the numerical results, we characterized the solution analytically. We proved the existence of solution and we characterized the solution applying the necessary conditions of optimality in the form of the Maximum Principle. We conclude that the multiplierq
(
t
)
≤
1 when u
¯
<
M and q
(
t
)
=
1 when u
¯
>
0.From the numerical solution, we determinedt
i
n and t
o
u
t where the state constraints were active. With t
i
n and t
o
u
t we calculated the analytical solution. We observed that analytical and numerical results were very similar.Due to the weather unpredictability, rainfall estimation may be far from reality. In such a case, the results obtained may not be the best. In order to overcome this difficulty we implemented a replan strategy, considering soft state constraints. Even for a severe drought year like 2005, this new strategy produced good results.



---

*Source: 5076879-2016-06-06.xml*