Spreading1

A simple model to demonstrate spread across a landscape from a single point.

Spreading.scn
Scenario Information

Model Dimensions: 100, 100 Model.sel //SimPriority Low Priority

Model.sel
Seles Model 1 Time Units: Step KiloStep 1000 100 Landscape Events: Spreading.lse DEBUG Spatial Variables: DistanceFromSrc[(NumRows^2 + NumCols^2)^0.5+1] Visited[1] Global Variables: SpreadType = 0

Seles Model 2 Time Units: Step KiloStep 1000 100 Landscape Events: Spreading.lse Variable-Output View Maps: DistanceFromSrc Visited Output Model Bounds: DistanceFromSrc: NumCells*2 Visited: 1 Global Variables: SpreadType = 0

Spreading.lse
LSEVENT: SpreadingTypes DEFINITIONS LAYER: DistanceFromSrc, Visited GLOBAL VARIABLE: SpreadType CLUSTER VARIABLE: StartLocation CELL VARIABLE: distInc, d ENDDEF RETURNTIME RETURNTIME = 0 DistanceFromSrc = 2*NUMCELLS ENDRT EVENTLOCATION REGION LOCATION(LOCATION(NUMROWS/2, NUMCOLS/2)) ENDEL PROBINIT PROBINIT = 1 StartLocation = Location distInc = 0 d = 0 ENDPI TRANSITIONS TRANSITIONS = (d < DistanceFromSrc) Visited = 1 DistanceFromSrc = d ENDTR SPREADTIMESTEP = distInc SPREADLOCATION maxD = IF (1 <= SpreadType <= 3) THEN 1.5 ELSE 1 REGION CENTRED(1, maxD) DECISION DistanceFromSrc > (DISTANCE(StartLocation, Location)) ENDSL SPREADPROB SPREADPROB = 1 d = ROUND(DISTANCE(StartLocation, Location)) distInc = CLASSIFY(SpreadType) 0: 1              1: 1               2: DISTANCE(Location, SOURCE Location) 3: MAX(0,d - SOURCE DistanceFromSrc) ENDFN ENDSP