GridSim
v4.0

gridsim
Class GridSim

Object
  extended byThread
      extended byeduni.simjava.Sim_entity
          extended bygridsim.GridSimCore
              extended bygridsim.GridSim
All Implemented Interfaces:
Cloneable, Runnable
Direct Known Subclasses:
AdvanceReservation, Auction, Auctioneer, AuctionObserver, GridUser, Workload

public class GridSim
extends GridSimCore

This class is mainly responsible in initialization, running and stopping of the overall simulation.

GridSim must be initialized to set-up the simulation environment before creating any other GridSim entities at the user level. This method also prepares the system for simulation by creating three GridSim internal entities - GridInformationService, GridSimShutdown, GridStatistics. Invoking the startGridSimulation() method starts the Grid simulation. All the resource and user entities must be instantiated in between invoking the above two methods.

Since GridSim version 3.0, all of the I/O methods have been moved into GridSimCore. As a result, this class only concentrates on recording statistics and managing Gridlets. In addition, there are three different ways to initialize GridSim simulation. These methods are:

Since:
GridSim Toolkit 1.0
Author:
Manzur Murshed and Rajkumar Buyya
See Also:
Sim_entity, GridSimCore, GridInformationService, GridSimShutdown, GridStatistics
Invariant:
$none

Field Summary
static int PAUSE
          Pause for a certain time delay (in seconds) before a resource registers to a Regional GIS entity.
static GridSimRandom rand
          A Random object.
static Date SimulationStartDate
          Simulation start date.
 
Fields inherited from class gridsim.GridSimCore
input, output
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
GridSim(String name)
          Allocates a new GridSim object without NETWORK communication channels: "input" and "output" Sim_port.
GridSim(String name, double baudRate)
          Allocates a new GridSim object with NETWORK communication channels: "input" and "output" Sim_port.
GridSim(String name, Link link)
          Allocates a new GridSim object with NETWORK communication channels: "input" and "output" Sim_port.
 
Method Summary
static double clock()
          Gets the current simulation time (based on SimJava simulation clock)
static double Clock()
          Deprecated. As of GridSim 2.1, replaced by clock()
static LinkedList getAdvancedReservationList()
          Sends a request to Grid Information Service (GIS) entity to get the list of Grid resources only that support Advanced Reservation
static int getEntityId(String entityName)
          Gets the entity ID given its name
static int GetEntityId(String entityName)
          Deprecated. As of GridSim 2.1, replaced by getEntityId(String)
 String getEntityName()
          Gets the name of this entity
 String GetEntityName()
          Deprecated. As of GridSim 2.1, replaced by getEntityName()
static String getEntityName(int entityID)
          Gets name of the entity given its entity ID
static String GetEntityName(int entityID)
          Deprecated. As of GridSim 2.1, replaced by getEntityName(int)
static String getEntityName(Integer entityID)
          Gets name of the entity given its entity ID
static int getGISId()
          Gets the entity ID of GridInformationService
static int getGridInfoServiceEntityId()
          Gets the entity ID of GridInformationService
static LinkedList getGridResourceList()
          Sends a request to Grid Information Service (GIS) entity to get the list of all Grid resources
static LinkedList GetGridResourceList()
          Deprecated. As of GridSim 2.1, replaced by getGridResourceList()
static int getGridSimShutdownEntityId()
          Gets the entity id of GridSimShutdown
static int getGridStatisticsEntityId()
          Gets the entity ID of GridStatistics
 int getNumFreePE(int resourceID)
          Gets the total number of free PEs (Processing Elements) from a resource.
 int getNumFreePE(Integer resourceID)
          Gets the total number of free PEs (Processing Elements) from a resource.
 int getNumPE(int resourceID)
          Gets the total number of PEs (Processing Elements) from a resource
 int getNumPE(Integer resourceID)
          Gets the number of PEs (Processing Elements) from a resource
 ResourceCharacteristics getResourceCharacteristics(int resourceID)
          Gets a ResourceCharacteristics object for a given GridResource ID.
 ResourceCharacteristics GetResourceCharacteristics(int resourceID)
          Deprecated. As of GridSim 2.1, replaced by getResourceCharacteristics(int)
 Accumulator getResourceDynamicInfo(int resourceID)
          Gets the GridResource dynamic fnformation
 Accumulator GetResourceDynamicInformation(int resourceID)
          Deprecated. As of GridSim 2.1, replaced by getResourceDynamicInfo(int)
static Calendar getSimulationCalendar()
          Gets a new copy of initial simulation Calendar.
static Date getSimulationStartDate()
          Gets a new copy of simulation start date.
static Date GetSimulationStartDate()
          Deprecated. As of GridSim 2.1, replaced by getSimulationStartDate()
static int GridInformationServiceEntityId()
          Deprecated. As of GridSim 2.1, replaced by getGridInfoServiceEntityId()
protected  Gridlet gridletCancel(Gridlet gl, int resourceId, double delay)
          Cancels a Gridlet that is currently executing in a given GridResource ID with a delay.
protected  Gridlet gridletCancel(int gridletId, int userId, int resourceId, double delay)
          Cancels a Gridlet that is currently executing in a given GridResource ID with a delay.
protected  boolean gridletMove(Gridlet gl, int srcId, int destId, double delay)
          Moves a Gridlet to the destination GridResource ID
protected  boolean gridletMove(int gridletId, int userId, int srcId, int destId, double delay, boolean ack)
          Moves a Gridlet to the destination GridResource ID
protected  boolean gridletPause(Gridlet gl, int resId, double delay)
          Pauses a Gridlet that is currently executing in a given GridResource ID with a delay.
protected  boolean gridletPause(int gridletId, int userId, int resourceId, double delay, boolean ack)
          Pauses a Gridlet that is currently executing in a given GridResource ID with a delay.
