edu.bonn.xulu.plugin.model.ca.fire
Class ImpetusFireCA

java.lang.Object
  extended by AbstractNamedObject
      extended by edu.bonn.xulu.model.AbstractXuluModel
          extended by edu.bonn.xulu.model.AbstractStepModel
              extended by edu.bonn.xulu.plugin.model.ca.fire.ImpetusFireCA
All Implemented Interfaces:
StepModel, XuluModel

public class ImpetusFireCA
extends AbstractStepModel

Diese Klasse stellt eine Implementierung des Modells ImpetusFireCA dar. Dieses benoetigt 7 Ressourcen, welche durch den ImpetusFireCAContentManager spezifiziert werden:

  1. Allgemeine Modell-Parameter (modelParam): Dynamisches Xulu-Objekt mit folgenden Propertys:
  2. Brandherde (startPoints): FeatureCollection (z.B. aus Shape-File) mit ein oder mehreren georeferenzierten Punkten, die als Startpunkte fuer die Feuer-Ausbreitung verwendet werden.
  3. LUC Classification (baseLUC): Raster mit LUC-Klassifikation (Ausgangsszenario).
  4. Brenn-Eignung (burnFit, optional): Raster mit Brenn-Wahrscheinlichkeiten pro Zelle (lokale Brenneignung)..
  5. Ausgabe-Raster fuer modellierte LUC (outLUC): Raster, in dem die modellierte LUC ("burning" und "burned out") hinterlegt wird.
  6. Ausgabe-Raster fuer verbrannte Biomasse (outBurnMass, optional): Raster, in dem die verbrannte Biomasse pro Zelle hinterlegt wird. Wird zur Zeit noch nicht genutzt!
  7. Temp-Raster fuer Brenn-Zeit (burnTime): Raster, in dem waehrend des Modellablaufs die Zeiten hinterlegt werden, die eine Zelle brennt, um die Zellen "irgendwann" als ausgebrannt zu markieren.

Version:
1.0
Author:
Martin Schmitz (University of Bonn/Germany)
See Also:
ImpetusFireCAContentManager

Field Summary
protected  int areaMaxX
           
protected  int areaMaxY
           
protected  int areaMinX
           
protected  int areaMinY
           
protected  WritableGrid baseLUC
           
protected  int burnedOutLUC
           
protected  Vector<int[]> burningCells
           
protected  int burningLUC
           
protected  WritableGrid burnSuitability
           
protected  WritableGrid burnTime
           
protected  double cellSize
           
protected  ImpetusFireCAContentManager contManager
          Speichert den ContentManager fuer das Modell.
protected  int iterCount
           
protected  double iterSeconds
           
static Logger LOGGER
          Logger fuer Debug-Ausgaben und Warnings.
protected  double[] lucBurningSuitability
           
protected  double[] lucBurningTime
           
protected  int lucCount
           
protected  double MAX_burningSuitability
           
protected  double MAX_lucBurningSuitability
           
protected  double MAX_windMatrix
           
protected  Component modelGUI
           
protected  DynamicXuluObject modelParam
           
protected  HashMap<int[],Object> newBurningCells
           
protected  WritableGrid outBurnMass
           
protected  WritableGrid outLUC
           
static String PARAM_PROP_BURNLUC
           
static String PARAM_PROP_BURNOUTLUC
           
static String PARAM_PROP_BURNSUIT
           
static String PARAM_PROP_BURNTIME
           
static String PARAM_PROP_MODELTIME
           
static String PARAM_PROP_WINDDIRECTION
           
static String PARAM_PROP_WINDDIRECTIONDEV
           
static String PARAM_PROP_WINDMATRIX_PCONST
           
static String PARAM_PROP_WINDMATRIX_PFACT
           
static String PARAM_PROP_WINDPOWER
           
static String PARAM_PROP_WINDPOWERDEV
           
static String PARAM_PROP_WINDPOWERMAXBW
           
protected static ResourceProvider RESOURCE
          ResourceProvider, der die Uebersetzungen fuer die GUI bereitstellt: locales.XuluModel_ImpetusFireCA
protected  FeatureCollection startPoints
           
protected  Vector<int[]> uselessBurningCells
           
protected  double windDir
           
protected  double windDirDev
           
protected  double[] windMatrix
           
protected  double windMatrix_powerConst
           
