This example is talking about the fastest route, so suppose we want to go from point A to point B?
And this is a lake, uh, half a circle kind of shape lake, so in order to travel from A to B, we
have two options.
We can go by boat and from the water path.
We call it L1 with the speed we want or we can walk and on the land, on the route from L.A., we call
it L2 with the velocity of two.
OK, so.
We want to minimize the traveling time.
And we know that the speed of walking and the speed of the boats are different with each other, so
the decision variable is the teta.
So we want to find out what is the optimal value of teta in order to minimize the travel total traveling
time.
So the total travelling time is the time on the boat and the time on work.
So here you can see the objective function is defined as the summation of L1 divided by we one time
one L2 plus divided by V to the end gives you the time to OK.
And also we know that the L1 is two or cosine of TETA.
So based on this graph you can easily see that L1 has such a relation between the radius of the circle,
which is a known quantity for us, and the cosine of theta, which is the desired decision variable
and L2 is equal to two Arteta and we already know that the turtle is expressed in Radion.
So this is the and python code for solving the problem.
OK, so here you can see that, um, first of all, we have to import the Python Palomo package.
So here you see from Palermo that environment import asseri everything.
And also if we need the some functions we might need a non-pay.
OK, and this is a description of the problem.
So we define a model, we create a model called a model is equal to concrete model and a small R is
the parameter we defined for the model.
Model we want and we, too, are also parameters and also we can initialize them based on the input
of the problem here, we assume that we want is bigger than we, too, and we call it four and three.
And Teta is the decision variable and it is changing between some bounds between zero and a half pi
and we can initialize it with pi divided by three.
OK, and also the objective function is, um, summation of the time we need for travelling between
two points.
So the expression is two are cosine of teta divided by model.
We one plus two times model teta multiplied by are divided by V two and the sense of the optimization
is the minimization.
So we let's run the first two tabs.
Mm hmm.
So I have run the two tabs and then I specify the IP as the nonlinear solver for us and the model is
solved and it can give us the required, uh, decision variables.
So it means that theta is zero.
What does it mean?
It means that we, um, if we go back to the optimization problem description, it means that we should
take the water route in order to travel from A to B. That's the shortest path.
And we will travel.
Only two are OK.
And that's that's it for this example.
Thank you very much.