protected  Gridlet gridletReceive()
          Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer).
protected  Gridlet GridletReceive()
          Deprecated. As of GridSim 2.1, replaced by gridletReceive()
protected  Gridlet gridletReceive(int gridletId, int resId)
          Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer).
protected  Gridlet gridletReceive(int gridletId, int userId, int resId)
          Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer).
protected  boolean gridletResume(Gridlet gl, int resId, double delay)
          Resumes a Gridlet that is currently pausing in a given GridResource ID with a delay.
protected  boolean gridletResume(int gridletId, int userId, int resourceId, double delay, boolean ack)
          Resumes a Gridlet that is currently pausing in a given GridResource ID with a delay.
protected  int gridletStatus(Gridlet gl, int resourceId)
          Gets the current status of this Gridlet in a given GridResource ID
protected  int gridletStatus(int gridletId, int userId, int resourceId)
          Gets the current status of this Gridlet in a given GridResource ID
protected  boolean gridletSubmit(Gridlet gl, int resID)
          Sends a Gridlet to the destination GridResource ID without any delay.
protected  boolean GridletSubmit(Gridlet gl, int resID)
          Deprecated. As of GridSim 2.1, replaced by gridletSubmit(Gridlet, int)
protected  boolean gridletSubmit(Gridlet gl, int resourceID, double delay, boolean ack)
          Sends a Gridlet to the destination GridResource ID with a specified delay.
protected  boolean gridletSubmit(Gridlet gl, int resourceID, double delay, boolean ack, int netServiceLevel)
          Sends a Gridlet to the destination GridResource ID with a specified delay.
 void gridSimHold(double duration)
          Causes the entity to hold for duration units of simulation time
 void GridSimHold(double duration)
          Deprecated. As of GridSim 2.1, replaced by gridSimHold(double)
static int GridSimShutdownEntityId()
          Deprecated. As of GridSim 2.1, replaced by getGridSimShutdownEntityId()
static int GridStatisticsEntityId()
          Deprecated. As of GridSim 2.1, replaced by getGridStatisticsEntityId()
static void init(int numUser, Calendar cal, boolean traceFlag)
          Initializes GridSim parameters without any statistical entities.
static void init(int numUser, Calendar cal, boolean traceFlag, boolean gis)
          Initializes GridSim parameters without any statistical entities.
static void init(int numUser, Calendar cal, boolean traceFlag, String[] excludeFromFile, String[] excludeFromProcessing, String reportWriterName)
          Initializes GridSim parameters.
static void Init(int numUser, Calendar cal, boolean traceFlag, String[] excludeFromFile, String[] excludeFromProcessing, String reportWriterName)
          Deprecated. As of GridSim 2.1, replaced by init(int, Calendar, boolean, String[], String[], String)
static boolean isResourceExist(int id)
          Checks whether the given GridResource ID exists or not
static boolean isResourceExist(Integer id)
          Checks whether the given GridResource ID exists or not
protected  Object receiveEventObject()
          Gets an object belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer).
protected  Object ReceiveEventObject()
          Deprecated. As of GridSim 2.1, replaced by receiveEventObject()
protected  Object receiveEventObject(Sim_port sourcePort)
          Gets an object belong to the first event CURRENTLY waiting in the given port.
protected  Object ReceiveEventObject(Sim_port sourcePort)
          Deprecated. As of GridSim 2.1, replaced by receiveEventObject(Sim_port)
 void recordStatistics(String category, boolean data)
          Records statistics during the event
 void RecordStatistics(String category, boolean data)
          Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, boolean)
 void recordStatistics(String category, double data)
          Records statistics during the event
 void RecordStatistics(String category, double data)
          Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, double)
 void recordStatistics(String category, int data)
          Records statistics during the event
 void RecordStatistics(String category, int data)
          Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, int)
 void recordStatistics(String category, String data)
          Records statistics during the event
 void RecordStatistics(String category, String data)
          Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, String)
static boolean resourceSupportAR(int resourceID)
          Checks whether a particular resource supports Advanced Reservation functionalities or not.
static boolean resourceSupportAR(Integer resourceID)
          Checks whether a particular resource supports Advanced Reservation functionalities or not.
static boolean setGIS(GridInformationService gis)
          Sets a GridInformationService (GIS) entity.
protected  void shutdownGridStatisticsEntity()
          Tells the GridStatistics entity the end of the simulation
protected  void ShutdownGridStatisticsEntity()
          Deprecated. As of GridSim 2.1, replaced by shutdownGridStatisticsEntity()
protected  void shutdownUserEntity()
          Tells all user entities to shut down the simulation.
protected  void ShutdownUserEntity()
          Deprecated. As of GridSim 2.1, replaced by shutdownUserEntity()
static void Start()
          Deprecated. As of GridSim 2.1, replaced by startGridSimulation()
static void startGridSimulation()
          Starts the execution of GridSim simulation.
static void Stop()
          Deprecated. As of GridSim 2.1, replaced by stopGridSimulation()
static void stopGridSimulation()
          Stops Grid Simulation (based on SimJava Sim_system.run_stop()).
 
Methods inherited from class gridsim.GridSimCore
finalize, finalizeGridSimulation, getLink, getPingResult, isNetworked, IsNetworked, ping, ping, ping, ping, pingBlockingCall, pingBlockingCall, pingBlockingCall, pingBlockingCall, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, setBackgroundTraffic, setBackgroundTraffic, TerminateInputOutputEntities, terminateIOEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_generator, add_param, add_port, body, clone, get_id, get_name, get_port, get_port, get_stat, run, send_on, set_invisible, set_stat, sim_cancel, sim_completed, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_pause_for, sim_pause_for, sim_pause_until, sim_pause_until, sim_pause, sim_process_for, sim_process_for, sim_process_until, sim_process_until, sim_process, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, sim_wait_for, sim_wait_for, sim_wait_for, sim_wait, sim_waiting, sim_waiting
 
