Spreading2

Spreading.scn
SELES Scenario Model Dimensions: 500, 500 Model.sel SimPriority Low Priority

Model.sel
Seles Model Time Units: milliYear Year 1000 1000000 Landscape Events: Spreading.lse DEBUG Global Constants: MaxTSF = 100 Spatial Variables: TimeSinceFire[MaxTSF] Attempted[1] Global Variables: SpreadDist = 1 pSpread = 1 SpreadType = 1 pFire = 1

Spreading.lse
LSEVENT: Spreading DEFINITIONS LAYER: TimeSinceFire, Attempted GLOBAL VARIABLE: SpreadDist, pSpread, SpreadType, pFire GLOBAL CONSTANT: MaxTSF CLUSTER VARIABLE: StartLocation CELL VARIABLE: distInc, d ENDDEF INITIALSTATE INITIALSTATE = 1 TimeSinceFire = MaxTSF ENDIS RETURNTIME RETURNTIME = 0 TimeSinceFire = MIN(TimeSinceFire+1, MaxTSF) Attempted = 0 ENDRT EVENTLOCATION REGION WHOLE MAP DECISION TimeSinceFire > 50 ENDEL NUMCLUSTERS = IF (UNIFORM(0,1) < pFire) THEN 1 ELSE 0 PROBINIT PROBINIT = TimeSinceFire/MaxTSF StartLocation = Location distInc = 0 d = 0 ENDPI TRANSITIONS TRANSITIONS = TimeSinceFire > 0 TimeSinceFire = 0 ENDTR SPREADTIMESTEP = distInc SPREADLOCATION REGION CENTRED(1, SpreadDist) //, WRAPPED)     DECISION IF SpreadType <= 1 THEN TimeSinceFire > 50               ELSE (TimeSinceFire > 60) AND (!Attempted)   Attempted = 1 ENDSL SPREADPROB   SPREADPROB = pSpread   d = ROUND(DISTANCE(StartLocation, Location))   distInc = IF SpreadType EQ 0 THEN 1 ELSE MAX(0,d - SOURCE d) ENDSP