Dynamic cohorts with stock change
Posted: Wed Dec 22, 2021 6:48 am
I've been developing an electric vehicle forecast model in Ventity using the dynamic cohort pattern. I have two entities defined: LGA; and VehicleCohort. LGA represents spatial areas, namely local government areas. VehicleCohort contains information about the age of each cohort, number of registered vehicles by cohort and vehicle range.
I managed to get this working the way I want it, but I have a feeling there is a better way to implement the logic. In particular, the way I increase the Range attribute (actually a stock) in the create cohort action. Is there a more elegant way to implement this? I intend to add more complex logic, but wanted to build on the best foundation possible.
I have attached the model CarsByLGA2.zip for your reference. Thanks.
I managed to get this working the way I want it, but I have a feeling there is a better way to implement the logic. In particular, the way I increase the Range attribute (actually a stock) in the create cohort action. Is there a more elegant way to implement this? I intend to add more complex logic, but wanted to build on the best foundation possible.
I have attached the model CarsByLGA2.zip for your reference. Thanks.