edu.bonn.xulu.plugin.model.parallel
Class ClueTask

java.lang.Object
  extended by appl.parallel.spmd.AbstractSPMDTask
      extended by edu.bonn.xulu.plugin.model.parallel.ClueTask
All Implemented Interfaces:
SPMDTask, Serializable

public class ClueTask
extends AbstractSPMDTask

This is the task class for the parallel computation of the ClueModel, originally developed by Peter Verburg at Wageningen University and adapted for Xulu by Martin Schmitz.
This class is send to the servers. It has three main modules: the LU-Calculation, the neighborhood probabilities calculation and the calculation of the CLUE iteration. The modules are largely independent and could theoretically be defined in Separate classes. Because the original implementation uses only one class, this principle is not changed here. It makes sense because some functions are used by all modules and class loading using JINI is simplified.
Notice that the documentation of this file is a mixture of English and German. This is due to the fact that Xulu / V works so nicely that very much of Martin Schmitz' original German-commented ClueModel-code could be reused.

Author:
Dominik Appl
See Also:
Serialized Form

Field Summary
 
Fields inherited from class appl.parallel.spmd.AbstractSPMDTask
serverController
 
Constructor Summary
ClueTask()
           
 
Method Summary
 void calulateNeighborhoodProbabilities(Object... parameters)
           
protected  boolean checkLUCCAllowed(int x, int y, int stepNo, int lastLU, int newLU, boolean alreadyLUCCFromNewType)
          Prueft, ob ein bestimmter LU-Wechsel fuer eine Zelle erlaubt ist.
protected  boolean checkLUCCGeneralAllowed(int x, int y, int stepNo, int lastLU, boolean alreadyLUCCToActualType)
          Prueft, ob ein genereller LU-Wechsel fuer eine Zelle erlaubt ist.
protected static boolean checkNoData(int x, int y, WritableGrid grid)
          Prueft, ob eine Rasterzelle mit NoData belegt ist
 Object clue_iter(Object... parameters)
           
 void init()
          Use this method to implement if you want t
 Object run(Object... parameters)
          Starts the task with the given parameters.
 
Methods inherited from class appl.parallel.spmd.AbstractSPMDTask
getAdvancedSPMDServerController, getSPMDServerController, incomingUpdate, initialize, isInitialized, outgoingUpdate, setSPMDServerController, supportsMultiThreading
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClueTask

public ClueTask()
Method Detail

init

public void init()
Description copied from class: AbstractSPMDTask
Use this method to implement if you want t

Specified by:
init in class AbstractSPMDTask

run

public Object run(Object... parameters)
Description copied from interface: SPMDTask
Starts the task with the given parameters. Overwrite this method to implement the task.

Specified by:
run in interface SPMDTask
Specified by:
run in class AbstractSPMDTask
Returns:
the result of the task computation (if any)

calulateNeighborhoodProbabilities

public void calulateNeighborhoodProbabilities(Object... parameters)

clue_iter

public Object clue_iter(Object... parameters)

checkLUCCGeneralAllowed

protected boolean checkLUCCGeneralAllowed(int x,
                                          int y,
                                          int stepNo,
                                          int lastLU,
                                          boolean alreadyLUCCToActualType)
Prueft, ob ein genereller LU-Wechsel fuer eine Zelle erlaubt ist.

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
stepNo - modellierter Schritt (beginnend bei 1)
lastLU - Bedeckung von (x,y) zum Zeitpunkt stepNo-1
alreadyLUCCToActualType - Flag gibt an, ob in der laufenden Iteration bereits ein LU-Wechsel in den den aktuellen Typ der Zelle (lastLU) vorgenommen wurde.
Dieses Flag wird zur Zeit nicht verwendet!

checkLUCCAllowed

protected boolean checkLUCCAllowed(int x,
                                   int y,
                                   int stepNo,
                                   int lastLU,
                                   int newLU,
                                   boolean alreadyLUCCFromNewType)
Prueft, ob ein bestimmter LU-Wechsel fuer eine Zelle erlaubt ist.

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
stepNo - modellierter Schritt (beginnend bei 1)
lastLU - Bedeckung von (x,y) zum Zeitpunkt stepNo-1
newLU - potentielle neue Bedeckung von (x,y)
alreadyLUCCFromNewType - Flag gibt an, ob in der laufenden Iteration bereits ein LU-Wechsel vom potentiellen neuen Typ in einen anderen Typ vorgenommen wurde.
Dieses Flag wird zur Zeit nicht verwendet!

checkNoData

protected static boolean checkNoData(int x,
                                     int y,
                                     WritableGrid grid)
Prueft, ob eine Rasterzelle mit NoData belegt ist

Parameters:
x - Raster-Koordinate
y - Raster-Koordinate
grid - zu pruefendes Raster