This shows you the differences between two versions of the page.
Last revision Both sides next revision | |||
howtos:toolcoding:conditional_logic_for_code_running_in_simulation_vs_calibration [2011/06/14 19:18] marcus.williams created |
howtos:toolcoding:conditional_logic_for_code_running_in_simulation_vs_calibration [2011/06/14 19:25] marcus.williams |
||
---|---|---|---|
Line 18: | Line 18: | ||
====== Code examples ====== | ====== Code examples ====== | ||
+ | |||
+ | In the simulator: | ||
+ | |||
+ | <code> | ||
+ | if $history == true | ||
+ | censusCount[s,ts,a5] = cenPop[s,th,a5] | ||
+ | else | ||
+ | |||
+ | censusCount[s,ts,a5] = 1 - errorRatio[s,ts,a5] * popOnCenDay5[s,ts,a5] | ||
+ | endif | ||
+ | </code> | ||
+ | |||
+ | But in the simulator image within the calibrator: | ||
+ | |||
+ | <code> | ||
+ | !if $history == true | ||
+ | censusCount[s,ts,a5] = cenPop[s,th,a5] | ||
+ | !else | ||
+ | ! | ||
+ | ! censusCount[s,ts,a5] = 1 - errorRatio[s,ts,a5] * popOnCenDay5[s,ts,a5] | ||
+ | !endif | ||
+ | </code> | ||