Mathematical modelling of elevator optimization problem
$begingroup$
I have tried to model the following problem:
"An elevator has a vertical acceleration $u(t)$ at time . Passengers would like to move from the ground level at $0$ altitude to the $16th$ floor at altitude $50$ as fast as possible, but dislike fast acceleration. Suppose that the passenger’s time is valued at $a$ dollar per unit time and furthermore suppose that the passenger is willing to pay at a rate $b*u(t)^2$ dollar per unit time to avoid fast acceleration. Formulate the problem of determining the acceleration from the time the elevator starts ascending until it reaches $16th$ floor as an optimal control problem." But, I was stuck at some point, could you give any help to model this mathematically?
optimization mathematical-modeling
$endgroup$
add a comment |
$begingroup$
I have tried to model the following problem:
"An elevator has a vertical acceleration $u(t)$ at time . Passengers would like to move from the ground level at $0$ altitude to the $16th$ floor at altitude $50$ as fast as possible, but dislike fast acceleration. Suppose that the passenger’s time is valued at $a$ dollar per unit time and furthermore suppose that the passenger is willing to pay at a rate $b*u(t)^2$ dollar per unit time to avoid fast acceleration. Formulate the problem of determining the acceleration from the time the elevator starts ascending until it reaches $16th$ floor as an optimal control problem." But, I was stuck at some point, could you give any help to model this mathematically?
optimization mathematical-modeling
$endgroup$
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10
add a comment |
$begingroup$
I have tried to model the following problem:
"An elevator has a vertical acceleration $u(t)$ at time . Passengers would like to move from the ground level at $0$ altitude to the $16th$ floor at altitude $50$ as fast as possible, but dislike fast acceleration. Suppose that the passenger’s time is valued at $a$ dollar per unit time and furthermore suppose that the passenger is willing to pay at a rate $b*u(t)^2$ dollar per unit time to avoid fast acceleration. Formulate the problem of determining the acceleration from the time the elevator starts ascending until it reaches $16th$ floor as an optimal control problem." But, I was stuck at some point, could you give any help to model this mathematically?
optimization mathematical-modeling
$endgroup$
I have tried to model the following problem:
"An elevator has a vertical acceleration $u(t)$ at time . Passengers would like to move from the ground level at $0$ altitude to the $16th$ floor at altitude $50$ as fast as possible, but dislike fast acceleration. Suppose that the passenger’s time is valued at $a$ dollar per unit time and furthermore suppose that the passenger is willing to pay at a rate $b*u(t)^2$ dollar per unit time to avoid fast acceleration. Formulate the problem of determining the acceleration from the time the elevator starts ascending until it reaches $16th$ floor as an optimal control problem." But, I was stuck at some point, could you give any help to model this mathematically?
optimization mathematical-modeling
optimization mathematical-modeling
edited Jan 5 at 16:14
LinAlg
8,9611521
8,9611521
asked Jan 5 at 15:56
MSc. Student in NZMSc. Student in NZ
82
82
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10
add a comment |
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Penalize acceleration and time.
The minimization problem could be expressed as
$$
min_uint_0^T a + b cdot u^2(t) ; text{dt},
$$
as stated in the assignment.
The constraint is that you need to reach the $16^{text{th}}$ floor (or $50$ height units):
$$
50 = int_0^T int_0^T u(tau) ; text{d}tau text{dt}.
$$
You could as well reformulate the above by means of a system of linear ordinary differential equations.
Cost function stays the same, but constraints are
$$
left(
begin{array}{c}
dot{x}_1 \
dot{x}_2
end{array}
right)
=
left(
begin{array}{cc}
0 & 1 \
0 & 0
end{array}
right)
left(
begin{array}{c}
x_1 \
x_2
end{array}
right)
+
left(
begin{array}{c}
0 \
1 \
end{array}
right)
u,
$$
$$
x_1(T) = 50, x_2(T) = 0,
$$
with initial conditions $x_1(0) = x_2(0) = 0$.
Note that $x_1$ represents height, while $x_2$ represents velocity.
Assume a passenger pays 30 Cent for a moderate acceleration value and 10 Cent for traveling time.
Then it will take him 23 time units (say: seconds) to reach the $16^{text{th}}$ floor. The acceleration function $u$ that minimizes the cost function is
$$
u(t) = 0.57735 cdot (1 - 2t/T).
$$
For this particular problem, the solution is analytic.
The optimization problem you are dealing with has the following properties:
dynamic optimization variable - here: elevator acceleration - is a function of time $u(t)$
unbounded no restrictions opposed to $u(t)$
free end-time end-time $T$ is not fixed; it's part of the optimization problem to find it
end constraints we want the elevator to be in the $16^{text{th}}$ floor at end-time, and it should stop there: $x_1(T) = 50, ; x_2(T) = 0$.
In general, this kind of problem needs iterative/numeric treatment, i.e. there is no closed solution available. It can be solved using e.g. boundary value problem solvers (if you happen to have one at your disposal).
In this special case, an analytic treatment is possible.
The necessary first-order optimality conditions are
$$
begin{eqnarray}
tag{1}label{eqn.system}
dot{mathbf{x}} & = & Amathbf{x} + mathbf{b}u \
tag{2}label{eqn.lagrange}
dot{mathbf{lambda}} & = & -Amathbf{lambda} \
tag{3}label{eqn.algebraic}
0 & = & 2bu + mathbf{b}^T mathbf{lambda}
end{eqnarray},
$$
where $mathbf{lambda}(t) in mathbb{R}^2$ are Lagrange multipliers. This set of equations is obtained by partial derivation of the Hamiltonian.
Then, there are initial and end conditions
$$
x_1(0) = x_2(0) = x_2(T) = 0; ; x_1(T) = 50,
$$
and one transversal condition, due to free end-time:
$$
tag{4}label{eqn.transversal}
0 = a + u^2(T) + mathbf{lambda}(T)^T(Amathbf{x}(T) + mathbf{b}u(T)).
$$
You can solve this set of equations by
- substituting $u$ with $-lambda_2/(2b)$, using $eqref{eqn.algebraic}$,
- solve the decoupled odes in $eqref{eqn.lagrange}$ backwards in time to obtain $lambda_1 = text{const.}$, $lambda_2(t) = lambda_2(T) + lambda_1(T - t)$,
- solve the system odes in $eqref{eqn.system}$ to obtain $x_1(T)$, $x_2(T)$,
- form a set of three algebraic equations, nonlinear in $(lambda_1, lambda_2(T), T)$, using the results from step (3) and equation $eqref{eqn.transversal}$:
$$
begin{eqnarray}
0 & = & x_2(T) + (lambda_2(T)T + lambda_1T^2/2)/(2b), \
0 & = & x_1(T) + (lambda_2(T)T^2/2 + lambda_1T^3/3)/(2b), \
0 & = & a + bu^2(T) + lambda_1x_2(T) + lambda_2(T)u(T),
end{eqnarray}
$$
- apply a solver to find the zeros, where $(lambda_1, lambda_2(T), T)^{(0)} = (-0.1, 0.1, 10)$ will do as a first guess with $a = 0.1$, $b = 0.3$,
- put the pieces together to obtain
$$
u(t) = -lambda_2(t)/(2b) = (lambda_1(t-T) - lambda_2(T))/(2b) = u_0 cdot (1 - 2t/T),
$$
where $u_0 = 0.57735$, $T = 22.79507$.
$endgroup$
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
|
show 1 more comment
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3062857%2fmathematical-modelling-of-elevator-optimization-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Penalize acceleration and time.
The minimization problem could be expressed as
$$
min_uint_0^T a + b cdot u^2(t) ; text{dt},
$$
as stated in the assignment.
The constraint is that you need to reach the $16^{text{th}}$ floor (or $50$ height units):
$$
50 = int_0^T int_0^T u(tau) ; text{d}tau text{dt}.
$$
You could as well reformulate the above by means of a system of linear ordinary differential equations.
Cost function stays the same, but constraints are
$$
left(
begin{array}{c}
dot{x}_1 \
dot{x}_2
end{array}
right)
=
left(
begin{array}{cc}
0 & 1 \
0 & 0
end{array}
right)
left(
begin{array}{c}
x_1 \
x_2
end{array}
right)
+
left(
begin{array}{c}
0 \
1 \
end{array}
right)
u,
$$
$$
x_1(T) = 50, x_2(T) = 0,
$$
with initial conditions $x_1(0) = x_2(0) = 0$.
Note that $x_1$ represents height, while $x_2$ represents velocity.
Assume a passenger pays 30 Cent for a moderate acceleration value and 10 Cent for traveling time.
Then it will take him 23 time units (say: seconds) to reach the $16^{text{th}}$ floor. The acceleration function $u$ that minimizes the cost function is
$$
u(t) = 0.57735 cdot (1 - 2t/T).
$$
For this particular problem, the solution is analytic.
The optimization problem you are dealing with has the following properties:
dynamic optimization variable - here: elevator acceleration - is a function of time $u(t)$
unbounded no restrictions opposed to $u(t)$
free end-time end-time $T$ is not fixed; it's part of the optimization problem to find it
end constraints we want the elevator to be in the $16^{text{th}}$ floor at end-time, and it should stop there: $x_1(T) = 50, ; x_2(T) = 0$.
In general, this kind of problem needs iterative/numeric treatment, i.e. there is no closed solution available. It can be solved using e.g. boundary value problem solvers (if you happen to have one at your disposal).
In this special case, an analytic treatment is possible.
The necessary first-order optimality conditions are
$$
begin{eqnarray}
tag{1}label{eqn.system}
dot{mathbf{x}} & = & Amathbf{x} + mathbf{b}u \
tag{2}label{eqn.lagrange}
dot{mathbf{lambda}} & = & -Amathbf{lambda} \
tag{3}label{eqn.algebraic}
0 & = & 2bu + mathbf{b}^T mathbf{lambda}
end{eqnarray},
$$
where $mathbf{lambda}(t) in mathbb{R}^2$ are Lagrange multipliers. This set of equations is obtained by partial derivation of the Hamiltonian.
Then, there are initial and end conditions
$$
x_1(0) = x_2(0) = x_2(T) = 0; ; x_1(T) = 50,
$$
and one transversal condition, due to free end-time:
$$
tag{4}label{eqn.transversal}
0 = a + u^2(T) + mathbf{lambda}(T)^T(Amathbf{x}(T) + mathbf{b}u(T)).
$$
You can solve this set of equations by
- substituting $u$ with $-lambda_2/(2b)$, using $eqref{eqn.algebraic}$,
- solve the decoupled odes in $eqref{eqn.lagrange}$ backwards in time to obtain $lambda_1 = text{const.}$, $lambda_2(t) = lambda_2(T) + lambda_1(T - t)$,
- solve the system odes in $eqref{eqn.system}$ to obtain $x_1(T)$, $x_2(T)$,
- form a set of three algebraic equations, nonlinear in $(lambda_1, lambda_2(T), T)$, using the results from step (3) and equation $eqref{eqn.transversal}$:
$$
begin{eqnarray}
0 & = & x_2(T) + (lambda_2(T)T + lambda_1T^2/2)/(2b), \
0 & = & x_1(T) + (lambda_2(T)T^2/2 + lambda_1T^3/3)/(2b), \
0 & = & a + bu^2(T) + lambda_1x_2(T) + lambda_2(T)u(T),
end{eqnarray}
$$
- apply a solver to find the zeros, where $(lambda_1, lambda_2(T), T)^{(0)} = (-0.1, 0.1, 10)$ will do as a first guess with $a = 0.1$, $b = 0.3$,
- put the pieces together to obtain
$$
u(t) = -lambda_2(t)/(2b) = (lambda_1(t-T) - lambda_2(T))/(2b) = u_0 cdot (1 - 2t/T),
$$
where $u_0 = 0.57735$, $T = 22.79507$.
$endgroup$
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
|
show 1 more comment
$begingroup$
Penalize acceleration and time.
The minimization problem could be expressed as
$$
min_uint_0^T a + b cdot u^2(t) ; text{dt},
$$
as stated in the assignment.
The constraint is that you need to reach the $16^{text{th}}$ floor (or $50$ height units):
$$
50 = int_0^T int_0^T u(tau) ; text{d}tau text{dt}.
$$
You could as well reformulate the above by means of a system of linear ordinary differential equations.
Cost function stays the same, but constraints are
$$
left(
begin{array}{c}
dot{x}_1 \
dot{x}_2
end{array}
right)
=
left(
begin{array}{cc}
0 & 1 \
0 & 0
end{array}
right)
left(
begin{array}{c}
x_1 \
x_2
end{array}
right)
+
left(
begin{array}{c}
0 \
1 \
end{array}
right)
u,
$$
$$
x_1(T) = 50, x_2(T) = 0,
$$
with initial conditions $x_1(0) = x_2(0) = 0$.
Note that $x_1$ represents height, while $x_2$ represents velocity.
Assume a passenger pays 30 Cent for a moderate acceleration value and 10 Cent for traveling time.
Then it will take him 23 time units (say: seconds) to reach the $16^{text{th}}$ floor. The acceleration function $u$ that minimizes the cost function is
$$
u(t) = 0.57735 cdot (1 - 2t/T).
$$
For this particular problem, the solution is analytic.
The optimization problem you are dealing with has the following properties:
dynamic optimization variable - here: elevator acceleration - is a function of time $u(t)$
unbounded no restrictions opposed to $u(t)$
free end-time end-time $T$ is not fixed; it's part of the optimization problem to find it
end constraints we want the elevator to be in the $16^{text{th}}$ floor at end-time, and it should stop there: $x_1(T) = 50, ; x_2(T) = 0$.
In general, this kind of problem needs iterative/numeric treatment, i.e. there is no closed solution available. It can be solved using e.g. boundary value problem solvers (if you happen to have one at your disposal).
In this special case, an analytic treatment is possible.
The necessary first-order optimality conditions are
$$
begin{eqnarray}
tag{1}label{eqn.system}
dot{mathbf{x}} & = & Amathbf{x} + mathbf{b}u \
tag{2}label{eqn.lagrange}
dot{mathbf{lambda}} & = & -Amathbf{lambda} \
tag{3}label{eqn.algebraic}
0 & = & 2bu + mathbf{b}^T mathbf{lambda}
end{eqnarray},
$$
where $mathbf{lambda}(t) in mathbb{R}^2$ are Lagrange multipliers. This set of equations is obtained by partial derivation of the Hamiltonian.
Then, there are initial and end conditions
$$
x_1(0) = x_2(0) = x_2(T) = 0; ; x_1(T) = 50,
$$
and one transversal condition, due to free end-time:
$$
tag{4}label{eqn.transversal}
0 = a + u^2(T) + mathbf{lambda}(T)^T(Amathbf{x}(T) + mathbf{b}u(T)).
$$
You can solve this set of equations by
- substituting $u$ with $-lambda_2/(2b)$, using $eqref{eqn.algebraic}$,
- solve the decoupled odes in $eqref{eqn.lagrange}$ backwards in time to obtain $lambda_1 = text{const.}$, $lambda_2(t) = lambda_2(T) + lambda_1(T - t)$,
- solve the system odes in $eqref{eqn.system}$ to obtain $x_1(T)$, $x_2(T)$,
- form a set of three algebraic equations, nonlinear in $(lambda_1, lambda_2(T), T)$, using the results from step (3) and equation $eqref{eqn.transversal}$:
$$
begin{eqnarray}
0 & = & x_2(T) + (lambda_2(T)T + lambda_1T^2/2)/(2b), \
0 & = & x_1(T) + (lambda_2(T)T^2/2 + lambda_1T^3/3)/(2b), \
0 & = & a + bu^2(T) + lambda_1x_2(T) + lambda_2(T)u(T),
end{eqnarray}
$$
- apply a solver to find the zeros, where $(lambda_1, lambda_2(T), T)^{(0)} = (-0.1, 0.1, 10)$ will do as a first guess with $a = 0.1$, $b = 0.3$,
- put the pieces together to obtain
$$
u(t) = -lambda_2(t)/(2b) = (lambda_1(t-T) - lambda_2(T))/(2b) = u_0 cdot (1 - 2t/T),
$$
where $u_0 = 0.57735$, $T = 22.79507$.
$endgroup$
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
|
show 1 more comment
$begingroup$
Penalize acceleration and time.
The minimization problem could be expressed as
$$
min_uint_0^T a + b cdot u^2(t) ; text{dt},
$$
as stated in the assignment.
The constraint is that you need to reach the $16^{text{th}}$ floor (or $50$ height units):
$$
50 = int_0^T int_0^T u(tau) ; text{d}tau text{dt}.
$$
You could as well reformulate the above by means of a system of linear ordinary differential equations.
Cost function stays the same, but constraints are
$$
left(
begin{array}{c}
dot{x}_1 \
dot{x}_2
end{array}
right)
=
left(
begin{array}{cc}
0 & 1 \
0 & 0
end{array}
right)
left(
begin{array}{c}
x_1 \
x_2
end{array}
right)
+
left(
begin{array}{c}
0 \
1 \
end{array}
right)
u,
$$
$$
x_1(T) = 50, x_2(T) = 0,
$$
with initial conditions $x_1(0) = x_2(0) = 0$.
Note that $x_1$ represents height, while $x_2$ represents velocity.
Assume a passenger pays 30 Cent for a moderate acceleration value and 10 Cent for traveling time.
Then it will take him 23 time units (say: seconds) to reach the $16^{text{th}}$ floor. The acceleration function $u$ that minimizes the cost function is
$$
u(t) = 0.57735 cdot (1 - 2t/T).
$$
For this particular problem, the solution is analytic.
The optimization problem you are dealing with has the following properties:
dynamic optimization variable - here: elevator acceleration - is a function of time $u(t)$
unbounded no restrictions opposed to $u(t)$
free end-time end-time $T$ is not fixed; it's part of the optimization problem to find it
end constraints we want the elevator to be in the $16^{text{th}}$ floor at end-time, and it should stop there: $x_1(T) = 50, ; x_2(T) = 0$.
In general, this kind of problem needs iterative/numeric treatment, i.e. there is no closed solution available. It can be solved using e.g. boundary value problem solvers (if you happen to have one at your disposal).
In this special case, an analytic treatment is possible.
The necessary first-order optimality conditions are
$$
begin{eqnarray}
tag{1}label{eqn.system}
dot{mathbf{x}} & = & Amathbf{x} + mathbf{b}u \
tag{2}label{eqn.lagrange}
dot{mathbf{lambda}} & = & -Amathbf{lambda} \
tag{3}label{eqn.algebraic}
0 & = & 2bu + mathbf{b}^T mathbf{lambda}
end{eqnarray},
$$
where $mathbf{lambda}(t) in mathbb{R}^2$ are Lagrange multipliers. This set of equations is obtained by partial derivation of the Hamiltonian.
Then, there are initial and end conditions
$$
x_1(0) = x_2(0) = x_2(T) = 0; ; x_1(T) = 50,
$$
and one transversal condition, due to free end-time:
$$
tag{4}label{eqn.transversal}
0 = a + u^2(T) + mathbf{lambda}(T)^T(Amathbf{x}(T) + mathbf{b}u(T)).
$$
You can solve this set of equations by
- substituting $u$ with $-lambda_2/(2b)$, using $eqref{eqn.algebraic}$,
- solve the decoupled odes in $eqref{eqn.lagrange}$ backwards in time to obtain $lambda_1 = text{const.}$, $lambda_2(t) = lambda_2(T) + lambda_1(T - t)$,
- solve the system odes in $eqref{eqn.system}$ to obtain $x_1(T)$, $x_2(T)$,
- form a set of three algebraic equations, nonlinear in $(lambda_1, lambda_2(T), T)$, using the results from step (3) and equation $eqref{eqn.transversal}$:
$$
begin{eqnarray}
0 & = & x_2(T) + (lambda_2(T)T + lambda_1T^2/2)/(2b), \
0 & = & x_1(T) + (lambda_2(T)T^2/2 + lambda_1T^3/3)/(2b), \
0 & = & a + bu^2(T) + lambda_1x_2(T) + lambda_2(T)u(T),
end{eqnarray}
$$
- apply a solver to find the zeros, where $(lambda_1, lambda_2(T), T)^{(0)} = (-0.1, 0.1, 10)$ will do as a first guess with $a = 0.1$, $b = 0.3$,
- put the pieces together to obtain
$$
u(t) = -lambda_2(t)/(2b) = (lambda_1(t-T) - lambda_2(T))/(2b) = u_0 cdot (1 - 2t/T),
$$
where $u_0 = 0.57735$, $T = 22.79507$.
$endgroup$
Penalize acceleration and time.
The minimization problem could be expressed as
$$
min_uint_0^T a + b cdot u^2(t) ; text{dt},
$$
as stated in the assignment.
The constraint is that you need to reach the $16^{text{th}}$ floor (or $50$ height units):
$$
50 = int_0^T int_0^T u(tau) ; text{d}tau text{dt}.
$$
You could as well reformulate the above by means of a system of linear ordinary differential equations.
Cost function stays the same, but constraints are
$$
left(
begin{array}{c}
dot{x}_1 \
dot{x}_2
end{array}
right)
=
left(
begin{array}{cc}
0 & 1 \
0 & 0
end{array}
right)
left(
begin{array}{c}
x_1 \
x_2
end{array}
right)
+
left(
begin{array}{c}
0 \
1 \
end{array}
right)
u,
$$
$$
x_1(T) = 50, x_2(T) = 0,
$$
with initial conditions $x_1(0) = x_2(0) = 0$.
Note that $x_1$ represents height, while $x_2$ represents velocity.
Assume a passenger pays 30 Cent for a moderate acceleration value and 10 Cent for traveling time.
Then it will take him 23 time units (say: seconds) to reach the $16^{text{th}}$ floor. The acceleration function $u$ that minimizes the cost function is
$$
u(t) = 0.57735 cdot (1 - 2t/T).
$$
For this particular problem, the solution is analytic.
The optimization problem you are dealing with has the following properties:
dynamic optimization variable - here: elevator acceleration - is a function of time $u(t)$
unbounded no restrictions opposed to $u(t)$
free end-time end-time $T$ is not fixed; it's part of the optimization problem to find it
end constraints we want the elevator to be in the $16^{text{th}}$ floor at end-time, and it should stop there: $x_1(T) = 50, ; x_2(T) = 0$.
In general, this kind of problem needs iterative/numeric treatment, i.e. there is no closed solution available. It can be solved using e.g. boundary value problem solvers (if you happen to have one at your disposal).
In this special case, an analytic treatment is possible.
The necessary first-order optimality conditions are
$$
begin{eqnarray}
tag{1}label{eqn.system}
dot{mathbf{x}} & = & Amathbf{x} + mathbf{b}u \
tag{2}label{eqn.lagrange}
dot{mathbf{lambda}} & = & -Amathbf{lambda} \
tag{3}label{eqn.algebraic}
0 & = & 2bu + mathbf{b}^T mathbf{lambda}
end{eqnarray},
$$
where $mathbf{lambda}(t) in mathbb{R}^2$ are Lagrange multipliers. This set of equations is obtained by partial derivation of the Hamiltonian.
Then, there are initial and end conditions
$$
x_1(0) = x_2(0) = x_2(T) = 0; ; x_1(T) = 50,
$$
and one transversal condition, due to free end-time:
$$
tag{4}label{eqn.transversal}
0 = a + u^2(T) + mathbf{lambda}(T)^T(Amathbf{x}(T) + mathbf{b}u(T)).
$$
You can solve this set of equations by
- substituting $u$ with $-lambda_2/(2b)$, using $eqref{eqn.algebraic}$,
- solve the decoupled odes in $eqref{eqn.lagrange}$ backwards in time to obtain $lambda_1 = text{const.}$, $lambda_2(t) = lambda_2(T) + lambda_1(T - t)$,
- solve the system odes in $eqref{eqn.system}$ to obtain $x_1(T)$, $x_2(T)$,
- form a set of three algebraic equations, nonlinear in $(lambda_1, lambda_2(T), T)$, using the results from step (3) and equation $eqref{eqn.transversal}$:
$$
begin{eqnarray}
0 & = & x_2(T) + (lambda_2(T)T + lambda_1T^2/2)/(2b), \
0 & = & x_1(T) + (lambda_2(T)T^2/2 + lambda_1T^3/3)/(2b), \
0 & = & a + bu^2(T) + lambda_1x_2(T) + lambda_2(T)u(T),
end{eqnarray}
$$
- apply a solver to find the zeros, where $(lambda_1, lambda_2(T), T)^{(0)} = (-0.1, 0.1, 10)$ will do as a first guess with $a = 0.1$, $b = 0.3$,
- put the pieces together to obtain
$$
u(t) = -lambda_2(t)/(2b) = (lambda_1(t-T) - lambda_2(T))/(2b) = u_0 cdot (1 - 2t/T),
$$
where $u_0 = 0.57735$, $T = 22.79507$.
edited Jan 7 at 8:45
answered Jan 5 at 16:28
Max HerrmannMax Herrmann
672415
672415
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
|
show 1 more comment
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
Thank you for answer @max-herrmann , but in the question, there is an expression stating: "Suppose that the passenger’s time is valued at a dollar per unit time" . How can we consider the cost related to the passenger time or should we consider that the minimization of time is directly our problem and a dollar is just redundant?
$endgroup$
– MSc. Student in NZ
Jan 5 at 16:44
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
You're right. Makes perfect sense.
$endgroup$
– Max Herrmann
Jan 5 at 17:04
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Thanks a lot Max, your answer/comments were helpful !
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:26
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Glad I could help. Welcome to Mathematics Stack Exchange, by the way!
$endgroup$
– Max Herrmann
Jan 5 at 18:36
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
$begingroup$
Thank you for nice welcome to the community @Max , I am thinking on how to obtain an approximate problem from the minimization problem including integrals you have recommended above. Do you have any suggestion to realize this and what kind of optimization solver do you suggest to get a successful solution? Thanks in advance.
$endgroup$
– MSc. Student in NZ
Jan 5 at 18:51
|
show 1 more comment
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3062857%2fmathematical-modelling-of-elevator-optimization-problem%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
$begingroup$
Explicitly expressing the utility of the acceleration in formulas instead of words will help a lot. Let the "utility" of $u(t)$ be $U(u(t))$. Is $U(u(t)) = - Delta t -b cdot int_0^{Delta t} u(t)^2 dt$, or something else?
$endgroup$
– Zachary Hunter
Jan 5 at 16:10