If you remember the transportation example, and in that specific example, we decided how much items
should be sent from supplier to the demand point and the demand at different points are concerned.
So now we want to expand that to specific example and make it dynamic.
When we talk about the dynamic kind of modeling, we mean that some decision variables have time.
Index means t.
So again, we import the required packages, for example, Palomo non-pay and then we need to define
an abstract model ie is the set of the suppliers, is a set of the demand and a set of the time steps.
And as I have already explained, the demand is a parameter which is defined over the node j p mean
P max r the set of supplier constraints that specify the minimum and maximum capacity of the.
Suppliers and also the costs of supplier I and also we have added a new parameter called pattern, the
pattern is going to define how demand is changing and it does have an index t so it is defined over
the model T and also the distance is also the parameter, which is a stating the distance between supply
and demand.
And it is different over real numbers and this geometrical x which was telling us how much item are
being sent from the supply to demand.
It also has a T index now.
OK, so let's continue the pump and the variable P was telling us how much each supplier is supplying,
no matter what is being said to which demand points, though, the P bounds are.
This is a function which we have already defined it in order to specify the bounds of my variables.
OK, ok, so if we continue, we do need a rule C one that's rule is telling us how much it is going
out of supply at time.
Step T.
OK, so the summation of model that X, T.J., for all the JS to all the demands that I'm sending the
items.
Hmm.
And which should be equal to model P dot model that P or.
So as you can easily see that this specific expression is defined over Tennie.
That's why my function is defined over Tennie and for the same reason when I want to define my constraint.
See one I have to define over Model T, model I and the rule is rule C one.
OK, so next constraint is telling us what.
It is telling us that whatever is reached the demand point, Jay, at time t, so the variation of the
whole demand is modeled this way, so concerned number multiplied by something which is changing with
time.
So the summation of the model X for every eye in the model eye.
So it means that whatever is being sent from different suppliers, that demand should be bigger than
equal to the quantity of that demand at time.
T.
And this means that actually if you look at these constraints, is defined over TMJ.
There is no eye is left in this expression because we have done the summation over.
I OK, so since that expression is the final word JMT, that means that this should have TMJ here and
the order of them should be exactly the same as the constraining Model T and G.
Yeah, OK.
And finally, the objective function is somehow similar to the previous one means that the summation
of the operating costs to multiply by the cost of the production over summation over all I an all t
plus the summation of Excite T.J. multiplied by the distance, which is also telling us how much cost
is happening and do the summation of RJ and T and.
OK, so.
Actually, when we run the objective function here, that that should be very easy because the model,
a lot of it is a variable that is telling me how much is my overall cost and the sense of the sense
of the optimization is minimized.
OK, now what we need to change compared to the, let's say, static kind of version of the transportation
problem is to update my dad's file.
So the only thing that I need to change is giving I'm providing the Palomo the pattern of the demand.
It is assuming that it has only six time steps one, two, three, four, five, six.
And the pattern of the demand is also specified here.
And I change the name of the.
That's fine.
And I call it here.
So let me run to code, so first stop, second stop.
Third tap, so now the problem is solved and the objective function is found, OK?
And if I want to see the results of the objective optimization problem, you can easily see that at
twenty one and the values of the suppliers are specified here.
Eighty four.
Twenty and time two and three and so on and so on.
So for the time 84 when the coefficient of the pattern is one, we should get exactly the same kind
of results as we did in the static case.
So I will show it to you here.
So at time t one, which is equal, the demand here, the supply of one is three hundred six hundred
twenty two and supply three is twenty.
So let's get back to my example.
Three hundred, six hundred, twenty and twenty.
And these are objective function is the summation of the all decision variable and the costs associated
with them for the whole time horizon.
OK, and there is no drawing for this specific example, but if you want, you can do it easily.
OK, that's it for this lecture at.