Class DisasterType
- java.lang.Object
- 
- jadex.bdiv3.examples.disastermanagement.DisasterType
 
- 
 public class DisasterType extends java.lang.ObjectHelper class for random disaster generation.
- 
- 
Field SummaryFields Modifier and Type Field Description protected doublechemicalsThe average chemical number, relative to size (0 = off).static DisasterType[]DISASTER_TYPESThe disaster types.protected doublefireThe average fire number, relative to size (0 = off).protected java.lang.StringnameThe type name.protected doubleoccurrenceThe occurrence probability.protected static java.util.RandomrandomThe random number generator.protected doublesevereThe severity probability.protected int[]sizeThe size range [min, max].protected doublevictimsThe average victims number, relative to size (0 = off).
 - 
Constructor SummaryConstructors Constructor Description DisasterType(java.lang.String name, double occurrence, double severe, int[] size, double victims, double fire, double chemicals)Create a new disaster type.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.util.MapgenerateDisaster()doublegetChemicals()Get the name.static IVector2getChemicalsLocation(ISpaceObject disaster)Get the position of chemicals at the given disaster.static IVector2getEarthquakeIncidentLocation(ISpaceObject disaster)Get the position of an incident at the given earthquake.static doublegetExponentialSample(double mean)Get an exponential sample value.doublegetFire()Get the name.static IVector2getFireLocation(ISpaceObject disaster)Get the position of a fire at the given disaster.java.lang.StringgetName()Get the name.doublegetOccurrence()Get the occurrence probability.doublegetSevere()Get the severity probability.int[]getSize()Get the name.static IVector2getVictimLocation(ISpaceObject disaster)Get the position of a victim at the given disaster.doublegetVictims()Get the name.
 
- 
- 
- 
Field Detail- 
DISASTER_TYPESpublic static final DisasterType[] DISASTER_TYPES The disaster types.
 - 
randomprotected static final java.util.Random random The random number generator.
 - 
nameprotected java.lang.String name The type name.
 - 
occurrenceprotected double occurrence The occurrence probability.
 - 
severeprotected double severe The severity probability.
 - 
sizeprotected int[] size The size range [min, max].
 - 
victimsprotected double victims The average victims number, relative to size (0 = off).
 - 
fireprotected double fire The average fire number, relative to size (0 = off).
 - 
chemicalsprotected double chemicals The average chemical number, relative to size (0 = off).
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the name.
 - 
getOccurrencepublic double getOccurrence() Get the occurrence probability.
 - 
getSeverepublic double getSevere() Get the severity probability.
 - 
getSizepublic int[] getSize() Get the name.
 - 
getVictimspublic double getVictims() Get the name.
 - 
getFirepublic double getFire() Get the name.
 - 
getChemicalspublic double getChemicals() Get the name.
 - 
generateDisasterpublic static java.util.Map generateDisaster() 
 - 
getFireLocationpublic static IVector2 getFireLocation(ISpaceObject disaster) Get the position of a fire at the given disaster.
 - 
getChemicalsLocationpublic static IVector2 getChemicalsLocation(ISpaceObject disaster) Get the position of chemicals at the given disaster.
 - 
getVictimLocationpublic static IVector2 getVictimLocation(ISpaceObject disaster) Get the position of a victim at the given disaster.
 - 
getEarthquakeIncidentLocationpublic static IVector2 getEarthquakeIncidentLocation(ISpaceObject disaster) Get the position of an incident at the given earthquake.
 - 
getExponentialSamplepublic static double getExponentialSample(double mean) Get an exponential sample value.
 
- 
 
-