Illegal bounds on vector argument computing error
Posted: Mon Jan 27, 2025 10:56 pm
Hello,
I am building a model that includes allocating the available supply based on the value (demand*price) of different markets. I use the ALLOCATION BY PRIORITY function, however, I receive two errors (1) "Illegal bounds on vector argument computing error" and (2)"Floating point error computing" for the same variable which tries to allocate by priority. My formulation is as below:
sales by market[Market, Product]=ALLOCATE BY PRIORITY(market demands[Market, Product], market priority[Market, Product], ELMCOUNT(Market), priority width, maximum shipment[Product])
Basically, I have different products and markets. For each product, my model should allocate the available supply based on market value (this is my priority). Other formulations are:
market priority[Market, Product]=value by market[Market, Product]/SUM(value by market[Market!, Product])
priority width = 1
maximum shipment[Product]= Inventory[Product]/shipment delay
In Vensim Help it states for ALLOCATE BY PRIORITY that " It works only when the left hand side, request and priority all have the same final subscript. " In my case, these subscripts are all [Market, Product]. Can you please help me to understand the problem?
I am building a model that includes allocating the available supply based on the value (demand*price) of different markets. I use the ALLOCATION BY PRIORITY function, however, I receive two errors (1) "Illegal bounds on vector argument computing error" and (2)"Floating point error computing" for the same variable which tries to allocate by priority. My formulation is as below:
sales by market[Market, Product]=ALLOCATE BY PRIORITY(market demands[Market, Product], market priority[Market, Product], ELMCOUNT(Market), priority width, maximum shipment[Product])
Basically, I have different products and markets. For each product, my model should allocate the available supply based on market value (this is my priority). Other formulations are:
market priority[Market, Product]=value by market[Market, Product]/SUM(value by market[Market!, Product])
priority width = 1
maximum shipment[Product]= Inventory[Product]/shipment delay
In Vensim Help it states for ALLOCATE BY PRIORITY that " It works only when the left hand side, request and priority all have the same final subscript. " In my case, these subscripts are all [Market, Product]. Can you please help me to understand the problem?