Methods inherited from class Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SimulationStartDate

public static Date SimulationStartDate
Simulation start date. This object is initialized during the call to init(int, Calendar, boolean, String[], String[], String) or init(int, Calendar, boolean)


rand

public static GridSimRandom rand
A Random object. This object is initialized during the call to init(int, Calendar, boolean, String[], String[], String) or init(int, Calendar, boolean).


PAUSE

public static int PAUSE
Pause for a certain time delay (in seconds) before a resource registers to a Regional GIS entity. By default, a resource will pause for 10 seconds before registering. As a rule of thumb, if a network topology is huge (involving several routers), then a resource needs to pause much longer.

Constructor Detail

GridSim

public GridSim(String name)
        throws Exception
Allocates a new GridSim object without NETWORK communication channels: "input" and "output" Sim_port. In summary, this object has NO network communication or bandwidth speed.

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String), init(int, Calendar, boolean), Sim_entity
Pre Condition:
name != null
Post Condition:
$none

GridSim

public GridSim(String name,
               double baudRate)
        throws Exception
Allocates a new GridSim object with NETWORK communication channels: "input" and "output" Sim_port. In addition, this method will create Input and Output object.

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
baudRate - network communication or bandwidth speed
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String), init(int, Calendar, boolean), Sim_entity, Input, Output
Pre Condition:
name != null, baudRate > 0.0
Post Condition:
$none

GridSim

public GridSim(String name,
               Link link)
        throws Exception
Allocates a new GridSim object with NETWORK communication channels: "input" and "output" Sim_port. In addition, this method will create Input and Output object.

Use this constructor in a wired network.

Parameters:
name - the name to be associated with this entity (as required by Sim_entity class from simjava package)
link - the physical link that connects this entity
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String), init(int, Calendar, boolean), Sim_entity, Input, Output
Pre Condition:
name != null, link != null
Post Condition:
$none
Method Detail

GetSimulationStartDate

public static Date GetSimulationStartDate()
Deprecated. As of GridSim 2.1, replaced by getSimulationStartDate()

Gets simulation start date. If the return object is null, then need to initialize it by calling init(int, Calendar, boolean, String[], String[], String) or init(int, Calendar, boolean)

Returns:
a Date object or null if it is empty
See Also:
Date
Pre Condition:
$none
Post Condition:
$none

getSimulationStartDate

public static Date getSimulationStartDate()
Gets a new copy of simulation start date. If the return object is null, then need to initialize it by calling init(int, Calendar, boolean, String[], String[], String) or init(int, Calendar, boolean)

Returns:
a new copy of Date object or null if GridSim hasn't been initialized
See Also:
Date
Pre Condition:
$none
Post Condition:
$none

getSimulationCalendar

public static Calendar getSimulationCalendar()
Gets a new copy of initial simulation Calendar.

Returns:
a new copy of Calendar object or null if GridSim hasn't been initialized
See Also:
init(int, Calendar, boolean, String[], String[], String), init(int, Calendar, boolean)
Pre Condition:
$none
Post Condition:
$none

Init

public static void Init(int numUser,
                        Calendar cal,
                        boolean traceFlag,
                        String[] excludeFromFile,
                        String[] excludeFromProcessing,
                        String reportWriterName)
Deprecated. As of GridSim 2.1, replaced by init(int, Calendar, boolean, String[], String[], String)

Initializes GridSim parameters. This method should be called before creating any entities.

Inside this method, it will create the following GridSim entities:

The Calendar object can be specified using Calendar.getInstance() to denote the start of the simulation time. This simulation time is very important in handling advanced reservations functionalities.

Parameters:
numUser - the number of User Entities created. This parameters indicates that GridSimShutdown first waits for User Entities's END_OF_SIMULATION signal before issuing terminate signal to other entities
cal - starting time for this simulation. If it is null, then the time will be taken from Calendar.getInstance().
traceFlag - true if GridSim trace need to be written
excludeFromFile - an array of String containing list of files to be excluded from statistics
excludeFromProcessing - an array of String containing list of processings to be excluded from writing into a file
reportWriterName - a ReportWriter entity name. This entity can be found inside a gridbroker package.
See Also:
GridSimShutdown, GridStatistics, GridInformationService, GridSimRandom
Pre Condition:
numUser >= 0
Post Condition:
$none

init

public static void init(int numUser,
                        Calendar cal,
                        boolean traceFlag,
                        String[] excludeFromFile,
                        String[] excludeFromProcessing,
                        String reportWriterName)
Initializes GridSim parameters. This method should be called before creating any entities.

Inside this method, it will create the following GridSim entities:

The Calendar object can be specified using Calendar.getInstance() to denote the start of the simulation time. This simulation time is very important in handling advanced reservations functionalities.

Parameters:
numUser - the number of User Entities created. This parameters indicates that GridSimShutdown first waits for User Entities's END_OF_SIMULATION signal before issuing terminate signal to other entities
cal - starting time for this simulation. If it is null, then the time will be taken from Calendar.getInstance().
traceFlag - true if GridSim trace need to be written
excludeFromFile - an array of String containing list of files to be excluded from statistics
excludeFromProcessing - an array of String containing list of processings to be excluded from writing into a file
reportWriterName - a ReportWriter entity name. This entity can be found inside a gridbroker package.
See Also:
GridSimShutdown, GridStatistics, GridInformationService, GridSimRandom
Pre Condition:
numUser >= 0
Post Condition:
$none

init

public static void init(int numUser,
                        Calendar cal,
                        boolean traceFlag)
Initializes GridSim parameters without any statistical entities. Therefore, if a simulation requires to record any statistical data, then need to use init(int, Calendar, boolean, String[], String[], String) instead. This method should be called before creating any entities.

