User Tools

Site Tools


howtos:toolcoding:conditional_logic_for_code_running_in_simulation_vs_calibration

Environmental variables

Documeter (Dimensional Analysis)

$isEmpty == true

where $isEmpty is a property of a particular variable, read using getobjinfo()

simulator code simulator image within calibrator
simulator time (ts) running forwards
$history == false
NA
historical time (th) running backwards
$history == true
calibrator running forwards
$history == false

SAMM evaluation

$isEmpty == false

simulator code simulator image within calibrator
simulator time (ts) “normal” evaluation
$history == false
NA
historical time (th) eval his outs
$history == true
eval his ins
$history == false

Code examples

In the simulator:

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

But in the simulator image within the calibrator:

!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
howtos/toolcoding/conditional_logic_for_code_running_in_simulation_vs_calibration.txt · Last modified: 2011/06/14 19:29 by marcus.williams