Can I define an equation in its general form in Vensim?

Use this forum to discuss any issues relating to Systems Dynamics and Systems Thinking.
oikonomo
Junior Member
Posts: 2
Joined: Wed Jul 20, 2016 4:18 pm
Vensim version: PRO

Can I define an equation in its general form in Vensim?

Postby oikonomo » Wed Jul 20, 2016 4:33 pm

I am working with a model that involves a couple of equations that are defined in general form and wonder if I can directly type them in the equation editor.

To explain: The model involves an equation with endogenous variables A(x) and B(x,y) and parameter p(x) where "x" and "y" are subscripts with 3 and 4 elements each. The equation for variable B(x,y) has already been defined elsewhere in the model. I have the following equation left to be defined for A(x) in its general form:

sum [A(x) * B(x,y!)] = p(x)

I cannot produce a reduced form equation for A(x), that is, I cannot solve the above equation for A(x) or so I think. So I wanted to know if it is possible to write such equation in the general form above.

Many thanks for your attention

Leonardo

Administrator
Super Administrator
Posts: 2848
Joined: Wed Mar 05, 2003 3:10 am

Re: Can I define an equation in its general form in Vensim?

Postby Administrator » Thu Jul 21, 2016 2:05 pm

No, you can't do what you want here.

If you can explain what you are trying to do and include a sample model, we might be able to help.
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/viewtopic.php?f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559

oikonomo
Junior Member
Posts: 2
Joined: Wed Jul 20, 2016 4:18 pm
Vensim version: PRO

Re: Can I define an equation in its general form in Vensim?

Postby oikonomo » Thu Jul 21, 2016 6:27 pm

Ok thanks.

I'm putting in vensim an economy wide macro-micro model that is based on general equilibrium principles. The macro model includes a representation for government, the real sector and the external sector. The micro model uses household level data to estimate variables such as household consumption, income and investment derived from a standard neoclassical optimization problem for households and firms. Aggregating such data across households yields values such as total private consumption, capital formation and national income. There is a labor market that clears, that is, one where price of labor (PL) adjust to differences between demand and labor supply. The Labor Demand equation (QL) is one that is defined from solving a firm's cost minimization problem given the quantity of Output that is demanded in the market and its price. QL is defined over activities and labor type, so:

QL(labor,act) = Beta(labor,act)*[OUTPUT(act)*PRICEOUTPUT(act)] / PL(labor,act)

Variables are expressed in caps and parameters in lower case. Beta is a labor share parameter. OUTPUT and PRICEOUTPUT are endogenously determined elsewhere in the model.

The price of labor, PL, is obtained from comparing aggregate labor demand, QL, and labor supply (qs). For the time being, labor supply is exogenously introduced. Now, a crucial issue is that I want the price of labor to equalize across activities, but not across types of labor. That is, there is perfect mobility of labor across activities but different wages by type of labor. This implies that my equation for the price of labor, by labor type [PL(labor)] should be obtained from:

sum[PL(labor,act!) * QL(labor,act!)] = qs(labor)

This would yield a price of labor by type of labor PL(labor) that is equal across activities. However, I cannot find a way of expressing this in such a way that I get PL(labor). I thought about defining the PL(labor) as auxiliary (type) simultaneous (sub-type) variable and then type SIMULTANEOUS(sum[PL(labor,act!) * QL(labor,act!)]) and initial value = qs(labor) but I think this is not the right use for this feature.

Again, many thanks for your attention

Administrator
Super Administrator
Posts: 2848
Joined: Wed Mar 05, 2003 3:10 am

Re: Can I define an equation in its general form in Vensim?

Postby Administrator » Mon Jul 25, 2016 12:02 pm

Are you looking for something like this?

Code: Select all

tempvar 1[labor] = sum ( PL[labor,act!] * QL[labor,act!] )

proportion[labor] = zidz ( tempvar 1[labor] , sum ( tempvar 1[labor!] ) )

actual PL[labor] = proportion[labor] * qs[labor]
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/viewtopic.php?f=2&t=4391

Units are important!
http://www.bbc.co.uk/news/magazine-27509559


Return to “System Dynamics Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest