1 00:00:00,060 --> 00:00:06,900 If you remember the transportation example, and in that specific example, we decided how much items 2 00:00:06,900 --> 00:00:13,930 should be sent from supplier to the demand point and the demand at different points are concerned. 3 00:00:14,160 --> 00:00:18,330 So now we want to expand that to specific example and make it dynamic. 4 00:00:18,540 --> 00:00:25,170 When we talk about the dynamic kind of modeling, we mean that some decision variables have time. 5 00:00:25,170 --> 00:00:26,580 Index means t. 6 00:00:27,090 --> 00:00:34,920 So again, we import the required packages, for example, Palomo non-pay and then we need to define 7 00:00:34,920 --> 00:00:42,210 an abstract model ie is the set of the suppliers, is a set of the demand and a set of the time steps. 8 00:00:42,810 --> 00:00:50,100 And as I have already explained, the demand is a parameter which is defined over the node j p mean 9 00:00:50,100 --> 00:00:58,170 P max r the set of supplier constraints that specify the minimum and maximum capacity of the. 10 00:00:59,050 --> 00:01:07,480 Suppliers and also the costs of supplier I and also we have added a new parameter called pattern, the 11 00:01:07,480 --> 00:01:15,400 pattern is going to define how demand is changing and it does have an index t so it is defined over 12 00:01:15,400 --> 00:01:22,720 the model T and also the distance is also the parameter, which is a stating the distance between supply 13 00:01:22,720 --> 00:01:23,480 and demand. 14 00:01:23,950 --> 00:01:31,960 And it is different over real numbers and this geometrical x which was telling us how much item are 15 00:01:32,110 --> 00:01:34,470 being sent from the supply to demand. 16 00:01:34,960 --> 00:01:37,900 It also has a T index now. 17 00:01:39,380 --> 00:01:48,490 OK, so let's continue the pump and the variable P was telling us how much each supplier is supplying, 18 00:01:48,740 --> 00:01:55,320 no matter what is being said to which demand points, though, the P bounds are. 19 00:01:55,640 --> 00:02:04,790 This is a function which we have already defined it in order to specify the bounds of my variables. 20 00:02:05,270 --> 00:02:16,130 OK, ok, so if we continue, we do need a rule C one that's rule is telling us how much it is going 21 00:02:16,130 --> 00:02:18,740 out of supply at time. 22 00:02:18,980 --> 00:02:19,720 Step T. 23 00:02:20,190 --> 00:02:27,590 OK, so the summation of model that X, T.J., for all the JS to all the demands that I'm sending the 24 00:02:27,590 --> 00:02:28,250 items. 25 00:02:28,550 --> 00:02:28,870 Hmm. 26 00:02:29,240 --> 00:02:34,120 And which should be equal to model P dot model that P or. 27 00:02:34,910 --> 00:02:40,710 So as you can easily see that this specific expression is defined over Tennie. 28 00:02:40,970 --> 00:02:47,360 That's why my function is defined over Tennie and for the same reason when I want to define my constraint. 29 00:02:47,370 --> 00:02:54,050 See one I have to define over Model T, model I and the rule is rule C one. 30 00:02:54,410 --> 00:02:57,680 OK, so next constraint is telling us what. 31 00:02:58,570 --> 00:03:06,160 It is telling us that whatever is reached the demand point, Jay, at time t, so the variation of the 32 00:03:06,160 --> 00:03:12,520 whole demand is modeled this way, so concerned number multiplied by something which is changing with 33 00:03:12,520 --> 00:03:12,960 time. 34 00:03:14,200 --> 00:03:18,220 So the summation of the model X for every eye in the model eye. 35 00:03:18,250 --> 00:03:24,850 So it means that whatever is being sent from different suppliers, that demand should be bigger than 36 00:03:24,850 --> 00:03:28,840 equal to the quantity of that demand at time. 37 00:03:29,170 --> 00:03:29,450 T. 38 00:03:29,740 --> 00:03:34,320 And this means that actually if you look at these constraints, is defined over TMJ. 39 00:03:35,240 --> 00:03:39,530 There is no eye is left in this expression because we have done the summation over. 40 00:03:39,560 --> 00:03:50,420 I OK, so since that expression is the final word JMT, that means that this should have TMJ here and 41 00:03:50,660 --> 00:03:55,220 the order of them should be exactly the same as the constraining Model T and G. 42 00:03:55,370 --> 00:03:56,250 Yeah, OK. 43 00:03:56,450 --> 00:04:01,910 And finally, the objective function is somehow similar to the previous one means that the summation 44 00:04:01,910 --> 00:04:09,800 of the operating costs to multiply by the cost of the production over summation over all I an all t 45 00:04:10,190 --> 00:04:18,830 plus the summation of Excite T.J. multiplied by the distance, which is also telling us how much cost 46 00:04:18,830 --> 00:04:24,620 is happening and do the summation of RJ and T and. 47 00:04:24,980 --> 00:04:26,720 OK, so. 48 00:04:30,260 --> 00:04:42,470 Actually, when we run the objective function here, that that should be very easy because the model, 49 00:04:42,750 --> 00:04:50,870 a lot of it is a variable that is telling me how much is my overall cost and the sense of the sense 50 00:04:50,870 --> 00:04:53,330 of the optimization is minimized. 51 00:04:53,600 --> 00:05:01,370 OK, now what we need to change compared to the, let's say, static kind of version of the transportation 52 00:05:01,370 --> 00:05:04,930 problem is to update my dad's file. 53 00:05:05,060 --> 00:05:11,320 So the only thing that I need to change is giving I'm providing the Palomo the pattern of the demand. 54 00:05:11,810 --> 00:05:17,570 It is assuming that it has only six time steps one, two, three, four, five, six. 55 00:05:17,870 --> 00:05:21,620 And the pattern of the demand is also specified here. 56 00:05:21,740 --> 00:05:23,300 And I change the name of the. 57 00:05:23,660 --> 00:05:24,440 That's fine. 58 00:05:24,800 --> 00:05:26,120 And I call it here. 59 00:05:27,150 --> 00:05:32,190 So let me run to code, so first stop, second stop. 60 00:05:33,160 --> 00:05:39,410 Third tap, so now the problem is solved and the objective function is found, OK? 61 00:05:39,670 --> 00:05:46,860 And if I want to see the results of the objective optimization problem, you can easily see that at 62 00:05:46,860 --> 00:05:53,740 twenty one and the values of the suppliers are specified here. 63 00:05:53,750 --> 00:05:54,310 Eighty four. 64 00:05:54,310 --> 00:05:54,940 Eighty four. 65 00:05:54,940 --> 00:05:58,480 Twenty and time two and three and so on and so on. 66 00:05:58,510 --> 00:06:06,280 So for the time 84 when the coefficient of the pattern is one, we should get exactly the same kind 67 00:06:06,280 --> 00:06:08,550 of results as we did in the static case. 68 00:06:08,560 --> 00:06:10,340 So I will show it to you here. 69 00:06:10,570 --> 00:06:17,620 So at time t one, which is equal, the demand here, the supply of one is three hundred six hundred 70 00:06:18,310 --> 00:06:20,870 twenty two and supply three is twenty. 71 00:06:21,280 --> 00:06:23,800 So let's get back to my example. 72 00:06:24,110 --> 00:06:27,130 Three hundred, six hundred, twenty and twenty. 73 00:06:27,370 --> 00:06:33,040 And these are objective function is the summation of the all decision variable and the costs associated 74 00:06:33,040 --> 00:06:37,030 with them for the whole time horizon. 75 00:06:37,450 --> 00:06:44,860 OK, and there is no drawing for this specific example, but if you want, you can do it easily. 76 00:06:45,340 --> 00:06:48,250 OK, that's it for this lecture at.