Inside this method, it will create the following GridSim entities:

The Calendar object can be specified using Calendar.getInstance() to denote the start of the simulation time. This simulation time is very important in handling advanced reservations functionalities.

Parameters:
numUser - the number of User Entities created. This parameters indicates that GridSimShutdown first waits for User Entities's END_OF_SIMULATION signal before issuing terminate signal to other entities
cal - starting time for this simulation. If it is null, then the time will be taken from Calendar.getInstance()
traceFlag - true if GridSim trace need to be written
See Also:
GridSimShutdown, GridInformationService, GridSimRandom, init(int,Calendar,boolean,String[],String[],String)
Pre Condition:
numUser >= 0
Post Condition:
$none

init

public static void init(int numUser,
                        Calendar cal,
                        boolean traceFlag,
                        boolean gis)
Initializes GridSim parameters without any statistical entities. Therefore, if a simulation requires to record any statistical data, then need to use init(int, Calendar, boolean, String[], String[], String) instead. This method should be called before creating any entities.

Inside this method, it will create the following GridSim entities:

The Calendar object can be specified using Calendar.getInstance() to denote the start of the simulation time. This simulation time is very important in handling advanced reservations functionalities.

Parameters:
numUser - the number of User Entities created. This parameters indicates that GridSimShutdown first waits for all user entities's END_OF_SIMULATION signal before issuing terminate signal to other entities
cal - starting time for this simulation. If it is null, then the time will be taken from Calendar.getInstance()
traceFlag - true if GridSim trace need to be written
gis - true if you want to use a DEFAULT GridInformationService entity.
See Also:
GridSimShutdown, GridInformationService, GridSimRandom, setGIS(GridInformationService), init(int,Calendar,boolean,String[],String[],String)
Pre Condition:
numUser >= 0
Post Condition:
$none

setGIS

public static boolean setGIS(GridInformationService gis)
Sets a GridInformationService (GIS) entity. This method is useful is you write a different type of GIS entity. This method must be called before startGridSimulation() method.

Parameters:
gis - a GIS object
Returns:
true if successful, false otherwise
See Also:
startGridSimulation()
Pre Condition:
gis != null
Post Condition:
$none

Start

public static void Start()
                  throws NullPointerException
Deprecated. As of GridSim 2.1, replaced by startGridSimulation()

Starts the execution of GridSim simulation. It waits for complete execution of all entitities, i.e. until all entities threads reach non-RUNNABLE state by exiting from the body() method. Then, it kills threads of all entities.

Note: This method should be called after all the entities have been setup and added, and their ports are linked.

Throws:
NullPointerException - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String)
Pre Condition:
$none
Post Condition:
$none

startGridSimulation

public static void startGridSimulation()
                                throws NullPointerException
Starts the execution of GridSim simulation. It waits for complete execution of all entitities, i.e. until all entities threads reach non-RUNNABLE state by exiting from the body() method. Then, it kills threads of all entities.

Note: This method should be called after all the entities have been setup and added, and their ports are linked.

Throws:
NullPointerException - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String)
Pre Condition:
$none
Post Condition:
$none

Clock

public static double Clock()
Deprecated. As of GridSim 2.1, replaced by clock()

Gets the current simulation time (based on SimJava simulation clock)

Returns:
The current simulation time from the simulation clock
See Also:
Sim_system.clock()
Pre Condition:
$none
Post Condition:
$result >= 0.0

clock

public static double clock()
Gets the current simulation time (based on SimJava simulation clock)

Returns:
The current simulation time from the simulation clock
See Also:
Sim_system.clock()
Pre Condition:
$none
Post Condition:
$result >= 0.0

GridSimHold

public void GridSimHold(double duration)
Deprecated. As of GridSim 2.1, replaced by gridSimHold(double)

Causes the entity to hold for duration units of simulation time

Parameters:
duration - the amount of time to hold
Pre Condition:
$none
Post Condition:
$none

gridSimHold

public void gridSimHold(double duration)
Causes the entity to hold for duration units of simulation time

Parameters:
duration - the amount of time to hold
Pre Condition:
$none
Post Condition:
$none

Stop

public static void Stop()
                 throws NullPointerException
Deprecated. As of GridSim 2.1, replaced by stopGridSimulation()

Stops Grid Simulation (based on SimJava Sim_system.run_stop()). This should be ony called if any of the user defined entities explicitly want to terminate simulation during execution.

Throws:
NullPointerException - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
Sim_system.run_stop(), init(int, Calendar, boolean, String[], String[], String)
Pre Condition:
$none
Post Condition:
$none

stopGridSimulation

public static void stopGridSimulation()
                               throws NullPointerException
Stops Grid Simulation (based on SimJava Sim_system.run_stop()). This should be ony called if any of the user defined entities explicitly want to terminate simulation during execution.

Throws:
NullPointerException - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
init(int, Calendar, boolean, String[], String[], String), Sim_system.run_stop()
Pre Condition:
$none
Post Condition:
$none

ReceiveEventObject

protected Object ReceiveEventObject()
Deprecated. As of GridSim 2.1, replaced by receiveEventObject()

Gets an object belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Returns:
An event's object
Pre Condition:
$none
Post Condition:
$none

receiveEventObject

protected Object receiveEventObject()
Gets an object belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Returns:
An event's object
Pre Condition:
$none
Post Condition:
$none

ReceiveEventObject

protected Object ReceiveEventObject(Sim_port sourcePort)
Deprecated. As of GridSim 2.1, replaced by receiveEventObject(Sim_port)

Gets an object belong to the first event CURRENTLY waiting in the given port. If there are no events, then wait indefinitely for an event to arrive.

Parameters:
sourcePort - a Sim_port object which is used to connect entities for event passing
Returns:
An event's data or null if the source port is empty.
See Also:
Sim_port
Pre Condition:
sourcePort != null
Post Condition:
$none

