Subscript Subrange
Posted: Thu Oct 17, 2019 8:50 am
Good morning/evening/afternoon.
It has been a while since I last posted here. But myself (and the Company I work for) are slowly but surely getting back into the use of Vensim.
I have a model that generates an aircraft flying programme. There are 100 aircraft (so I have a subscript called [aircraft] that has 100 elements) and the sorties are applied to any aircraft that is "available" at the time, using an ALLOCATE BY PRIORITY function. The aircraft then "take off" and, upon landing might be subject to corrective or preventative maintenance (making them unavailable for the duration of the maintenance). This works quite well. However:
The 100 aircraft might now be a combination of single seat and twin seat. They each have their own availability measure and one or two variables (such as MTBF) might also be different. However, they use the same maintenance etc. resource. So, they need to be identified separately. i.e, there needs to be a single seat flying programme that only single seat aircraft (such as a1 - a50) can fulfil and a twin seat flying programme that only twin seat aircraft (such as a51 - a100) are subject to. And the output (such as aircraft availability) needs to differentiate single seat availability and twin seat availability. However, after the aircraft have been allocated a sortie, they then follow the same maintenance route and share the same resources.
So, I was thinking if there is a subrange of the subscript that could be used? Single seat (a1 - a50) and twin seat (a51 - a100) and how the two are represented in subsequent equations. i.e, rather than a variable called "successfully assigned sorties[aircraft]" how would it be represented?
I can email the model (don't want to post it on here) if clarity is required.
Many thanks
Nik
It has been a while since I last posted here. But myself (and the Company I work for) are slowly but surely getting back into the use of Vensim.
I have a model that generates an aircraft flying programme. There are 100 aircraft (so I have a subscript called [aircraft] that has 100 elements) and the sorties are applied to any aircraft that is "available" at the time, using an ALLOCATE BY PRIORITY function. The aircraft then "take off" and, upon landing might be subject to corrective or preventative maintenance (making them unavailable for the duration of the maintenance). This works quite well. However:
The 100 aircraft might now be a combination of single seat and twin seat. They each have their own availability measure and one or two variables (such as MTBF) might also be different. However, they use the same maintenance etc. resource. So, they need to be identified separately. i.e, there needs to be a single seat flying programme that only single seat aircraft (such as a1 - a50) can fulfil and a twin seat flying programme that only twin seat aircraft (such as a51 - a100) are subject to. And the output (such as aircraft availability) needs to differentiate single seat availability and twin seat availability. However, after the aircraft have been allocated a sortie, they then follow the same maintenance route and share the same resources.
So, I was thinking if there is a subrange of the subscript that could be used? Single seat (a1 - a50) and twin seat (a51 - a100) and how the two are represented in subsequent equations. i.e, rather than a variable called "successfully assigned sorties[aircraft]" how would it be represented?
I can email the model (don't want to post it on here) if clarity is required.
Many thanks
Nik