Class SimActiveResource
- java.lang.Object
-
- de.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
-
- de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
-
- edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
-
- edu.kit.ipd.sdq.eventsim.resources.entities.AbstractActiveResource
-
- edu.kit.ipd.sdq.eventsim.resources.entities.SimActiveResource
-
- All Implemented Interfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
- Direct Known Subclasses:
SimHDDActiveResource
public class SimActiveResource extends AbstractActiveResource
An active resource can process demands ofRequest
s.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
EventSimEntity.EntityLifecyclePhase
-
-
Field Summary
-
Fields inherited from class edu.kit.ipd.sdq.eventsim.resources.entities.AbstractActiveResource
schedulerResource
-
-
Constructor Summary
Constructors Constructor Description SimActiveResource(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, de.uka.ipd.sdq.scheduler.IActiveResource resource, String processingRate, int numberOfInstances, org.palladiosimulator.pcm.resourcetype.SchedulingPolicy schedulingStrategy, org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification specification)
Constructs an active resource that wraps the specified resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
calculateConcreteDemand(double abstractDemand, int resourceServiceId)
String
getId()
Returns the resource ID.String
getName()
Returns the name of the resource.org.palladiosimulator.pcm.resourceenvironment.ResourceContainer
getResourceContainer()
org.palladiosimulator.pcm.resourcetype.ProcessingResourceType
getResourceType()
-
Methods inherited from class edu.kit.ipd.sdq.eventsim.resources.entities.AbstractActiveResource
addDemandListener, addStateListener, consumeResource, deactivateResource, fireDemand, fireStateEvent, getNumberOfInstances, getQueueLength, getSchedulingStrategy, setupStateListenerAdapter
-
Methods inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
addEntityListener, equals, getEntityId, getLifecyclePhase, hashCode, notifyEnteredSystem, notifyLeftSystem, removeEntityListener, resetIdGenerator, toString
-
-
-
-
Constructor Detail
-
SimActiveResource
@Inject public SimActiveResource(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, de.uka.ipd.sdq.scheduler.IActiveResource resource, String processingRate, int numberOfInstances, org.palladiosimulator.pcm.resourcetype.SchedulingPolicy schedulingStrategy, org.palladiosimulator.pcm.resourceenvironment.ProcessingResourceSpecification specification)
Constructs an active resource that wraps the specified resource.- Parameters:
model
- the simulation modelresource
- the wrapped scheduler resourceprocessingRate
-numberOfInstances
-specification
-
-
-
Method Detail
-
calculateConcreteDemand
protected double calculateConcreteDemand(double abstractDemand, int resourceServiceId)
- Specified by:
calculateConcreteDemand
in classAbstractActiveResource
-
getId
public String getId()
Returns the resource ID.- Returns:
- the resource's ID
- See Also:
IActiveResource.getId()
-
getName
public String getName()
Returns the name of the resource.- Overrides:
getName
in classEventSimEntity
- Returns:
- the resource's name
- See Also:
IActiveResource.getName()
-
getResourceContainer
public org.palladiosimulator.pcm.resourceenvironment.ResourceContainer getResourceContainer()
-
getResourceType
public org.palladiosimulator.pcm.resourcetype.ProcessingResourceType getResourceType()
-
-