One-to-Many allocation problem

Use this forum to post Vensim related questions.
Post Reply
teha
Junior Member
Posts: 4
Joined: Fri Oct 12, 2012 7:19 am
Vensim version: DSS

One-to-Many allocation problem

Post by teha »

Hi,

I have a question regarding allocating the production of product X(PX) to Line 1(L1) and Line 2(L2).

The constraints for the problem is that we want to allocate production of PX to L1 till it reaches its Maximum capacity (MaxCapL1), and then allocate the rest to L2.

In the same way, if we want to decrease the production of PX we want to decrease the production on L2 first and then on L1,

In both of the cases we are adjusting the production rate to the FGI, which means Adjustment for FGI (AdjFGI) can become negative, indicating PX is not need in FGI at the moment->decrease production rate.

I started of ok (I think):

AdjFGI = Scheduled Production - FGI / FGI Adjustment Time

Z= MaxCapL1 – Scheduled Production L1 (Z= the current available production capacity (product/hr) in L1)

Line Allocation[L1] = IF THEN ELSE (Z >= AdjFGI , AdjFGI , Z )
- If capacity of L1 is big enough adjust L1prodcution rate to AdjFGI else increase with available capacity

Line Allocation[L2]= IF THEN ELSE (Z >= AdjFGI , 0 , AdjFGI – Z)
- If capacity of L1 is big enough don’t allocate anything to L2 else allocate the surplus on L2

The above equations work when AdjFGI >= 0, but when the AdhFGI value is negative it becomes a problem as the Line Allocation[L1] IF condition becomes true and we start decreasing L1 production rate with AdjFGI. However we want to decrease L2 production rate first!!!

I tried to look into ALLOCATE AVAILABE function but I could not fully understand it,

Would be grateful for any help

Regards
/teha
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: One-to-Many allocation problem

Post by tomfid »

How about if you just surround AdjFGI with a MAX(0,...) or IF THEN ELSE() that prevents negative values?

Have you check the ALLOCATE sample models in the help system? Also see the Allocation section, http://www.vensim.com/documentation/all ... erview.htm

This case can probably be handled by ALLOCATE BY PRIORITY, which is simpler than ALLOCATE AVAILABLE. To ensure that all of L1 is used before any L2, just make sure that the priority for L1 exceeds that for L2 by more than the width parameter.
teha
Junior Member
Posts: 4
Joined: Fri Oct 12, 2012 7:19 am
Vensim version: DSS

Re: One-to-Many allocation problem

Post by teha »

Hi Tom,

I dont want to prevent negative values as the negative AdjFGI value indicates to decrease the production rate -> Desired Production Rate = Scheduled Production + AdjFGI

The problem is that when AdjFGI >= 0 (i.e. increase desired production rate or do nothing)
- First increase production rate in L1 (if possible)
- Secondly increase prodoction rate on L2 (L2 has no maximum capacity constraint)

However, when AdjFGI < 0 (i.e. decrease desired production rate )
-First decrease desired production rate in L2 (until its 0)
-Secondly decrease production rate in L1

Hence, when we increase we eant to prioritize L1, but when we decrease we want to prioritize L2,

Ill check in to ALLOCATE BY PRIORATY, thanks for the tip!

/teha
tomfid
Administrator
Posts: 3811
Joined: Wed May 24, 2006 4:54 am

Re: One-to-Many allocation problem

Post by tomfid »

I think constraining the rate of change of production, rather than an actual scheduled production rate, is adding a level of indirection that I'm not following. If you can post a submodel implementing this, it would be helpful.
Post Reply