Good afternoon,
I need to create a variable (can be level) where I have an initial value and need to go discounting this value, for example:
X = 30 initial value
Y = 1,2,3,4
Z = 20 at the end of the simulation
How Do I Get Z?
What kind of variable to use
Re: What kind of variable to use
I think you'll have to supply some more detail here. What are x, y and z and their units? What is this system doing?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: What kind of variable to use
X is an initial value, amount of raw material that the company receives per month
Y is the amount of raw material consumed over the month
Z is what still has available raw material
What has available (Z) is used for the production of the product (W) that will supply the amount of raw material used (Y).
The units are all liters.
Y is the amount of raw material consumed over the month
Z is what still has available raw material
What has available (Z) is used for the production of the product (W) that will supply the amount of raw material used (Y).
The units are all liters.
Re: What kind of variable to use
So, putting this in SD language,
X is the inflow of material supply
Y is the outflow of material consumption
Z is the stock of material on hand
Then:
Z = INTEG(X-Y, initial Z)
If the units for Z are liters, then X and Y must be in liters/month.
One way to frame this is as an optimization problem, using the optimizer to determine the X needed to provide enough material to serve Y and leave Z=20 at the end.
An approach that's more likely to be satisfying is to treat this as a dynamic stock management problem, like the "target production" decision in the workforce-inventory model distributed with Vensim:
https://www.vensim.com/documentation/21445.htm
X is the inflow of material supply
Y is the outflow of material consumption
Z is the stock of material on hand
Then:
Z = INTEG(X-Y, initial Z)
If the units for Z are liters, then X and Y must be in liters/month.
One way to frame this is as an optimization problem, using the optimizer to determine the X needed to provide enough material to serve Y and leave Z=20 at the end.
An approach that's more likely to be satisfying is to treat this as a dynamic stock management problem, like the "target production" decision in the workforce-inventory model distributed with Vensim:
https://www.vensim.com/documentation/21445.htm
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: What kind of variable to use
Is Z a level variable?
Re: What kind of variable to use
Correct. Terminology varies unfortunately, but stock = level = state variable = integral, and flow = rate = derivative.
In Vensim, stocks are defined by the INTEG function, and usually a box on the diagram (though you can change the diagram to diverge from the convention).
In Vensim, stocks are defined by the INTEG function, and usually a box on the diagram (though you can change the diagram to diverge from the convention).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: What kind of variable to use
It is not working because the simulation runs in a period of 2683 (which is the period of a month of 15 in 15 minutes) and the variable X is a data that enters at t = 0 and decays as used (Y), however the Variable Z is accumulating at each t + 1 it increases the value of X and decreases Y. I need a variable that reduces the stock (initial value when t = 0) over time, as production increases.
Re: What kind of variable to use
Can you post the model?
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Re: What kind of variable to use
The model is attached, the variables I am trying to adjust are in blue, contextualizing with the previous conversations the amount of fuel received is X, Y is the fuel output and Z represents stored alcohol.
- Attachments
-
- Demanda e consumo UFSM- abril 2014 e 2015.xlsx
- (873.66 KiB) Downloaded 175 times
-
- Etanol Hard- Pequena Escala 3.mdl
- (24.75 KiB) Downloaded 191 times
Re: What kind of variable to use
I think the problem is that you don't have any feedback to determine the inflow (Quantidade de combustível recebido). Setting it to a constant won't work in general.
The generic form of what you need is something like:
inflow = expected outflow + (desired stock - stock)/stock adjustment time
There's an example of this in the workforce-inventory model link I posted above (except in that case, the inflow is not direct, but mediated by the labor force).
The generic form of what you need is something like:
inflow = expected outflow + (desired stock - stock)/stock adjustment time
There's an example of this in the workforce-inventory model link I posted above (except in that case, the inflow is not direct, but mediated by the labor force).
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/