MIN function: The pros and cons

Use this forum to post Vensim related questions.
Post Reply
Monte
Senior Member
Posts: 133
Joined: Sat Aug 13, 2005 4:18 am
Vensim version: PLE+

MIN function: The pros and cons

Post by Monte »

Hi,

When should I use the MIN function?

The function can make equations concise and scholar, but the equations may not be easily understood by all. Alternatively, I can use the IF THEN ELSE function instead. But, the resulting equations get longer.

Which of the below rate-equations should I adopt? Both are equivalent, and intended to control the flow of people that can enter a 1-m-width walkway. There is the walkway capacity that limits the largest number of people entering the area:

1. Flow rate = MIN (potential loading, MAXIMUM LOADING)

or,

2. Flow rate = IF THEN ELSE (potential loading > MAXIMUM LOADING, MAXIMUM LOADING, potential loading)

where potential loading is the number of people who attempt to enter the pathway at any given time (people/min), and MAXIMUM LOADING is the maximum number of people that can enter the pathway (say, 25 people/min). Do you think which equation is better?

Monte
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

For your example the MIN function is clearly superior. There is a tendency to stay away from MIN (and IF THEN ELSE) in mainstream System Dynamics. Mostly because for aggregate representations MIN is inappropraite. For example

shipments = MIN(orders, inventory/minimal shipment time)

is a perfectly good formulation, but for an aggregate system as inventory starts to get low some items will stock out. In this case a formulation such as

shipments = orders * effect of inventory on shipments f(inventory/target inventory)

might be preferred. Of course for this formulation you need to be careful about the implicit time constant corresponding to minimal shipment time in the first formulation.

The molecules have good discussion of many of the issues related to this.

[Edited on 2007-3-25 by bob@vensim.com]
Monte
Senior Member
Posts: 133
Joined: Sat Aug 13, 2005 4:18 am
Vensim version: PLE+

Post by Monte »

Hi Bob, thanks again for your valuable times and efforts. Your kindness will never be forgotten. Thank you so much.
Monte
Senior Member
Posts: 133
Joined: Sat Aug 13, 2005 4:18 am
Vensim version: PLE+

Post by Monte »

Based on Bob's above note, I have made a diagram and table graph to facilitate the learning.
I want to prevent negative-inventory, and to stay away from MIN too. Do you think the below formulation is good, based soley on the purposes just given?

I tried to make the shipment time explicit:
Image

with the table graph:
Image

Let's me explain this graph: When order is low enough, shipment can be complete within minimal shipment time (1 min). So, the mutipliers equal 1 as long as the table input is below 1. On the contrary, if the order becomes too high, shipment can never be greater than the amount of minimal order (say 25 units). For example, the multipler is 2 when the recieved order is 50 (or table input=50/25=2); shipment will be only 25 units/min, despite the order of 50 units.

On the left part of the diagram, inventory ratio and links are used to prevent negative stock.
Key equations include:

inventory ratio = ZIDZ(Oder,Inventory)
received order = Inventory * inventory ratio
shipment = received order/shipment time;

Any comments?
Post Reply