Package jasima.shopSim.core
Class DowntimeSource
- java.lang.Object
-
- jasima.shopSim.core.DowntimeSource
-
- Direct Known Subclasses:
MaintenanceSource,StaticListDowntimeSource
public class DowntimeSource extends Object
Abstraction of a downtime source. EachIndividualMachinecan have multiple downtime sources. Downtimes are specified usingtimeBetweenFailuresandtimeToRepair.timeBetweenFailuresspecifies the time until the next takeDown-event after the last activation.A simple example: consider a machine that is going to be down every 24 hours for a duration of 1 hour, i.e., it is available for processing for 23 hours. Using
DowntimeSource, this is modeled settingtimeBetweenFailuresto 23 hours and using atimeToRepairof 1 hour.- Author:
- Torsten Hildebrandt
- See Also:
MaintenanceSource
-
-
Constructor Summary
Constructors Constructor Description DowntimeSource(IndividualMachine machine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublecalcActivateTime(Shop shop)protected doublecalcDeactivateTime(Shop shop)protected doubleensurePositiveNumber(DblSequence dblStream)IndividualMachinegetMachine()StringgetName()DblSequencegetTimeBetweenFailures()DblSequencegetTimeToRepair()voidinit()protected booleanisSourceActive()protected voidonActivate()protected voidonDeactivate()voidsetName(String name)voidsetTimeBetweenFailures(DblSequence timeBetweenFailures)voidsetTimeToRepair(DblSequence timeToRepair)StringtoString()
-
-
-
Constructor Detail
-
DowntimeSource
public DowntimeSource(IndividualMachine machine)
-
-
Method Detail
-
init
public void init()
-
onActivate
protected void onActivate()
-
isSourceActive
protected boolean isSourceActive()
-
onDeactivate
protected void onDeactivate()
-
calcDeactivateTime
protected double calcDeactivateTime(Shop shop)
-
calcActivateTime
protected double calcActivateTime(Shop shop)
-
ensurePositiveNumber
protected double ensurePositiveNumber(DblSequence dblStream)
-
getTimeBetweenFailures
public DblSequence getTimeBetweenFailures()
-
setTimeBetweenFailures
public void setTimeBetweenFailures(DblSequence timeBetweenFailures)
-
getTimeToRepair
public DblSequence getTimeToRepair()
-
setTimeToRepair
public void setTimeToRepair(DblSequence timeToRepair)
-
getName
public String getName()
-
setName
public void setName(String name)
-
getMachine
public IndividualMachine getMachine()
-
-