This is another version of hostile borders, but this in a triangle.
So suppose we have a triangle with known dimensions and B are the dimensions of that triangle, and
then we want to make sure that all borders or hostile borders are located in inside that triangle in
a way that and there are minimum distance is maximized.
So first of all, that the formula for calculating the distance between each pair of brothers is the
same.
But and now we need to make sure that the know the red dots are inside the triangle.
OK, so for this purpose, I have to make sure that X is always between zero and one and B and why is
between zero and A and B are the input parameters and also and all the dots are below that specific
line connecting A to B..
OK, this is the formula for that.
OK, so let's have a look at the Python code.
OK, so here you can see that.
And the Python code is what trying to do what.
So at the beginning and the first top is importing the required packages and then we have to define
a B set and and and also I n g.
Hmm.
And also the variables.
So this part of the code is similar to the previous ones.
So here you can see dots and we have to define three variables X, Y and R, and also some rules for
calculating the minimum distance.
It is a famous rule that we already use in the previous to that brother of a variance.
And also C two is the line is specifying that we should always be below that line.
OK, and finally, that's the objective function.
So I run this part of the code as well.
OK, it is run successfully and I specify and B and the number of brothers.
Yeah.
OK.
So it takes a bit of time to run the code because it's non-linear but and it's and has 50 brothers,
OK?
And also at the peak, at the final stage and you can see here, that's how the brothers are allocated
inside that triangle.
If I changed a number of brothers, let's say they are 10 now, so it will run more quickly.
And if I run the code, you can see that how they are scattered inside that triangle.
OK, so you can change it as, uh, as you wish for your own purpose.
Thank you very much.