# Introducing WIP storage tanks in a discrete time bucket model

• I have a functioning MIP model in CPLEX/OPL for production planning that generates a weekly plan of what finished good items to produce on which production resource using bill-of-materials, set of resources, resource-product eligibility, resource run rate per hour and other constraints etc.

• Currently the model uses a sequence of resources with specified run rate per hour to decide how to maximize production while minimizing changeovers etc.

• I have a new request to introduce a variety of interim WIP storage tanks of different capacity that supports one of the job steps (for example:filling).

• The key issue is the tank resource with a max capacity as a constraint being attached to an existing resource that already is being throttled by a fixed run rate per hour.

• Can you define your primary decision variables and define what parameters you use for the tank resource? Sep 21 at 23:56
• sure. primary decision variable is the amount of qty to produce on the current resource in the time period the model is trying to solve. Tank is something new that needs to be introduced to the model. Tanks have max capacity parameter and product type rule parameter. For ex: model has access to single Tank1 that has a 100 gal capacity and can only accept product type A. Model also has two Tank2 each with 125 gal capacity but can only accept product type B in this tank. etc. Hope I am answering your question.
– S N
Sep 22 at 16:21
• @SN, Based on what you described two scenarios should be considered. The first, There is no something like STAGE in the production line. In this way you need to define some extra parameters like assignment and tanks max capacity. In order to assign products to the tanks, e.g. product A on the tank 1, etc, and control the maximum level of the tanks capacity respectively. By adding these extra parameters to the constraints, I assume you define whose appropriate constraints, you can get what you want. Sep 22 at 19:22
• The second, when you have faced with stages in the production line. For example, a system with three stage would be machinery, quality control, and packing. In this situation the process is very similar to what the mentioned by @prubin. Sep 22 at 19:22
• Thank you @JorisKinable for the valuable suggestion. Much appreciated.
– S N
Sep 22 at 22:13

It's hard to give a meaningful answer without knowing more about your model, as Joris indicated in his comment. At a guess, you may want to add variables that represent the amount added to/removed from each storage tank in each period, along with capacity constraints and flow balance constraints (tank level = previous tank level + stuff added - stuff removed; product output from any processor = stuff going to next stage plus stuff going to tanks; product received by next stage = product passed directly from previous stage plus stuff drawn from tanks; ...).

• understood. The only information I have been provided is the capacity of the tanks and tank-product type assignment rule. Perhaps we can assume the flow rate of the tanks as the current workstation flow rate to introduce this as a new resource in the model. Appreciate your help.
– S N
Sep 22 at 16:22
• You probably should ask whether all product must flow through tanks or whether they are just there to allow for buffering (produce now and store, use later). My answer tacitly assumed the latter.
– prubin
Sep 22 at 17:59
• Appreciate the insight but the answer is actually the former. All product must flow through one of these tanks as part of the 'feeder' process for the filling. Essentially something that was never considered a constraint previously has now been made a constraint. Hope that adds some clarity to my situation.
– S N
Sep 22 at 19:21
• I still think you'll want to use flow balance constraints: sum of all amounts sent to tank 17 from all sources at time $t$ + starting level at time $t$ minus sum of all amounts sent from tank 17 to other places at time $t$ = starting level at time $t+1$, along with a bound on the level at each period (can't be negative, can't exceed tank capacity).
– prubin
Sep 22 at 20:58
• Think I understand the approach. I will work on these and get back to you on the model outcome. Thanks for the helpful steer on this question sir.
– S N
Sep 22 at 22:16