1 00:00:00,840 --> 00:00:06,810 OK, this is the hostile brother inner circle, and we want to find out the locations of and brothers 2 00:00:07,050 --> 00:00:11,790 in a circle in a way that the minimum distance between each pair of brothers is maximum. 3 00:00:12,400 --> 00:00:13,790 Um, OK. 4 00:00:14,040 --> 00:00:20,920 So, um, we want to first calculate the distance between each pair of brothers. 5 00:00:21,300 --> 00:00:29,010 So here is the formula for calculations X, Y minus A.J. squared plus Y minus Wijaya Square, bigger 6 00:00:29,010 --> 00:00:30,510 than our square. 7 00:00:30,630 --> 00:00:35,320 So that's a small R is giving us the minimum distance between each pair of brothers. 8 00:00:36,060 --> 00:00:44,940 The next constraint is, uh, in order to make sure that all of them are inside a circle with the radius 9 00:00:45,480 --> 00:00:53,580 capital R and with the center of R and R, so the center is R and R here and we are assuming that the 10 00:00:53,580 --> 00:00:57,290 R is one or we can even change that. 11 00:00:57,780 --> 00:01:04,380 OK, so let's have a look at the code for this purpose here. 12 00:01:04,390 --> 00:01:09,960 You can see the Python code as always. 13 00:01:09,960 --> 00:01:15,360 We have to import the required packages. 14 00:01:15,510 --> 00:01:18,270 We do it here in this top layer on it. 15 00:01:18,780 --> 00:01:21,450 So it's, uh, successfully run. 16 00:01:21,840 --> 00:01:26,220 Then we have to define the sets and the number of brothers. 17 00:01:26,220 --> 00:01:29,130 So NT is representing the number of brothers. 18 00:01:29,460 --> 00:01:39,900 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 19 00:01:39,900 --> 00:01:40,560 circle. 20 00:01:40,990 --> 00:01:55,140 OK, and then um we have to give the we have to give the um definition of the variable X and Y and R 21 00:01:55,440 --> 00:02:05,220 so X is moving between zero and two are Y is moving between zero and two are uh small R is a positive 22 00:02:05,220 --> 00:02:05,640 number. 23 00:02:05,790 --> 00:02:17,460 OK, um also um there are some rules for calculation of the distance between each pair of uh brothers. 24 00:02:17,460 --> 00:02:21,390 So you can see here for every AI not equal to J. 25 00:02:21,420 --> 00:02:26,000 The formula is as follows and if I anghiari called, we have to escape to constraints. 26 00:02:26,000 --> 00:02:34,650 So Model has one constraint that is defined over IFJ and the rule is c one rule, the other constraint 27 00:02:34,650 --> 00:02:40,920 that is making sure that all of them are inside the circle, that a specific circle is this one. 28 00:02:41,100 --> 00:02:45,560 OK, so um that's obvious. 29 00:02:45,570 --> 00:02:51,300 That's and that's the second constraint should be defined over AI for every broader. 30 00:02:51,750 --> 00:02:52,040 Mm. 31 00:02:52,320 --> 00:02:57,060 And the objective function is given by model R and the sense is the maximization. 32 00:02:57,310 --> 00:03:02,190 So we, we adopt the uh Solver IPR for this purpose. 33 00:03:03,110 --> 00:03:08,520 We give the required parameters to the model R and and R specified here. 34 00:03:08,520 --> 00:03:11,310 We could put them in a dance file and then called on. 35 00:03:11,460 --> 00:03:12,090 That's fine. 36 00:03:13,350 --> 00:03:21,380 And then create the model and create the instance and asked piano to solve that specific instance. 37 00:03:21,390 --> 00:03:25,680 OK, so um and finally show the results. 38 00:03:25,680 --> 00:03:31,950 I will run the code from the beginning to make sure everything is running smoothly. 39 00:03:32,250 --> 00:03:37,200 So uh, we have twenty brothers and a circle with the radius one. 40 00:03:37,470 --> 00:03:45,840 So you can see here that there are twenty nodes here scattered in this circle and it is try to maximize 41 00:03:45,840 --> 00:03:52,470 the minimum distance between each pair of brothers and that minimum distance is zero point four eight 42 00:03:52,470 --> 00:03:52,920 five. 43 00:03:53,540 --> 00:03:55,170 OK, thank you very much.