protected  double windMatrix_powerFact
           
protected  double windPow
           
protected  double windPowDev
           
protected  double windPowMaxBW
           
 
Fields inherited from class edu.bonn.xulu.model.AbstractStepModel
stepCount
 
Fields inherited from class edu.bonn.xulu.model.AbstractXuluModel
disposed, events, initialised, listeners, modelResourceProvider, running, statusOut, stopped
 
Constructor Summary
ImpetusFireCA()
          Erzeugt eine neue Instanz des Modells.
 
Method Summary
protected  double calculateBurnProbability(int x, int y, double wind)
          Berechnet die Wahrscheinlichkeit, dass eine Zelle brennt.
 Component getModelSpecificGUI()
          Liefert die modellspezifische GUI.
protected  void initBurningCells(FeatureCollection burnSource)
          Initialisiert die Liste der Brandherd-Zellen ueber die georeferenzierten Punkte einer FeatureCollection.
protected  void performBurning(Vector<int[]> bCells)
          Erhoeht die Menge der verbrannten Biomasse einer Zelle, sowie die Brennzeit.
 void performModelDispose()
          Gibt die Lese/Schreibrechte auf das Ein- und Ausgaberaster wieder frei.
 void performModelInit()
          Initialisiert das Model, indem die Ressourcen aus dem ContentManager geladen werden und mit Lese/Schreib-Rechten versehen werden.
 void performModelStep(int stepNo)
          Fuehrt einen Schritt des Modellablaufs durch.
 
Methods inherited from class edu.bonn.xulu.model.AbstractStepModel
fireModelStepFinished, fireModelStepStarted, getStepCount, performModelStart
 
Methods inherited from class edu.bonn.xulu.model.AbstractXuluModel
addModelListener, checkBreakingCommands, determineCaption, disposeModel, fireModelDisposed, fireModelEvent, fireModelInitialised, fireModelStarted, fireModelStopped, getContentManager, getEvents, getResourceProvider, getStatusOut, initModel, isDisposed, isInitialised, isRunning, isStopped, performError, releaseAccess, removeModelListener, resetCaptions, setStatusOut, startModelling, stopModelling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.bonn.xulu.model.XuluModel
addModelListener, disposeModel, getContentManager, getEvents, getResourceProvider, getStatusOut, initModel, isDisposed, isInitialised, isRunning, isStopped, performError, removeModelListener, setStatusOut, startModelling, stopModelling
 

Field Detail

RESOURCE

protected static ResourceProvider RESOURCE
ResourceProvider, der die Uebersetzungen fuer die GUI bereitstellt: locales.XuluModel_ImpetusFireCA


LOGGER

public static final Logger LOGGER
Logger fuer Debug-Ausgaben und Warnings.


PARAM_PROP_MODELTIME

public static final String PARAM_PROP_MODELTIME
See Also:
Constant Field Values

PARAM_PROP_BURNLUC

public static final String PARAM_PROP_BURNLUC
See Also:
Constant Field Values

PARAM_PROP_BURNOUTLUC

public static final String PARAM_PROP_BURNOUTLUC
See Also:
Constant Field Values

PARAM_PROP_BURNSUIT

public static final String PARAM_PROP_BURNSUIT
See Also:
Constant Field Values

PARAM_PROP_BURNTIME

public static final String PARAM_PROP_BURNTIME
See Also:
Constant Field Values

PARAM_PROP_WINDDIRECTION

public static final String PARAM_PROP_WINDDIRECTION
See Also:
Constant Field Values

PARAM_PROP_WINDPOWER

public static final String PARAM_PROP_WINDPOWER
See Also:
Constant Field Values

PARAM_PROP_WINDDIRECTIONDEV

public static final String PARAM_PROP_WINDDIRECTIONDEV
See Also:
Constant Field Values

PARAM_PROP_WINDPOWERDEV

public static final String PARAM_PROP_WINDPOWERDEV
See Also:
Constant Field Values

PARAM_PROP_WINDPOWERMAXBW

public static final String PARAM_PROP_WINDPOWERMAXBW
See Also:
Constant Field Values

PARAM_PROP_WINDMATRIX_PCONST

public static final String PARAM_PROP_WINDMATRIX_PCONST
See Also:
Constant Field Values

PARAM_PROP_WINDMATRIX_PFACT

