Solutions to common problems encountered in the JunoViewer modelling process
Detecting Triggered and Applied Treatments
Fritz Jooste Administrator Posts: 81
2/24/2021
|
Fritz JoosteAdministrator Posts: 81
This post deals with how to detect - in your DMS - when a treatment has JUST been triggered AND is being applied, inside of the current year increment and reset cycle.
Say for example, you have a model parameter that will have value X if there is no treatment applied in the model in the current year, and value Y if there is a treatment triggered by the model.
Note that you cannot rely on the values for your DMS Trigger equations to detect this - because even though a treatment may be triggered, it does not mean the treatment will be applied. This is because, whether or not a triggered treatment is applied may depend on many factors such as the budget available, whether the strategy is optimal, etc.
Thus the best way to detect whether there is a treatment being applied in the current year, is to rely on the "Years to Next Treatment" placeholder (named range "phYearsToNextTreatment" on the Placeholders sheet of your DMS).
If the number of years to the next treatment is zero, then that indicates that the model will be applying resets instead of increments in the current year.
The image below shows how you can program this condition into your DMS:
Note that you should not use the placeholder "Years Since Treatment" (named range "phYearsSinceTreatment"). You cannot, for example, use the check: "if Years Since Treatment = 0". This is because the model steps forward from the start of the year. Looking backward from the start of the year, the model will NOT detect a treatment inside the current year. This concept is explained in more detail in this help post.
edited by philip on 11/1/2021
|
|
0
link
|