In this example, we want we do have an equal size circles and the radius of these circles are unknown.
We want to find the biggest value of art that can have.
And in this example, we are about to allocate an equal sized circle inside the circle and we want to
find out and the maximum radius of these equally sized circles and the big circle has the radius equal
to one.
OK, and the condition for this specific optimization problem is that no two circles have any overlap
with each other and they are all inside the big circle.
So first, um, inequality is telling us they are not having any overlap.
The second one is making sure that they are all inside the big circle.
And that big circle is the center of that big circle is located on the point one on one.
OK, for simplicity, let's have a look at the, uh, Python code.
So first, we import every required package, then we define an abstract model.
And number of circles is a parameter.
It is mutable so it can be changed.
Um, I is arranged, set, uh, started from one to end, which is the number of circles and J is the
alias of I, R, X and Y are variables that are changing between a small number and two.
And also uh we need to define um some uh rules for that.
As we said, um, the first rule is making sure that no two circles have any overlap.
The second one is making sure they are all inside the big circle.
And the objective function is, let's say R-squared square or so, and we can maximize our or R-squared,
so let's maximize are OK and also, um, instance, it will be model that create instance.
So after D-line, all the constraints will be created and supplied with the input data and also the
results is obtained here.
Opt of instance.
And the created instance will be solved using the software that we already specified.
OK, and finally the results are plotted here.
So I run the code for you and show you the results.
OK, so here you can see that four, 20 circles and we can have these results.
OK, and the location of these are small circles and as well as the radius of them is found.