Class VoidDemand
java.lang.Object
org.palladiosimulator.protocom.resourcestrategies.activeresource.AbstractDemandStrategy
org.palladiosimulator.protocom.resourcestrategies.activeresource.cpu.VoidDemand
- All Implemented Interfaces:
IDemandStrategy
-
Nested Class Summary
Nested classes/interfaces inherited from class org.palladiosimulator.protocom.resourcestrategies.activeresource.AbstractDemandStrategy
AbstractDemandStrategy.ProcessingRate, AbstractDemandStrategy.Work -
Field Summary
Fields inherited from class org.palladiosimulator.protocom.resourcestrategies.activeresource.AbstractDemandStrategy
CALIBRATION_PATH_CONFIG_KEY, defaultIterationCount, degreeOfAccuracy, WORKUNITS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Do cleanup work.voidconsume(double demand, double processingRate) getName()Template method to return the name of this strategyTemplate method to return the real hardware resource type simulated by this strategyvoidinitialiseStrategy(int degreeOfAccuracy) voidrun(long initial) Template method.Methods inherited from class org.palladiosimulator.protocom.resourcestrategies.activeresource.AbstractDemandStrategy
calibrate, consume, debugEnabled, ensureCalibrationExists, formatDuration, getCalibrationFileName, getCalibrationPath, hasCalibrationTable, initializeStrategy, initializeStrategy, setCalibrationListener, setCalibrationTable, setDebug, setProperties, watchConsume
-
Constructor Details
-
VoidDemand
public VoidDemand()
-
-
Method Details
-
run
public void run(long initial) Description copied from class:AbstractDemandStrategyTemplate method. This starts running the strategy with the parameter load- Specified by:
runin classAbstractDemandStrategy- Parameters:
initial- Complexity parameter. Algorithm should take longer if parameter is larger, i.e., ideally run(a) < run(b) <==> a < b
-
initialiseStrategy
public void initialiseStrategy(int degreeOfAccuracy) -
consume
public void consume(double demand, double processingRate) -
getStrategysResource
Description copied from class:AbstractDemandStrategyTemplate method to return the real hardware resource type simulated by this strategy- Specified by:
getStrategysResourcein interfaceIDemandStrategy- Specified by:
getStrategysResourcein classAbstractDemandStrategy- Returns:
- The resource type we can simulate
- See Also:
-
getName
Description copied from class:AbstractDemandStrategyTemplate method to return the name of this strategy- Specified by:
getNamein interfaceIDemandStrategy- Specified by:
getNamein classAbstractDemandStrategy- Returns:
- a string containing the name of the strategy
- See Also:
-
cleanup
public void cleanup()Description copied from interface:IDemandStrategyDo cleanup work.
-