This shows you the differences between two versions of the page.
Next revision | Previous 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:29] (current) marcus.williams |
||
---|---|---|---|
Line 4: | Line 4: | ||
$isEmpty == true | $isEmpty == true | ||
+ | |||
+ | where $isEmpty is a property of a particular variable, read using ''getobjinfo()'' | ||
^ ^ simulator code ^ simulator image within calibrator ^ | ^ ^ simulator code ^ simulator image within calibrator ^ | ||
Line 18: | Line 20: | ||
====== 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> | ||