OK, in this example, suppose we have a plane and the.
OK, in this example, Anna.
Sarbaz.
On.
OK, this example is referring to the problem of finding bigger circle on the surface.
OK, this example is referring to finding the biggest circle on a surface with some obstacle, so I
suppose we do have given surface for simplicity.
We have assumed it's like a square and the dimensions are equal to one one on one.
OK.
One on one and also the there are some US points are specified here, we want to find out the location
and the radius of the biggest circle that can be placed on the top of this and surface without and without
an.
This example is referring to the problem of finding bigger circle on a surface with some obstacles.
So suppose we do have some obstacles here on the surface and the dimension of that surface is one and
one.
It's like a square.
And we want to find out the location and the radius of the bigger circle that we can place on the top
of the surface without and overlapping any of these obstacles.
OK, so first of all, we want to make sure that every obstacle is outside the circle.
OK, so if the center of the circle is specified by Capital X and Y then and X I next year, X and Y,
J are all already specify for us.
These are the coordinates of the obstacles.
And also we want to make sure that X is bigger than R because we don't want to have a circle outside
the surface.
And also X is less than one minus R, so the circle is not coming out of the box from this side.
The same philosophy holds for Y.
OK, so let's have a look at the Python code for this purpose.
OK, so first of all, I import every required packages and also I define the abstract model parameter
and is telling us how many obstacles we have and also the range of them is specified here.
So we might need a random, um.
Uh, initialization.
OK, so for this purpose, I define this function, so define had any final model and I for every I
can provide you, um, an initial kind of, um.
So, um, location for those obstacles, actually, and also, um, the X, Y and R R or variable decision
variables, they are positive numbers, um, varying between zero and one.
OK.
So they are all on the on the surface, OK?
So we want to find out the area of that circle as the decision variable or the objective one.
And there are some rules.
The first rule is making sure that every obstacle is outside that circle.
The other one is telling us that X is bigger than, ah, I couldn't put our here on the interval because
our is a variable and Y is bigger than ours as well, and Y is less than one minus R and X is less than
one minus R, OK, as we discussed before, and also the area is obtained by this formula using this
constraint.
So the objective function is obtained using this expression modeled on the area.
And the sense is maximisation, I choose the solver, OK, I choose the solver, I can specify the number
of obstacles here.
Hmm.
And finally I ask matplotlib to show me the obtain solution.
I run the code and see the results.
OK, so we have to wait and see the results here.
So 50 random obstacles are generated on the graph here.
You can see and then the center of that circle is found.
The radius of that circle is also found.
You can see it here.
OK, so you can easily change the number of obstacles instead of, let's say 50, let's try 10, OK,
and rerun the code.
So for 10 obstacles, the location of the circle is also found, the radius is obviously bigger than
before, and also the location of the center of the circle is an updated.
Thank you very much.