Dear all,
I am trying to run a sensitivity analysis where some of the parameter I am using a discrete distribution rather than a continuous one.
for example I want a discrete random uniform distribution in the range [30,60] that select whole numbers only like 32,48,51 etc.
How would I do this for a parameter in a multivariate sensitivity analysis?
Thank you in advance...
YR
Using Discrete Distributions in Sensitivity Analysis
-
- Junior Member
- Posts: 13
- Joined: Mon Mar 29, 2010 4:28 am
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
You will need to take the parameters and pass them through the INTEGER function in the model. eg if you had
constant = 1
you would need to have
constant = INIT(INTEGER(constant input))
constant input = 1
then run the sensitivity on constant input. Note the INIT function is just an efficiency thing that prevents the equation for constant from being computed at all times.
constant = 1
you would need to have
constant = INIT(INTEGER(constant input))
constant input = 1
then run the sensitivity on constant input. Note the INIT function is just an efficiency thing that prevents the equation for constant from being computed at all times.
INIT = INITIAL
INITIAL always has to appear first in an equation. I sometimes add an INIT macro to my models, so that I can write things like relativeX = x/INIT(x)
:MACRO: INIT(x)
INIT = INITIAL(x)
~ x
~ |
:END OF MACRO:
INITIAL always has to appear first in an equation. I sometimes add an INIT macro to my models, so that I can write things like relativeX = x/INIT(x)
:MACRO: INIT(x)
INIT = INITIAL(x)
~ x
~ |
:END OF MACRO:
/*
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
*/
-
- Junior Member
- Posts: 13
- Joined: Mon Mar 29, 2010 4:28 am
Use INTEGER(x*10+0.5)/10
/*
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
*/