gridbroker
Class ReportWriter

Object
  |
  +--Thread
        |
        +--eduni.simjava.Sim_entity
              |
              +--gridsim.GridSim
                    |
                    +--gridbroker.ReportWriter
All Implemented Interfaces:
Runnable

public class ReportWriter
extends GridSim

ReportWriter class is a user-defined and optional entity. It is meant for creating a report at the end of each simulation by interacting with the gridsim.Statistics entity. If the user does not want to create a report, then he/she can pass null as the name of the ReportWriter entity. Note that users can chose any name for this entity and for the class name since all entities are identified by their name defined at runtime.

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
 
Fields inherited from class gridsim.GridSim
input, output, rand, SimulationStartDate
 
Fields inherited from class eduni.simjava.Sim_entity
 
Fields inherited from class Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
ReportWriter(String entityName, int numUser, int numResource, String reportFilename, String[] statCategory, boolean newGridReportFlag, double[] colValue, boolean matrixReportNextRowFlag, double rowValue)
          Allocates a new ReportWriter object
 
Method Summary
 void body()
          A method that waits until the end of a simulation to be able to generate a report
 
Methods inherited from class gridsim.GridSim
clock, Clock, finalize, finalizeGridSimulation, getEntityId, GetEntityId, getEntityName, GetEntityName, getEntityName, GetEntityName, getGridInfoServiceEntityId, getGridResourceList, GetGridResourceList, getGridSimShutdownEntityId, getGridStatisticsEntityId, getResourceCharacteristics, GetResourceCharacteristics, getResourceDynamicInfo, GetResourceDynamicInformation, getSimulationStartDate, GetSimulationStartDate, GridInformationServiceEntityId, GridletCancel, gridletReceive, GridletReceive, gridletSubmit, GridletSubmit, gridSimHold, GridSimHold, GridSimShutdownEntityId, GridStatisticsEntityId, init, Init, isNetworked, IsNetworked, receiveEventObject, ReceiveEventObject, receiveEventObject, ReceiveEventObject, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, recordStatistics, RecordStatistics, send, Send, send, Send, send, Send, send, Send, send, Send, send, Send, shutdownGridStatisticsEntity, ShutdownGridStatisticsEntity, shutdownUserEntity, ShutdownUserEntity, Start, startGridSimulation, Stop, stopGridSimulation, TerminateInputOutputEntities, terminateIOEntities
 
Methods inherited from class eduni.simjava.Sim_entity
add_param, add_port, get_id, get_name, get_port, get_port, run, send_on, set_invisible, sim_cancel, sim_current, sim_get_next, sim_get_next, sim_hold_for, sim_hold, sim_putback, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_schedule, sim_select, sim_trace, 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
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReportWriter

public ReportWriter(String entityName,
                    int numUser,
                    int numResource,
                    String reportFilename,
                    String[] statCategory,
                    boolean newGridReportFlag,
                    double[] colValue,
                    boolean matrixReportNextRowFlag,
                    double rowValue)
             throws Exception
Allocates a new ReportWriter object

Parameters:
entityName - the name to be associated with this entity
numUser - the number of users
numResource - the number of resources
reportFilename - the report file name
statCategory - the statistics category
newGridReportFlag - a flag to denote the start of a new simulation with a new scenario
colValue - the values to be printed for column label
rowValue - the value to be printed at the start when matrix_report_new_row_flag is true
Throws:
Exception - This happens when creating this entity before initializing GridSim package or this entity name is null or empty
See Also:
GridSim.init(int, Calendar, boolean, String[], String[], String)
Pre Condition:
entityName != null, numUser >= 0, numResource >= 0, reportFilename != null
Post Condition:
$none
Method Detail

body

public void body()
A method that waits until the end of a simulation to be able to generate a report

Overrides:
body in class eduni.simjava.Sim_entity
Pre Condition:
$none
Post Condition:
$none