OK, this is the hostile brother inner circle, and we want to find out the locations of and brothers
in a circle in a way that the minimum distance between each pair of brothers is maximum.
Um, OK.
So, um, we want to first calculate the distance between each pair of brothers.
So here is the formula for calculations X, Y minus A.J. squared plus Y minus Wijaya Square, bigger
than our square.
So that's a small R is giving us the minimum distance between each pair of brothers.
The next constraint is, uh, in order to make sure that all of them are inside a circle with the radius
capital R and with the center of R and R, so the center is R and R here and we are assuming that the
R is one or we can even change that.
OK, so let's have a look at the code for this purpose here.
You can see the Python code as always.
We have to import the required packages.
We do it here in this top layer on it.
So it's, uh, successfully run.
Then we have to define the sets and the number of brothers.
So NT is representing the number of brothers.
AI is a range that's between one and not a model N and J is the alias of AI or is the um radius of the
circle.
OK, and then um we have to give the we have to give the um definition of the variable X and Y and R
so X is moving between zero and two are Y is moving between zero and two are uh small R is a positive
number.
OK, um also um there are some rules for calculation of the distance between each pair of uh brothers.
So you can see here for every AI not equal to J.
The formula is as follows and if I anghiari called, we have to escape to constraints.
So Model has one constraint that is defined over IFJ and the rule is c one rule, the other constraint
that is making sure that all of them are inside the circle, that a specific circle is this one.
OK, so um that's obvious.
That's and that's the second constraint should be defined over AI for every broader.
Mm.
And the objective function is given by model R and the sense is the maximization.
So we, we adopt the uh Solver IPR for this purpose.
We give the required parameters to the model R and and R specified here.
We could put them in a dance file and then called on.
That's fine.
And then create the model and create the instance and asked piano to solve that specific instance.
OK, so um and finally show the results.
I will run the code from the beginning to make sure everything is running smoothly.
So uh, we have twenty brothers and a circle with the radius one.
So you can see here that there are twenty nodes here scattered in this circle and it is try to maximize
the minimum distance between each pair of brothers and that minimum distance is zero point four eight
five.
OK, thank you very much.