receiveEventObject

protected Object receiveEventObject(Sim_port sourcePort)
Gets an object belong to the first event CURRENTLY waiting in the given port. If there are no events, then wait indefinitely for an event to arrive.

Parameters:
sourcePort - a Sim_port object which is used to connect entities for event passing
Returns:
An event's data or null if the source port is empty.
See Also:
Sim_port
Pre Condition:
sourcePort != null
Post Condition:
$none

GridletSubmit

protected boolean GridletSubmit(Gridlet gl,
                                int resID)
Deprecated. As of GridSim 2.1, replaced by gridletSubmit(Gridlet, int)

Sends a Gridlet to the destination GridResource ID without any delay. An acknowledgement to denote the successful of this method is by default off or false.

Parameters:
gl - a Gridlet object to be sent
resID - an unique resource ID
Returns:
true if this Gridlet has been submitted to the destination GridResource, false otherwise. Submitting a Gridlet can be failed for the one or more following reasons:
  • if the acknowledgment status in the parameter of this method is set to false
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if a Gridlet object is null or empty;
  • if a Gridlet object has finished executing beforehand
Pre Condition:
gl != null, resID >= 0
Post Condition:
$none

gridletSubmit

protected boolean gridletSubmit(Gridlet gl,
                                int resID)
Sends a Gridlet to the destination GridResource ID without any delay. An acknowledgement to denote the successful of this method is by default off or false.

Parameters:
gl - a Gridlet object to be sent
resID - an unique resource ID
Returns:
true if this Gridlet has been submitted to the destination GridResource, false otherwise. Submitting a Gridlet can be failed for the one or more following reasons:
  • if the acknowledgment status in the parameter of this method is set to false
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if a Gridlet object is null or empty;
  • if a Gridlet object has finished executing beforehand
Pre Condition:
gl != null, resID >= 0
Post Condition:
$none

gridletSubmit

protected boolean gridletSubmit(Gridlet gl,
                                int resourceID,
                                double delay,
                                boolean ack)
Sends a Gridlet to the destination GridResource ID with a specified delay.

Parameters:
gl - a Gridlet object to be sent
resourceID - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
ack - an acknowledgment status. true if want to know the result of this method, false otherwise or don't care.
Returns:
true if this Gridlet has been submitted to the destination GridResource, false otherwise. Submitting a Gridlet can be failed for the one or more following reasons:
  • if the acknowledgment status in the parameter of this method is set to false
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object is null or empty;
  • if a Gridlet object has finished executing beforehand
See Also:
Gridlet.isFinished(), gridletReceive()
Pre Condition:
gl != null, resourceID >= 0, delay >= 0.0
Post Condition:
$none

gridletSubmit

protected boolean gridletSubmit(Gridlet gl,
                                int resourceID,
                                double delay,
                                boolean ack,
                                int netServiceLevel)
Sends a Gridlet to the destination GridResource ID with a specified delay.

Parameters:
gl - a Gridlet object to be sent
resourceID - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
ack - an acknowledgment status. true if want to know the result of this method, false otherwise or don't care.
netServiceLevel - this can be set so that network entities can provide differentiated services if they are supported.
Returns:
true if this Gridlet has been submitted to the destination GridResource, false otherwise. Submitting a Gridlet can be failed for the one or more following reasons:
  • if the acknowledgment status in the parameter of this method is set to false
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object is null or empty;
  • if a Gridlet object has finished executing beforehand
See Also:
Gridlet.isFinished(), gridletReceive()
Pre Condition:
gl != null, resourceID >= 0, delay >= 0.0
Post Condition:
$none

GridletReceive

protected Gridlet GridletReceive()
Deprecated. As of GridSim 2.1, replaced by gridletReceive()

Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Returns:
A Gridlet object or null if an error occurs.
Pre Condition:
$none
Post Condition:
$none

gridletReceive

protected Gridlet gridletReceive()
Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Returns:
A Gridlet object or null if an error occurs.
Pre Condition:
$none
Post Condition:
$none

gridletReceive

protected Gridlet gridletReceive(int gridletId,
                                 int userId,
                                 int resId)
Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Parameters:
gridletId - a Gridlet ID
userId - a user ID
resId - a grid resource ID
Returns:
A Gridlet object or null if an error occurs.
Pre Condition:
gridletId >= 0, userId > 0, resId > 0
Post Condition:
$none

gridletReceive

protected Gridlet gridletReceive(int gridletId,
                                 int resId)
Gets a Gridlet belong to the first event CURRENTLY waiting in this entity's deferred queue (incoming buffer). If there are no events, then wait indefinitely for an event to arrive.

Parameters:
gridletId - a Gridlet ID
resId - a grid resource ID
Returns:
A Gridlet object or null if an error occurs.
Pre Condition:
gridletId >= 0, resId > 0
Post Condition:
$none

gridletCancel

protected Gridlet gridletCancel(Gridlet gl,
                                int resourceId,
                                double delay)
Cancels a Gridlet that is currently executing in a given GridResource ID with a delay.
NOTE: Canceling a Gridlet operation can take a long time over a slow network if the Gridlet size is big.

Parameters:
gl - a Gridlet object to be canceled
resourceId - an unique resource ID
delay - delay time or 0.0 if want to cancel NOW
Returns:
the canceled Gridlet or nullfinished in time of cancellation, then this method will return the finished Gridlet. Canceling a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object is null or empty;
Pre Condition:
gl != null, resourceId >= 0, delay >= 0.0
Post Condition:
$none

gridletCancel

protected Gridlet gridletCancel(int gridletId,
                                int userId,
                                int resourceId,
                                double delay)
Cancels a Gridlet that is currently executing in a given GridResource ID with a delay.
NOTE: Canceling a Gridlet operation can be slow over a slow network if the Gridlet size is big.

