It's examples, and we already know the radius of all circles.
OK, and we do have circles and we want to place them inside the triangle at minimum surface without
overlapping each other.
So we have to write down some constraints to describe the problem.
So as you can easily see, um, the area of the triangle is calculated by, um, X etch multiplied by
Y up here, multiplied by half.
It gives you the, um, surface of the area of the triangle.
OK.
And the first constraint can be easily understood because it is telling us that each pair of circles
should not have any overlap with each other.
And also, we do we can see some other constraints here.
I will explain them to you.
So first of all, we have to write down the.
Equation that describes this red line.
So this red line is passing through the origin and also this specific point up and up and this line
is described by this equation.
Hmm.
And also, we have another line, the blue one.
That blue line is passing through this point zero, and it's up and way up.
So the relation between these parameters are given here.
So this is the equation describing the blue line.
And also we know that.
We need to satisfy some constraint so the center of these circles should be, for example, on the right
hand side of the red line and the left hand side of the blue one.
This is one constraint.
And the other one is that the distance between the center to the red one should be bigger than the radius
of the circle and also the center to the blue.
One should be bigger than the radius of the circle.
OK, so these two constraints are given here.
So these two are telling us, for example, we are below the red line and on the left hand side of the
blue one, OK?
And also these two will specify that and the distance between the center of the circle and the line
is more than the radius of that specific circle.
OK, so we have to write down the.
A Python code to solve this optimization problem and the decision variables are, um, the, um, location
of the centers and also, uh, the radius of them are already known for us.
OK, so let's talk about the Python code.
So first of all, we have to import everything that we need then, uh, define the sets I and J.
Have you already know the meaning of them?
Because I is representing the each circle.
J is the alias of that R is a parameter and which is specified by us.
It is telling us how much is the radius of each circle.
And also we have to define some bounds for the variable X and Y, so it's between R and a big number
and Y up an X each and X up are already unknown and the area is already the um, objective function
for us.
OK, so um, you can tell that OK, if I is less than J uh then it means that by just writing down this
inequality, uh, we can make sure that, uh, any two circles are not overlapping each other and then
we are making sure that we are below the red line.
We are on the left hand side of the blue one in this one.
And as you can see, these two equations are defined over I and also the distance between each center
to the red or blue lines are more than the radius of each circle.
OK, and also and this is another one that we already talked about it.
And also, um, we should say that, OK, so x up and is less than X each.
OK, this is an assumption.
And and also the area is a specified here.
OK, so these are the constraint and the objective function and also the uh input of the problem is
um described here.
So um, the radius of the circle should be specified in a dandified.
OK, so I run the problem for you and see the results.
OK, so the problem is, Ron, and you can see here that and the area of the circle is found, how much
is it?
How much is W and so on.
OK, and you can also by using this command print results that sort the status and you can find out
what's happening to the different variables like X, Y or what is the upper value, what is the lower
value, what is the exact value of it and also is it fixed or not fixed and the X of X h y up and the
area.
And you can also have some information regarding the constraints and so on, on each equation's.
OK, normally you don't need that kind of information, but if you want to have access to them, you
can easily use this command to find out more about what's happening inside your model.
Thank you very much.