Initial Conditions for Inventory t=0 Topic is solved

Problems with modeling
Post Reply
baybora
User
User
Posts: 5
Joined: 3 years ago

Initial Conditions for Inventory t=0

Post by baybora »

Hi!

I'm doing a producting planning for an university course, and I have a problem. The model has Inventory Balance Equations for 3 different departments and these inventories' levels take place as variables. The inventory level is calculated with various equations (not given with this message) when the t € [1, 6], but at time t=0, the inventory levels must be 0 for each product i, I didn't make this part (at t=0). I'm waiting for your help.

Code: Select all

Set
    i "order"
    t "time horizon" /t1*t6/;

Variable
    invk(i,t) "the number of order i at the end of the period t in k department"
    invr(i,t) "the number of order i at the end of the period t in r department"
    invf(i,t) "the number of order i at the end of the period t in f department";

Equation
    ibk(i,t) "inventory balance equation - k"
    ibr(i,t) "inventory balance equation - r"
    ibf(i,t) "inventory balance equation - f";
abhosekar
Moderator
Moderator
Posts: 295
Joined: 3 years ago

Re: Initial Conditions for Inventory t=0

Post by abhosekar »

I assume the question is that you have something like (t-1) in your equations and you have issues when t = 1 because you have not assigned values for t = 0, yes?

In your equations you can write $(ord(t) eq 1) and $(ord(t) ne 1) with the terms to achieve this.

For example,

I(t + 1) = I(t)$(ord(t) ne 1) + ....;

In your case the above would suffice. But let's say your inventory is x instead of 0. You can do

I(t + 1) = I(t)$(ord(t) ne 1) + x$(ord(t) eq 1)+ ....;

This way you can keep (most of) your code intact.

Hope this helps.

- Athavr
baybora
User
User
Posts: 5
Joined: 3 years ago

Re: Initial Conditions for Inventory t=0

Post by baybora »

Thank you for your feedback.I tried your solution and it was very helpful I did not get any errors,
Best wishes
-Baybora
Post Reply