CloudSim

public class CloudSim implements Simulation

The main class of the simulation API, that manages Cloud Computing simulations providing all methods to start, pause and stop them. It sends and processes all discrete events during the simulation time.

Author:Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho

Fields

VERSION

public static final String VERSION

CloudSim Plus current version.

Constructors

CloudSim

public CloudSim()

Creates a CloudSim simulation. Internally it creates a CloudInformationService.

See also: CloudInformationService, .CloudSim(double)

CloudSim

public CloudSim(double minTimeBetweenEvents)

Creates a CloudSim simulation that tracks events happening in a time interval as little as the minTimeBetweenEvents parameter. Internally it creates a CloudInformationService.

Parameters:
  • minTimeBetweenEvents – the minimal period between events. Events within shorter periods after the last event are discarded.

See also: CloudInformationService

Methods

abort

public void abort()

addEntity

public void addEntity(CloudSimEntity entity)

addOnClockTickListener

public Simulation addOnClockTickListener(EventListener<EventInfo> listener)

addOnEventProcessingListener

public final Simulation addOnEventProcessingListener(EventListener<SimEvent> listener)

addOnSimulationPauseListener

public final Simulation addOnSimulationPauseListener(EventListener<EventInfo> listener)

addOnSimulationStartListener

public final Simulation addOnSimulationStartListener(EventListener<EventInfo> listener)

cancel

public SimEvent cancel(SimEntity src, Predicate<SimEvent> p)

cancelAll

public boolean cancelAll(SimEntity src, Predicate<SimEvent> p)

clock

public double clock()

clockInHours

public double clockInHours()

clockInMinutes

public double clockInMinutes()

findFirstDeferred

public SimEvent findFirstDeferred(SimEntity dest, Predicate<SimEvent> p)

getCalendar

public Calendar getCalendar()

getCloudInfoService

public CloudInformationService getCloudInfoService()

getDatacenterList

public Set<Datacenter> getDatacenterList()

getEntityList

public List<SimEntity> getEntityList()

getMinTimeBetweenEvents

public double getMinTimeBetweenEvents()

getNetworkTopology

public NetworkTopology getNetworkTopology()

getNumEntities

public int getNumEntities()

getNumberOfFutureEvents

public long getNumberOfFutureEvents(Predicate<SimEvent> predicate)

holdEntity

public void holdEntity(SimEntity src, long delay)

isPaused

public boolean isPaused()

isRunning

public boolean isRunning()

isTerminationTimeSet

public boolean isTerminationTimeSet()

isTimeToTerminateSimulationUnderRequest

public boolean isTimeToTerminateSimulationUnderRequest()

pause

public boolean pause()

pause

public boolean pause(double time)

pauseEntity

public void pauseEntity(SimEntity src, double delay)

removeOnClockTickListener

public boolean removeOnClockTickListener(EventListener<? extends EventInfo> listener)

removeOnEventProcessingListener

public boolean removeOnEventProcessingListener(EventListener<SimEvent> listener)

removeOnSimulationPauseListener

public boolean removeOnSimulationPauseListener(EventListener<EventInfo> listener)

resume

public boolean resume()

select

public SimEvent select(SimEntity dest, Predicate<SimEvent> p)

send

public void send(SimEntity src, SimEntity dest, double delay, int tag, Object data)

send

public void send(SimEvent evt)

sendFirst

public void sendFirst(SimEntity src, SimEntity dest, double delay, int tag, Object data)

sendFirst

public void sendFirst(SimEvent evt)

sendNow

public void sendNow(SimEntity src, SimEntity dest, int tag, Object data)

setNetworkTopology

public void setNetworkTopology(NetworkTopology networkTopology)

start

public double start()

terminate

public boolean terminate()

terminateAt

public boolean terminateAt(double time)

wait

public void wait(CloudSimEntity src, Predicate<SimEvent> p)

waiting

public long waiting(SimEntity dest, Predicate<SimEvent> p)