This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howtos:toolcoding:projecting_a_share_into_simulation_time [2011/01/31 16:52] shona.weldon |
howtos:toolcoding:projecting_a_share_into_simulation_time [2011/02/15 21:36] (current) marcus.williams |
||
---|---|---|---|
Line 8: | Line 8: | ||
===== Example call to the sub-routine ===== | ===== Example call to the sub-routine ===== | ||
+ | <code> | ||
! NOTE these informants should be put into your model then these lines should not be included when calling the sub routine | ! NOTE these informants should be put into your model then these lines should not be included when calling the sub routine | ||
skipto afterInformants | skipto afterInformants | ||
Line 53: | Line 53: | ||
local firstHisYearForProjection[], asymtoticPercentChange[], joinMethod[] | local firstHisYearForProjection[], asymtoticPercentChange[], joinMethod[] | ||
+ | |||
+ | string $viewDesc = "view myViewName: " | ||
tool $informPath/satProjFromHist.t \ | tool $informPath/satProjFromHist.t \ | ||
Line 77: | Line 79: | ||
integer $joinMethod | integer $joinMethod | ||
getobjinfo (joinMethod[], $joinMethod; info=dataElement) | getobjinfo (joinMethod[], $joinMethod; info=dataElement) | ||
- | if $joinMethod = 1 | + | if $joinMethod == 1 |
buildstring ($viewDesc,$viewDesc,"join to projection of last 2 years of history") | buildstring ($viewDesc,$viewDesc,"join to projection of last 2 years of history") | ||
endif | endif | ||
- | if $joinMethod = 2 | + | if $joinMethod == 2 |
buildstring ($viewDesc,$viewDesc,"join to trend line") | buildstring ($viewDesc,$viewDesc,"join to trend line") | ||
endif | endif | ||
- | if $joinMethod = 3 | + | if $joinMethod == 3 |
buildstring ($viewDesc,$viewDesc,"join to trend projection of last history year") | buildstring ($viewDesc,$viewDesc,"join to trend projection of last history year") | ||
endif | endif |