OUTPUT FROM CSIM

In order for a simulation model to be useful, output indicating what occurred has to be produced so that it can be analyzed. The following kinds of output can be produced from CSIM:

  • Reports CSIM always collects usage and queueing information on facilities and storage blocks. In addition, it will collect summary information from tables, qtables, histograms and qhistograms, if any were created by the user. All of this information can be printed via various report statements.
  • Model statistics CSIM collects statistics on the model itself. This information will be printed upon request.
  • Status reports Throughout the execution of the model, CSIM collects information on current status. This information will be printed via various status statements. If no report statement is specified, CSIM will not generate any output (although the user can generate customized output by gathering data through the various information retrieval statements, doing calculations on it, if desired, and printing it).

    Generating Reports

    To generate a partial report, containing information on just one type of object (or just the header): report_hdr();
    report_facilities();
    report_storages();
    report_classes();
    report_tables();
    Where:

  • report_hdr prints the header of the report
  • report_facilities prints the usage statistics for all facilities defined in the model
  • report_storages prints the usage statistics for all storage blocks defined in the model
  • report_classes prints the process usage statistics for all process classes defined in the model
  • report_tables prints the summary information for all (q)tables and (q)histograms defined in the model Notes:
  • Details of the contents of these reports are in the section”CSIM Report Output” on page 45.

    To generate a complete report, containing all of the sub-reports:
    report();
    Notes:

  • The sub-reports appear in the order:
  • report_hdr
  • report_facilities
  • report_storages
  • report_classes
  • report_tables
  • Details of the contents of these reports are in the section”CSIM Report Output” on page 45.

    To generate a report for a specific table structure:
    report_table(t);
    report_qtable(qt);
    Where:
    t - is the table of histogram to be printed (type TABLE or HIST) qt - is the qtable of qhistogram to be printed (type QTABLE or QHIST) Notes:

  • Details of the contents of these reports are in the section”CSIM Report Output” on page 45 under the report_tables section.

    To change the model name:
    set_model_name("name");
    Where:

  • name - is the new name for the simulation model (quoted string or type char*) Notes:
  • name appears as the model name in the report header (in report_hdr and report).
  • Unless changed by this statement, the model name will be “CSIM”.

    CSIM Report Output

    The output generated by the report statements present information on the simulation run as it has progressed so far. The sub-reports, comprising the overall report are:
  • Header
  • Report on facility usage (if any facilities were declared)
  • Report on storage usage (if any storage blocks were declared)
  • Report on the process classes (if more than one process class (the default process class) has been declared)
  • Summary for each table (and histogram) declared
  • Summary for each qtable (and qhistogram) declared The following tables give a complete description of each of these sub-reports.

    Report_Hdr Output

    Output Heading			Meaning
    
    Revision			CSIM version number
    System				System simulation was run on, e.g. SUN Sparc
    Date and time			Date and time that report was printed
    Model				Model name (see set_model_name) statement
    Time				Total simulated time
    Interval			Simulated time since last reset
    CPU Time			Real CPU time used since last report
    

    Report_Facilities Output

    Output Heading			Meaning
    
    General Information
     facility			Name (for a facility set, the index is appended)
     srv				Server number (for facilities with multiple servers)
     disp				Service discipline (when one was defined)
    
    Means (see note below)
     serv_tm			Mean service time per request
     util				Mean utilization (busy time divided by elapsed time)
     tput				Mean throughput rate (completions per unit time)
     qlen				Mean number of requests waiting or in service
     resp				Mean time at facility (both waiting and in service)
    
    Counts
     cmp				Number of requests completed
     pre				Number of preemptions which occurred
    
    Notes:
  • When computing averages based on the number of requests for facilities, the number of completed requests is used. Thus, any requests waiting or in progress when the report is printed do not contribute to these statistics.
  • If collection of process class statistics is specified, then the above items are repeated on a separate line for each process class which uses the facility.

    Report_Storages Output

    Output Heading			Meaning
    
    General Information
     storage			Name of storage block
     capacity			Size of storage block
    
    Means (see note below)
     amt				Mean amount of storage per allocation request
     util				Mean utilization - fraction of storage in use during the simulation interval
     srv_tm				Mean time waiting for storage to be allocated
     qlen				Mean number of requests in storage or waiting
     resp				Mean time requests are in storage or waiting
    
    Counts
     cmp				Number of requests completed
     que				Number of requests which had to wait
    
    Notes:
  • When computing averages based on the number of requests for storage, the number of completed requests is used. Thus, any requests waiting or in progress when the report is printed do not contribute to these statistics.

    Report_Classes Output

    Output Heading			Meaning
    
    id				Process class id
    name				Process class name
    number				Number of processes belonging to this class
    lifetime			Mean simulated time per process in this class
    hold ct				Mean number of hold statements per process in this class
    hold time			Mean hold time per process in this class
    wait time			Mean wait time per process in this class (lifetime - holdtime)
    
    Notes
  • If no process classes are specified, the report is for the "default" class (every process begins as a member of this class). If any classes are specified, then the report does not include the default class.

    Report_Tables Output

    Output Heading			Meaning
    
    Tables and Histograms (also output by report_table(t);)
    
    mean				Average of values recorded
    variance			Variance of values recorded
    min				Minimum value recorded
    max				Maximum value recorded
    number of entries		Number of entries in table
    
    Histograms (also output by report_table(t);)
    
    Low				Low value for this bucket
    High				High value for this bucket
    Count				Number of entries in this bucket
    Fraction			Fraction of total number of entries that are in this bucket
    Cumulative			Fraction of total number of entries that are in this bucket
    					and all lower buckets
    Total				Number of entries in histogram
    
    Qtables and Qhistograms (also output by report_qtable(qt);)
    
    Mean queue length		Mean number of processes in queue (note_entry has occurred,
    					but an note_exit has not)
    Mean time in queue		Mean time between note_entry and note_exit
    Max queue length		Maximum number of processes in queue
    Number of entries		Number of note_entry's and _exit's divided by 2
    
    Qhistograms (also output by report_qtable(qt);)
    
    Length				Number of entities in queue (state)
    % of Elapsed Time		Percentage of time queue is at this length
    Cumulative			Cumulative percentage of time queue is at this length and shorter
    Count				Number of times queue is at this length
    Mean Time			Mean time that queue is at this length
    
    Notes:
  • All histogram output is grouped by “bucket”, the values in a given value interval.
  • All qhistogram output is grouped by interval, where each interval except the last includes only one queue length. The last interval contains all queue lengths longer than the length covered by the penultimate interval.
  • All quantities based on usage (such as utilization and service time) have busy time for only completed requests.
  • For storage blocks and qtables, the requests in service when the report is requested DO contribute to the derived quantities.

    Printing Model Statistics

    To generate a report on the model statistics:
    mdlstat();
    Notes:

  • This report lists:
  • CPU time used
  • Number of events processed
  • Main memory obtained via malloc calls
  • Number of malloc calls
  • Process information:
  • Number of processes started
  • Number of processes saved
  • Number of processes terminated
  • Maximum number of processes active at one time
  • Information about storage for run-time stacks

    Generating Status Reports

    To generate a partial status report, containing status on just one type of object: status_processes();
    status_next_event_list();
    status_events();
    status_mailboxes();
    status_facilities();
    status_storages();
    Where:

  • status_processes prints the status of all processes defined in the model
  • status_next_event_list prints the pending state changes for processes
  • status_events prints the status of all events defined in the model
  • status_mailboxes prints the status for all mailboxes defined in the model
  • status_facilities prints the status of all facilities defined in the model
  • status_storages prints the status of all storage blocks defined in the model Details of the contents of these reports are in the sections of this document that discuss their related objects.

    To generate a complete status report, containing all of the sub-reports:
    dump_status();
    Notes:

  • The sub-reports appear in the order:
  • status_processes
  • status_next_event_list
  • status_events
  • status_mailboxes
  • status_facilities
  • status_storages
  • Each of the above status statements is callable, so a "customized" status report can be created.