public static final String PARAM_PROP_WINDMATRIX_PFACT
See Also:
Constant Field Values

contManager

protected ImpetusFireCAContentManager contManager
Speichert den ContentManager fuer das Modell.

See Also:
ImpetusFireCAContentManager

modelParam

protected DynamicXuluObject modelParam

startPoints

protected FeatureCollection startPoints

baseLUC

protected WritableGrid baseLUC

burnSuitability

protected WritableGrid burnSuitability

outLUC

protected WritableGrid outLUC

outBurnMass

protected WritableGrid outBurnMass

burnTime

protected WritableGrid burnTime

areaMinX

protected int areaMinX

areaMaxX

protected int areaMaxX

areaMinY

protected int areaMinY

areaMaxY

protected int areaMaxY

cellSize

protected double cellSize

lucCount

protected int lucCount

burningLUC

protected int burningLUC

burnedOutLUC

protected int burnedOutLUC

lucBurningSuitability

protected double[] lucBurningSuitability

lucBurningTime

protected double[] lucBurningTime

windMatrix

protected double[] windMatrix

windMatrix_powerConst

protected double windMatrix_powerConst

windMatrix_powerFact

protected double windMatrix_powerFact

windDir

protected double windDir

windDirDev

protected double windDirDev

windPow

protected double windPow

windPowDev

protected double windPowDev

windPowMaxBW

protected double windPowMaxBW

iterCount

protected int iterCount

iterSeconds

protected double iterSeconds

MAX_lucBurningSuitability

protected double MAX_lucBurningSuitability

MAX_windMatrix

protected double MAX_windMatrix

MAX_burningSuitability

protected double MAX_burningSuitability

burningCells

protected Vector<int[]> burningCells

uselessBurningCells

protected Vector<int[]> uselessBurningCells

newBurningCells

protected HashMap<int[],Object> newBurningCells

modelGUI

protected Component modelGUI
Constructor Detail

ImpetusFireCA

public ImpetusFireCA()
Erzeugt eine neue Instanz des Modells.

Method Detail

performModelInit

public void performModelInit()
Initialisiert das Model, indem die Ressourcen aus dem ContentManager geladen werden und mit Lese/Schreib-Rechten versehen werden. Zudem werden Referenzen auf die Ressourcen in lokalen Variablen gespeichert, um waehrend des Modellablaufs effizienter darauf zugreifen zu koennen.

Specified by:
performModelInit in class AbstractXuluModel

performModelDispose

public void performModelDispose()
Gibt die Lese/Schreibrechte auf das Ein- und Ausgaberaster wieder frei. Interne Ressourcen brauchen keine aus dem Speicher entfernt werden.

Specified by:
performModelDispose in class AbstractXuluModel

performModelStep

public void performModelStep(int stepNo)
Fuehrt einen Schritt des Modellablaufs durch.

Specified by:
performModelStep in interface StepModel
Specified by:
performModelStep in class AbstractStepModel
Parameters:
stepNo - zu modellierender Schritt (beginnend bei 1!)

performBurning

protected void performBurning(Vector<int[]> bCells)
Erhoeht die Menge der verbrannten Biomasse einer Zelle, sowie die Brennzeit. Ist die maximale Brennzeit ueberschritten wird die Zelle aus der Menge der Brennenden Zellen entfernt.

Parameters:
bCells - Zellen

initBurningCells

protected void initBurningCells(FeatureCollection burnSource)
Initialisiert die Liste der Brandherd-Zellen ueber die georeferenzierten Punkte einer FeatureCollection.

Parameters:
burnSource - FeatureCollection von Point und MultiPoint

calculateBurnProbability

protected double calculateBurnProbability(int x,
                                          int y,
                                          double wind)
Berechnet die Wahrscheinlichkeit, dass eine Zelle brennt.

Parameters:
x - horizontale Raster-Koordinate
y - vertikale Raster-Koordinate
wind - Wert der Wind-Matrix (fuer Windrichtung)
Returns:
einen Wert zwischen 0 und 1

getModelSpecificGUI

public Component getModelSpecificGUI()
Liefert die modellspezifische GUI.

Specified by:
getModelSpecificGUI in interface XuluModel
Overrides:
getModelSpecificGUI in class AbstractXuluModel
Returns:
null wenn das Modell keine zusaetzliche GUI zur Verfuegung stellt