1 00:00:00,830 --> 00:00:10,310 Problem, so, um, suppose you have a given and a plain triangle and you want to find out the point 2 00:00:10,310 --> 00:00:18,230 like X and Y in a way not the sum of its distances to the vertices of the triangle is minimal. 3 00:00:18,320 --> 00:00:24,170 So we are assuming that the coordinates of the triangle are already known. 4 00:00:24,170 --> 00:00:28,160 So the location of A, B, C points are known. 5 00:00:28,350 --> 00:00:31,760 And what we want to find is X and Y. 6 00:00:31,880 --> 00:00:40,190 So we want to minimize the one, for example, let's say the one D two and three, some together and 7 00:00:40,190 --> 00:00:47,330 also and in order to find the value of each distance, the following formula can be used. 8 00:00:47,340 --> 00:00:54,260 LDI Square is equal to X minus X squared, plus Y minus Y square. 9 00:00:54,260 --> 00:00:59,720 So X and Y are the coordinates of the triangle. 10 00:01:00,130 --> 00:01:06,620 OK, so in order to solve this problem, we have to know which parameters are known. 11 00:01:06,980 --> 00:01:18,440 X I Y are known and the decision variable are X and Y, so um less formulated in Palermo. 12 00:01:19,820 --> 00:01:30,890 First of all, we need to, um, let's say, um, import some libraries, OK, for example, the Palomo 13 00:01:30,890 --> 00:01:39,620 Library, matplotlib, M.P. and a random, um, package, OK, and then we have to create a model, 14 00:01:39,620 --> 00:01:41,750 for example, let's say model, concrete model. 15 00:01:42,230 --> 00:01:49,500 And, um, let's assume that if we have a triangle like this and if the first, um. 16 00:01:51,460 --> 00:01:57,960 Waters of the triangle is located on the Origin 010, another one is called A and the other one is called 17 00:01:57,960 --> 00:01:58,260 B. 18 00:01:58,320 --> 00:02:07,890 OK, so we want to first of all, specify the and B and then and there are two variables called X and 19 00:02:07,890 --> 00:02:08,280 Y. 20 00:02:08,920 --> 00:02:14,570 These are the coordinates of that central point and F one is the objective. 21 00:02:14,730 --> 00:02:22,140 So you can see here a model that F one is objective and the description is as follows. 22 00:02:22,200 --> 00:02:26,970 OK, so we want we can and do the summation one by one. 23 00:02:27,120 --> 00:02:36,480 So this one is the D one is Q are of model X minus zero square plus a model Y minus zero square. 24 00:02:37,410 --> 00:02:41,160 You are T between X and zero B. 25 00:02:41,530 --> 00:02:45,480 Oh so it's here zero and B sorry. 26 00:02:45,480 --> 00:02:45,990 It's here. 27 00:02:46,970 --> 00:02:53,200 X is zero, Y is Bidya, and also the last one, this is the point, A Hmm. 28 00:02:53,600 --> 00:02:59,360 So the distance between that point and Point A is calculated here and the sense of the optimization 29 00:02:59,360 --> 00:03:00,480 is the minimization. 30 00:03:00,500 --> 00:03:08,500 OK, so like every other optimization problem, we do have to specify the solver, which is EPOP here 31 00:03:08,510 --> 00:03:12,350 for obvious reason because it's non-linear programming. 32 00:03:13,440 --> 00:03:20,010 Then we have to ask and Palomo to solve the problem for us and the results are saved here. 33 00:03:20,330 --> 00:03:22,780 Let me run the problem here. 34 00:03:22,790 --> 00:03:25,310 So this one is run successfully. 35 00:03:25,320 --> 00:03:29,930 This top is run next and this one also is done. 36 00:03:29,930 --> 00:03:36,260 And also, if I run this, you can see the values of X and Y are found, the optimal values are found 37 00:03:36,440 --> 00:03:40,440 and or objective function is also, uh, calculated. 38 00:03:40,470 --> 00:03:47,940 OK, if we want to show it visually, then you can easily see that how they are scattered here. 39 00:03:48,100 --> 00:03:51,560 OK, so this is the, um, point. 40 00:03:51,560 --> 00:03:52,710 We are looking for it. 41 00:03:53,250 --> 00:03:55,120 OK, thank you very much. 42 00:03:55,130 --> 00:04:00,790 And this is the example regarding the, um, Steiner problem. 43 00:04:00,800 --> 00:04:01,550 Thank you very much.