ERROR:xxx is not used in the model

Use this forum to post Vensim related questions.
Post Reply
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

ERROR:xxx is not used in the model

Post by kong17 »

Dear sir

I need to build the relationship between price and demand.
So, throug price elasticity, compare the current price with past price to get the effect of price chages on demand.
But, when I build it in model, it doesn't work. The error is some value is not used in the model.
I think it maybe because the market price in the model is the output through the FIND MARKET PRICE function, and when calculating the price effect price, the market price becomes the input, which is a contradiction.
I try to add an initial vaule in the FIND MARKET PRICE, it also doesn't work.
I also try to use a Fixed Delay and set the delay time to 0. However, because an initial value must be set, the current price is the previous value of the market price.
So, I was wondering how to solve it?
I uploaded a simple model based on the example of FIND MARKET PRICE function.
Please have a look, thank you very much.

Best wishes
Attachments
DEMAND AT PRICE (7).mdl
(6.96 KiB) Downloaded 163 times
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

This is a warning, not an error. The model will still run.

The purpose is to make it evident that a variable is unused, which is sometimes a mistake. However, if non-use is deliberate, you can suppress the warning by checking the "Supplementary" box in the equation editor.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

If you check the dropdown error menu, you will find that there are more issues:

Code: Select all

USE FLAG:    -total demand- is not used in the model.    
USE FLAG:    -total supply- is not used in the model.    
ERROR:       Simultaneous equations involving:  demand satiation[d1].    
                                             :  market price.    
                                             :  current price.    
                                             :  effect price.    
                                             :  demand satiation[d1].    
The simultaneity is the real problem.
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

What you're doing here is basically double-counting the price elasticity effect. The allocation functions already assume a supply curve and demand curve, with elasticities that are implicit for a given choice of width and ptype (shape) parameters.
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

Re: ERROR:xxx is not used in the model

Post by kong17 »

tomfid wrote: Wed Feb 26, 2020 6:00 pm What you're doing here is basically double-counting the price elasticity effect. The allocation functions already assume a supply curve and demand curve, with elasticities that are implicit for a given choice of width and ptype (shape) parameters.
Hi, the ptype (5) is constant elasticity, I am not sure the width, is this parameter means the elasticity that I set, for example, for demand curve, the demand priority width is negative (-0.25). I find the equation about constant elasticity is [quantity = A * price ^ ε] in Vensim help. Is it used in the FIND MARKET PRICE function?
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

Re: ERROR:xxx is not used in the model

Post by kong17 »

tomfid wrote: Wed Feb 26, 2020 5:57 pm If you check the dropdown error menu, you will find that there are more issues:

Code: Select all

USE FLAG:    -total demand- is not used in the model.    
USE FLAG:    -total supply- is not used in the model.    
ERROR:       Simultaneous equations involving:  demand satiation[d1].    
                                             :  market price.    
                                             :  current price.    
                                             :  effect price.    
                                             :  demand satiation[d1].    
The simultaneity is the real problem.
Ok, like I describe above, the market price is the output by demand and supply, and in the current price is the input at the sametime.
So, this error cannot be solved?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

For the constant elasticity curve, see:
https://www.vensim.com/documentation/24335.htm
The width and elasticity parameters are always positive, though for a demand curve, it will be interpreted as negative, e.g. p^(-e).
kong17
Senior Member
Posts: 60
Joined: Wed May 30, 2018 1:12 pm
Vensim version: PRO

Re: ERROR:xxx is not used in the model

Post by kong17 »

tomfid wrote: Thu Feb 27, 2020 5:12 pm For the constant elasticity curve, see:
https://www.vensim.com/documentation/24335.htm
The width and elasticity parameters are always positive, though for a demand curve, it will be interpreted as negative, e.g. p^(-e).
Hi,
I have read the link, I also read the User Guide of Vensim, but I have a little question about the constant elasticity (ptype 5).

q(x) = q0 * (x/ppriority)^(-pextra) if x > pwidth
q(x) = q0 * (pwidth/ppriority)^(-pextra)if x <= pwidth

what does x, pwidth means in the function?
The ppriority of element is the midpoint of the curve and the pwidth determines the speed, which are defined in the ptype0-ptype4, is it same in ptype5?

The ppriority is the mindpoint of curve, for example, there are 3 different marginal cost (5,10,15), does the ppriority is 10?
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

x is the market clearing priority from FIND MARKET PRICE.

pwidth is interpreted as a cutoff priority and which supply and demand are truncated. This prevents infinite demand at zero price, and preserves the allocation logic enforcing limited supply and demand capacities. However, if you want unconstrained curves, you could set pwidth to a very low value (for demand) and very high value (for supply).

This is a modified version of the sample model in the help system.
DEMAND AT PRICE CE.mdl
(9.1 KiB) Downloaded 164 times
It adds some "scan" variables that use a ramp input to scan over the market clearing priority. Then you can easily see what the supply and demand curves are doing.

For example, if you set the parameters like this:
settings.png
settings.png (41.47 KiB) Viewed 4028 times
You get this:
result.png
result.png (16.76 KiB) Viewed 4028 times
tomfid
Administrator
Posts: 3806
Joined: Wed May 24, 2006 4:54 am

Re: ERROR:xxx is not used in the model

Post by tomfid »

Above, you can see that demand is hyperbolic, x^(-pextra), until x falls to pwidth=.5, below which it's flat. Similarly, supply rises with x^.666 until x=pwidth=2.
Post Reply