Parameters:
gridletId - a Gridlet ID
userId - the user or owner ID of this Gridlet
resourceId - an unique resource ID to which this Gridlet was previously sent to
delay - delay time or 0.0 if want to cancel NOW
Returns:
the canceled Gridlet or nullfinished in time of cancellation, then this method will return the finished Gridlet. Canceling a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
Pre Condition:
gridletId >= 0, userId >= 0, resourceId >= 0, delay >= 0.0
Post Condition:
$none

gridletPause

protected boolean gridletPause(Gridlet gl,
                               int resId,
                               double delay)
Pauses a Gridlet that is currently executing in a given GridResource ID with a delay.

Parameters:
gl - a Gridlet object to be sent
resId - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
Returns:
true if this Gridlet has been paused successfully in the destination GridResource, false otherwise. Pausing a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object is null or empty;
  • if a Gridlet object has finished executing beforehand. The Gridlet needs to be retrieved by using gridletReceive()
Pre Condition:
gl != null, resId >= 0, delay >= 0.0
Post Condition:
$none

gridletPause

protected boolean gridletPause(int gridletId,
                               int userId,
                               int resourceId,
                               double delay,
                               boolean ack)
Pauses a Gridlet that is currently executing in a given GridResource ID with a delay.

Parameters:
gridletId - a Gridlet ID
userId - the user or owner ID of this Gridlet
resourceId - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
ack - an acknowledgement, i.e. true if wanted to know whether this operation is success or not, false otherwise (don't care)
Returns:
true if this Gridlet has been paused successfully in the destination GridResource, false otherwise. Pausing a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object has finished executing beforehand. The Gridlet needs to be retrieved by using gridletReceive()
Pre Condition:
gridletId >= 0, userId >= 0, resourceId >= 0, delay >= 0.0
Post Condition:
$none

gridletStatus

protected int gridletStatus(Gridlet gl,
                            int resourceId)
Gets the current status of this Gridlet in a given GridResource ID

Parameters:
gl - a Gridlet object
resourceId - a GridResource ID that executes this Gridlet object
Returns:
the current Gridlet status or -1 if not found. The various Gridlet status can be found in Gridlet class.
See Also:
Gridlet
Pre Condition:
gl != null, resourceId > 0
Post Condition:
$none

gridletStatus

protected int gridletStatus(int gridletId,
                            int userId,
                            int resourceId)
Gets the current status of this Gridlet in a given GridResource ID

Parameters:
gridletId - a Gridlet ID
userId - the user or owner of this Gridlet object
resourceId - a GridResource ID that executes this Gridlet object
Returns:
the current Gridlet status or -1 if not found. The various Gridlet status can be found in Gridlet class.
See Also:
Gridlet
Pre Condition:
gridletId > 0, userId > 0, resourceId > 0
Post Condition:
$none

gridletResume

protected boolean gridletResume(Gridlet gl,
                                int resId,
                                double delay)
Resumes a Gridlet that is currently pausing in a given GridResource ID with a delay.
NOTE: Resuming a Gridlet only works if it is currently on paused.

Parameters:
gl - a Gridlet object to be sent
resId - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
Returns:
true if this Gridlet has been resumed successfully in the destination GridResource, false otherwise. Resuming a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet object is null or empty
  • if a Gridlet is not currently on paused
Pre Condition:
gl != null, resId >= 0, delay >= 0.0
Post Condition:
$none

gridletResume

protected boolean gridletResume(int gridletId,
                                int userId,
                                int resourceId,
                                double delay,
                                boolean ack)
Resumes a Gridlet that is currently pausing in a given GridResource ID with a delay.
NOTE: Resuming a Gridlet only works if it is currently on paused.

Parameters:
gridletId - a Gridlet ID
userId - the user or owner ID of this Gridlet
resourceId - an unique resource ID
delay - delay time or 0.0 if want to execute NOW
ack - an acknowledgement, i.e. true if wanted to know whether this operation is success or not, false otherwise (don't care)
Returns:
true if this Gridlet has been resumed successfully in the destination GridResource, false otherwise. Resuming a Gridlet can be failed for the one or more following reasons:
  • if a GridResource ID doesn't exist
  • if a Gridlet ID doesn't exist
  • if a Gridlet's user ID doesn't exist
  • if the delay time is negative
  • if a Gridlet is not currently on paused
Pre Condition:
gridletId >= 0, userId >= 0, resourceId >= 0, delay >= 0.0
Post Condition:
$none

gridletMove

protected boolean gridletMove(Gridlet gl,
                              int srcId,
                              int destId,
                              double delay)
Moves a Gridlet to the destination GridResource ID

Parameters:
gl - a Gridlet object
srcId - the GridResource ID that is currently executing this Gridlet
destId - the new GridResource ID
delay - simulation delay
Returns:
true if this Gridlet has moved successfully, false otherwise. Moving a Gridlet can be failed, due to one or more following reasons:
  • if a Gridlet object is null
  • if one or both GridResource ID don't exist
  • if the delay is negative
  • if a Gridlet in the GridResource has completed beforehand. The Gridlet can be retrieved by using gridletReceive()
Pre Condition:
gl != null, srcId > 0, destId > 0, delay >= 0.0
Post Condition:
$result = true || false

gridletMove

protected boolean gridletMove(int gridletId,
                              int userId,
                              int srcId,
                              int destId,
                              double delay,
                              boolean ack)
Moves a Gridlet to the destination GridResource ID

Parameters:
gridletId - a Gridlet ID
userId - the owner or user ID of this Gridlet
srcId - the GridResource ID that is currently executing this Gridlet
destId - the new GridResource ID
delay - simulation delay
ack - an acknowledgement, i.e. true if wanted to know whether this operation is success or not, false otherwise (don't care)
Returns:
true if this Gridlet has moved successfully, false otherwise. Moving a Gridlet can be failed, due to one or more following reasons:
  • if a Gridlet ID doesn't exist
  • if the owner of user ID of this Gridlet doesn't exist
  • if one or both GridResource ID don't exist
  • if the delay is negative
  • if a Gridlet in the GridResource has completed beforehand. The Gridlet can be retrieved by using gridletReceive()
Pre Condition:
gridletId > 0, userId > 0, srcId > 0, destId > 0, delay >= 0.0
Post Condition:
$result = true || false

GetEntityName

public String GetEntityName()
Deprecated. As of GridSim 2.1, replaced by getEntityName()

Gets the name of this entity

Returns:
the Entity name or null if this object does not have one
Pre Condition:
$none
Post Condition:
$none

getEntityName

public String getEntityName()
Gets the name of this entity

Returns:
the Entity name or null if this object does not have one
Pre Condition:
$none
Post Condition:
$none

GetEntityName

public static String GetEntityName(int entityID)
Deprecated. As of GridSim 2.1, replaced by getEntityName(int)

Gets name of the entity given its entity ID

Parameters:
entityID - the entity ID
Returns:
the Entity name or null if this object does not have one
Pre Condition:
entityID > 0
Post Condition:
$none

getEntityName

public static String getEntityName(int entityID)
Gets name of the entity given its entity ID

Parameters:
entityID - the entity ID
Returns:
the Entity name or null if this object does not have one
Pre Condition:
entityID > 0
Post Condition:
$none

getEntityName

public static String getEntityName(Integer entityID)
Gets name of the entity given its entity ID

Parameters:
entityID - the entity ID
Returns:
the Entity name or null if this object does not have one
Pre Condition:
entityID > 0
Post Condition:
$none

GetEntityId

public static int GetEntityId(String entityName)
Deprecated. As of GridSim 2.1, replaced by getEntityId(String)

Gets the entity ID

Parameters:
entityName - an Entity name
Returns:
the Entity ID or -1 if it is not found
Pre Condition:
entityName != null
Post Condition:
$result >= -1

getEntityId

public static int getEntityId(String entityName)
Gets the entity ID given its name

Parameters:
entityName - an Entity name
Returns:
the Entity ID or -1 if it is not found
Pre Condition:
entityName != null
Post Condition:
$result >= -1

GridStatisticsEntityId

public static int GridStatisticsEntityId()
Deprecated. As of GridSim 2.1, replaced by getGridStatisticsEntityId()

Gets the entity id of GridStatistics

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

getGridStatisticsEntityId

public static int getGridStatisticsEntityId()
Gets the entity ID of GridStatistics

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

GridInformationServiceEntityId

public static int GridInformationServiceEntityId()
Deprecated. As of GridSim 2.1, replaced by getGridInfoServiceEntityId()

Gets the entity ID of GridInformationService

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

getGridInfoServiceEntityId

public static int getGridInfoServiceEntityId()
Gets the entity ID of GridInformationService

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

getGISId

public static int getGISId()
Gets the entity ID of GridInformationService

Returns:
the GIS entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

GridSimShutdownEntityId

public static int GridSimShutdownEntityId()
Deprecated. As of GridSim 2.1, replaced by getGridSimShutdownEntityId()

Gets the entity id of GridSimShutdown

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

getGridSimShutdownEntityId

public static int getGridSimShutdownEntityId()
Gets the entity id of GridSimShutdown

Returns:
the Entity ID or -1 if it is not found
Pre Condition:
$none
Post Condition:
$result >= -1

ShutdownUserEntity

protected void ShutdownUserEntity()
Deprecated. As of GridSim 2.1, replaced by shutdownUserEntity()

Tells all user entities to shut down the simulation. GridSimShutdown entity waits for all users termination before shuting down other entities.

See Also:
GridSimShutdown
Pre Condition:
$none
Post Condition:
$none

shutdownUserEntity

protected void shutdownUserEntity()
Tells all user entities to shut down the simulation. GridSimShutdown entity waits for all users termination before shuting down other entities.

See Also:
GridSimShutdown
Pre Condition:
$none
Post Condition:
$none

ShutdownGridStatisticsEntity

protected void ShutdownGridStatisticsEntity()
Deprecated. As of GridSim 2.1, replaced by shutdownGridStatisticsEntity()

Tells the GridStatistics entity the end of the simulation

Pre Condition:
$none
Post Condition:
$none

shutdownGridStatisticsEntity

protected void shutdownGridStatisticsEntity()
Tells the GridStatistics entity the end of the simulation

Pre Condition:
$none
Post Condition:
$none

GetGridResourceList

public static LinkedList GetGridResourceList()
Deprecated. As of GridSim 2.1, replaced by getGridResourceList()

Sends a request to Grid Information Service (GIS) entity to get the list of Grid resources

Returns:
A LinkedList containing GridResource ID (as an Integer object) or null if a GIS entity hasn't been created before
Pre Condition:
$none
Post Condition:
$none

getGridResourceList

public static LinkedList getGridResourceList()
Sends a request to Grid Information Service (GIS) entity to get the list of all Grid resources

Returns:
A LinkedList containing GridResource ID (as an Integer object) or null if a GIS entity hasn't been created before
Pre Condition:
$none
Post Condition:
$none

resourceSupportAR

public static boolean resourceSupportAR(int resourceID)
Checks whether a particular resource supports Advanced Reservation functionalities or not.

Parameters:
resourceID - a resource ID
Returns:
true if a resource supports Advanced Reservation functionalities, false otherwise
Pre Condition:
resourceID > 0
Post Condition:
$none

resourceSupportAR

public static boolean resourceSupportAR(Integer resourceID)
Checks whether a particular resource supports Advanced Reservation functionalities or not.

Parameters:
resourceID - a resource ID
Returns:
true if a resource supports Advanced Reservation functionalities, false otherwise
Pre Condition:
resourceID != null
Post Condition:
$none

getAdvancedReservationList

public static LinkedList getAdvancedReservationList()
Sends a request to Grid Information Service (GIS) entity to get the list of Grid resources only that support Advanced Reservation

Returns:
A LinkedList containing GridResource ID (as an Integer object) or null if a GIS entity hasn't been created before
Pre Condition:
$none
Post Condition:
$none

isResourceExist

public static boolean isResourceExist(int id)
Checks whether the given GridResource ID exists or not

Parameters:
id - a GridResource id
Returns:
true if the given ID exists, false otherwise
Pre Condition:
id >= 0
Post Condition:
$none

isResourceExist

public static boolean isResourceExist(Integer id)
Checks whether the given GridResource ID exists or not

Parameters:
id - a GridResource id
Returns:
true if the given ID exists, false otherwise
Pre Condition:
id != null
Post Condition:
$none

getNumPE

public int getNumPE(int resourceID)
Gets the total number of PEs (Processing Elements) from a resource

Parameters:
resourceID - a resource ID
Returns:
total number of PE or -1 if invalid resource ID
Pre Condition:
resourceID > 0
Post Condition:
$none

getNumPE

public int getNumPE(Integer resourceID)
Gets the number of PEs (Processing Elements) from a resource

Parameters:
resourceID - a resource ID
Returns:
total number of PEs or -1 if invalid resource ID
Pre Condition:
resourceID != null
Post Condition:
$none

getNumFreePE

public int getNumFreePE(int resourceID)
Gets the total number of free PEs (Processing Elements) from a resource.
NOTE: Due to the dynamic nature of a Grid environment, the number of free PEs only reflect to the current status of a resource at the time of this request received.

Parameters:
resourceID - a resource ID
Returns:
total number of free PE or -1 if invalid resource ID
Pre Condition:
resourceID > 0
Post Condition:
$none

getNumFreePE

public int getNumFreePE(Integer resourceID)
Gets the total number of free PEs (Processing Elements) from a resource.
NOTE: Due to the dynamic nature of a Grid environment, the number of free PEs only reflect to the current status of a resource at the time of this request received.

Parameters:
resourceID - a resource ID
Returns:
total number of free PE or -1 if invalid resource ID
Pre Condition:
resourceID != null
Post Condition:
$none

GetResourceCharacteristics

public ResourceCharacteristics GetResourceCharacteristics(int resourceID)
Deprecated. As of GridSim 2.1, replaced by getResourceCharacteristics(int)

Gets a ResourceCharacteristics object for a given GridResource ID.
NOTE: This method returns a reference of ResourceCharacteristics object, NOT a copy of it. As a result, some of ResourceCharacteristics attributes, such as PE availability might change over time. Use getNumFreePE(int) to determine number of free PE at the time of a request instead.

Parameters:
resourceID - the resource ID
Returns:
An object of ResourceCharacteristics or null if a GridResource doesn't exist or an error occurs
See Also:
ResourceCharacteristics
Pre Condition:
resourceID > 0
Post Condition:
$none

getResourceCharacteristics

public ResourceCharacteristics getResourceCharacteristics(int resourceID)
Gets a ResourceCharacteristics object for a given GridResource ID.
NOTE: This method returns a reference of ResourceCharacteristics object, NOT a copy of it. As a result, some of ResourceCharacteristics attributes, such as PE availability might change over time. Use getNumFreePE(int) to determine number of free PE at the time of a request instead.

Parameters:
resourceID - the resource ID
Returns:
An object of ResourceCharacteristics or null if a GridResource doesn't exist or an error occurs
See Also:
ResourceCharacteristics
Pre Condition:
resourceID > 0
Post Condition:
$none

GetResourceDynamicInformation

public Accumulator GetResourceDynamicInformation(int resourceID)
Deprecated. As of GridSim 2.1, replaced by getResourceDynamicInfo(int)

Gets the GridResource dynamic information

Parameters:
resourceID - the resource ID
Returns:
An object of Accumulator containing the GridResource load or null if a GridResource doesn't exist or an error occurs
Pre Condition:
resourceID > 0
Post Condition:
$none

getResourceDynamicInfo

public Accumulator getResourceDynamicInfo(int resourceID)
Gets the GridResource dynamic fnformation

Parameters:
resourceID - the resource ID
Returns:
An object of Accumulator containing the GridResource load or null if a GridResource doesn't exist or an error occurs
Pre Condition:
resourceID > 0
Post Condition:
$none

RecordStatistics

public void RecordStatistics(String category,
                             double data)
Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, double)

Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data >= 0.0
Post Condition:
$none

recordStatistics

public void recordStatistics(String category,
                             double data)
Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data >= 0.0
Post Condition:
$none

RecordStatistics

public void RecordStatistics(String category,
                             int data)
Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, int)

Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data >= 0.0
Post Condition:
$none

recordStatistics

public void recordStatistics(String category,
                             int data)
Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data >= 0.0
Post Condition:
$none

RecordStatistics

public void RecordStatistics(String category,
                             String data)
Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, String)

Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data != null
Post Condition:
$none

recordStatistics

public void recordStatistics(String category,
                             String data)
Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data != null
Post Condition:
$none

RecordStatistics

public void RecordStatistics(String category,
                             boolean data)
Deprecated. As of GridSim 2.1, replaced by recordStatistics(String, boolean)

Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data == true || false
Post Condition:
$none

recordStatistics

public void recordStatistics(String category,
                             boolean data)
Records statistics during the event

Parameters:
category - a category name
data - a value to be recorded
Pre Condition:
category != null, data == true || false
Post Condition:
$none

GridSim
v4.0

The University of Melbourne, Australia, 2006