Allocate Available function

Use this forum to post Vensim related questions.
Post Reply
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Allocate Available function

Post by krreddi »

Hi,

Please help me out.

I am trying to allocate resources between say two projects A and B. I have resources dedicated to only A and resources dedicated to only B. In addition to dedicated project resources I have a Common resources pool which I want to use only when the project's dedicated resources are used/depleted.

Suppose Proj A has got 5 dedicated resources and Proj B has 3 dedicated resources and 6 common resources which can be used by both A and B only when their dedicated resources are depleted.

How can i model this case and How does it work when A requires 7 and B requires 4?. A is given the priority.


Thanks
Krishna

[Edited on 2-12-2010 by krreddi]
LAUJJL
Senior Member
Posts: 1421
Joined: Fri May 23, 2003 10:09 am
Vensim version: DSS

Allocate

Post by LAUJJL »

Hi Krishna

I have never used so far the allocate functions which are rather tricky. If you want to have full control on the model, I think that the problem can be solved without the use of any allocate function.
Here is joined the diagram for the model.
Adding the equation should not be difficult using the max,min and if then else function.
One should study closely the 8 loops that are based on the common ressources and the other loops to understand how the model works.
Regards.
JJ

[Edited on 12-2-2010 by LAUJJL]
Attachments
Allocate.mdl
(5.75 KiB) Downloaded 301 times
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Hi Krishna,

You can also check the molecules for alternatives to the allocation functions. The situation you describe is pretty straightforward. In your case you just subtract the dedicated resources from the requirements to get net requirements

net required resource[project] = MAX(required resource[project] - dedicated resource[project],0)

This would then correspond to demand[branch] in the documentation for allocate available. And shipments from the documentation would correspond to the allocation of shared resources to each project.
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Allocate By Priority - response to Krishna

Post by karankhosla »

Hi Krishna,

Attached is the model as you would need it - you can change the parameters. In the same fashion as JJ, I have not used allocation by priority. The "prioritization" takes places by using a condition that once the additional demand of A is met, the flow for additional material for B is activated.

Best Wishes,

Karan
Attachments
ALLOCATE BY PRIORITY_kk.mdl
(5.52 KiB) Downloaded 286 times
karankhosla
Senior Member
Posts: 107
Joined: Wed Nov 26, 2008 6:12 am

Post by karankhosla »

Krishna, apologies; attached is the revised model, I forgot to add an important non-negativity constraint to the outflows of the common resources.

Best.

Karan
Attachments
ALLOCATE BY PRIORITY2_kk.mdl
(5.53 KiB) Downloaded 290 times
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Thanks for all your response. I never thought I would get this quick reply. This is really encouraging.

Krishna
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Is it possible to model a similar model but a bit complex in my view.

I have got five projects: project1, project2, project3, project4 and project 5. Each project requires 3 types (like Disciplines) of resources to complete the projects, say resource1, resource2 and resource3. And apart from these resources there are two another type of resource4 which can be used in place of resource 1 or resource2; and resource5 which can be used in place of resource2 or resource3. Resource4 and resource5 are used only when resource1, resource2 or resource3 are exhausted.

And during allocation we need to allocate these three types of resources to all projects based on the project's priority and use the resource4 and resource5 only when the corresponding resources are exhausted. I have modeled but not sure how it works. If any one can guide me that would be great I would be grateful.


What I have done is I used subscripts for each resource type and am trying to allocate the resources according to phase priority. The only thing I am doubting is the way it works. Because for the resource4 and resource5 I had subtracted the demand from available resource types 1,2 and 3; to get the net demand for resource types 4&5 and have allocated accordingly. The only thing I doubt is, Since I am trying to allocate these resources according to project priority ; what happens if one resource say, resource2 is short at one point of time?.


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

Post by bob@vensim.com »

You can allocate resources 1 through 3 using ALLOCATE AVAILABLE, then compute the shortfall for each project and thus the requirements for resources 4 and 5. Because ALLOCATE AVAILABLE works on ranges it is safest to create two different subscripts - one for resources 1-3, and one for 4 and 5. IF you want to combine these into a single subscript range outsize the ALLOCATE AVAILABLE logic that is fine, but this would need to be a third subscript range, using subranges will not work.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Bob,

What happens if we use two allocate functions to allocate the same set of resources?.

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

Post by bob@vensim.com »

Hi Krishna,

The idea behind an allocation function is to spread around what is available. If you do that with two different computations you will defeat the purpose of the functions since combined they will need more than what is available. It is possible to use a two stage allocation. Where some resources, or some demanders, are dealt with first and then any leftover is dealt with in a second computation. This type of formulation is pretty common in classic SD style allocations. In many cases ALLOCATE AVAILABLE removes the need for this since it is possible to just cluster the first and second groups by priority.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Hi Bob,

I have another question for you. In the previous post I was talking about resource4 and 5 that can replace resource 1 to 3. After allocating the resources1 to 3, I calculate the demand for resource 4, But resource4 can replace both resource1 and 2. Now I want to allocate resource4 to replace 1 and then allocate any unallocated resources to replace resource2. And then allocate resource5 to replace resource2 (If there is any demand that is unmet) and 3 with priority given to resource2.

Thanks
Krishna
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Post by tomfid »

A basic assumption of the ALLOCATE logic, as I understand it, is that the quantities allocated are essentially an undifferentiated commodity. Given that the substitution relationships among resources are not symmetric, I think that assumption is violated. Therefore it does make sense to me to use a multi-stage allocation process.

That said, I'm tempted to ask more about the problem circumstances. What question requires that these resources be differentiated and allocated separately? Is there some way to simplify, to capture the big picture?
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Hi Krishna,

From the description you give it does sound like it will be easiest just to cascade things (perhaps after an initial allocation). Most likely this means writing 1 equation for each allocation combo and using that to compute a remainder then moving on to the next.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Does "Allocate Available" function allocate fractional resources?. I am having a problem with allocation. I have been doing the allocation in stages but the problem is that, after one stage of allocation when I calculate the required resources after that phase it is giving fractional values. But when I check the values of allocated resources and required resources both seem to be integers while the difference of the both is coming to be a fraction(a very small number of order -5). So My question is regarding the allocation in allocate available function. Can someone point out the possible point of error or any other suggestions?

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

Post by bob@vensim.com »

ALLOCATE AVAILABLE works on real values and will definitely allocate fractional values. My best guess is that what you are seeing is simply round off presentation of the allocations which makes them look like integers. If you are looking at values using the Table tool try setting the format to %g to see more digits.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Bob,

Is there a way we can make sure that the ALLOCATE AVAILABLE function allocates only whole number (values) of resources?. For what is the "pwidth" variable in the example provided for ALLOCATE AVAILABLE in the manual? To my understanding it should be the one managing the minimum allocation right?.

Thanks,
Krishna

[Edited on 3-14-2010 by krreddi]
bob@vensim.com
Senior Member
Posts: 1107
Joined: Wed Mar 12, 2003 2:46 pm

Post by bob@vensim.com »

Pwidth works on the attribute axis, not the allocation axis. The allocation function won't do integer allocations, I am afraid you will need to write an external function to accomplish that.
krreddi
Member
Posts: 39
Joined: Sat May 16, 2009 9:03 pm

Post by krreddi »

Bob,

I have one more question. Is there any possibility that fractional resources are allocated even when the required resources are integer?. Because it seems to be happening in my case. when my required resources are 7 it is allocating 4.00002 resources. Or is there something I can do to avoid this in addition to using the INTEGER function for allocated resources?

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

Post by bob@vensim.com »

The allocations will almost always be fractional unless the full demand can be met.
Post Reply