1 00:00:00,480 --> 00:00:08,970 In this example, we want we do have an equal size circles and the radius of these circles are unknown. 2 00:00:09,360 --> 00:00:12,870 We want to find the biggest value of art that can have. 3 00:00:13,470 --> 00:00:22,680 And in this example, we are about to allocate an equal sized circle inside the circle and we want to 4 00:00:22,680 --> 00:00:31,530 find out and the maximum radius of these equally sized circles and the big circle has the radius equal 5 00:00:31,530 --> 00:00:32,090 to one. 6 00:00:32,700 --> 00:00:41,580 OK, and the condition for this specific optimization problem is that no two circles have any overlap 7 00:00:41,580 --> 00:00:45,820 with each other and they are all inside the big circle. 8 00:00:45,930 --> 00:00:52,810 So first, um, inequality is telling us they are not having any overlap. 9 00:00:53,070 --> 00:00:58,260 The second one is making sure that they are all inside the big circle. 10 00:00:58,320 --> 00:01:03,390 And that big circle is the center of that big circle is located on the point one on one. 11 00:01:03,490 --> 00:01:10,560 OK, for simplicity, let's have a look at the, uh, Python code. 12 00:01:10,570 --> 00:01:19,110 So first, we import every required package, then we define an abstract model. 13 00:01:19,770 --> 00:01:22,200 And number of circles is a parameter. 14 00:01:22,740 --> 00:01:24,840 It is mutable so it can be changed. 15 00:01:25,340 --> 00:01:35,220 Um, I is arranged, set, uh, started from one to end, which is the number of circles and J is the 16 00:01:35,220 --> 00:01:42,840 alias of I, R, X and Y are variables that are changing between a small number and two. 17 00:01:44,010 --> 00:01:52,200 And also uh we need to define um some uh rules for that. 18 00:01:52,290 --> 00:01:59,240 As we said, um, the first rule is making sure that no two circles have any overlap. 19 00:01:59,820 --> 00:02:04,320 The second one is making sure they are all inside the big circle. 20 00:02:05,120 --> 00:02:15,110 And the objective function is, let's say R-squared square or so, and we can maximize our or R-squared, 21 00:02:15,120 --> 00:02:23,480 so let's maximize are OK and also, um, instance, it will be model that create instance. 22 00:02:23,660 --> 00:02:32,870 So after D-line, all the constraints will be created and supplied with the input data and also the 23 00:02:32,870 --> 00:02:35,330 results is obtained here. 24 00:02:35,450 --> 00:02:37,820 Opt of instance. 25 00:02:39,550 --> 00:02:45,580 And the created instance will be solved using the software that we already specified. 26 00:02:46,250 --> 00:02:49,800 OK, and finally the results are plotted here. 27 00:02:49,930 --> 00:02:55,000 So I run the code for you and show you the results. 28 00:02:58,080 --> 00:03:05,040 OK, so here you can see that four, 20 circles and we can have these results. 29 00:03:05,490 --> 00:03:12,980 OK, and the location of these are small circles and as well as the radius of them is found.