Hi,
I am working on a model of a hospital Emergency Department (ED). The number of patients in the ED is given by
Patients in ED[Priority]= INTEG (
Transportation rate to ED[Priority]+"Walk-in and other non-995 cases"-ED Treatment Rate
[Priority],
5000)
Units: Case
**************************************************************
There are four values (P1-P4) of the Priority subscript, and my current definition sets the initial value for each Priority level to 5000. I would like to set initial values for each of them to different starting points, for example:
P1 = 500, P2 = 1000, P3 = 1500, P4 = 2000.
How can I do this?
Best regards
Set of initial values for a level with subscripts
-
- Junior Member
- Posts: 15
- Joined: Tue Apr 06, 2021 9:31 am
- Vensim version: DSS
-
- Super Administrator
- Posts: 4590
- Joined: Wed Mar 05, 2003 3:10 am
Re: Set of initial values for a level with subscripts
The best option would be to put these values in a separate CIN file. You can hard code them into your model (see below), a CIN file will be better in the long run.
Code: Select all
Patients in ED[Priority]= INTEG (
Transportation rate to ED[Priority]+"Walk-in and other non-995 cases"-ED Treatment Rate
[Priority],
initial patients in ed[priority])
initial patients in ed[priority] = 500, 1000, 1500, 2000
Advice to posters seeking help (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Units are important!
http://www.bbc.co.uk/news/magazine-27509559
Re: Set of initial values for a level with subscripts
Also, for things that are not expressible as a list of constants, TABBED ARRAY, or GET XLS link, you can always write equations individually for each element of a subscript range:
https://vensim.com/documentation/21265.html
https://vensim.com/documentation/except ... tions.html
https://vensim.com/documentation/21265.html
https://vensim.com/documentation/except ... tions.html
/*
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: 15
- Joined: Tue Apr 06, 2021 9:31 am
- Vensim version: DSS
Re: Set of initial values for a level with subscripts
Thank you for those helpful replies. I am able to get the model to work.