Learn R Programming

simEd (version 2.0.0)

defaultPlotMSQ: Default MSQ Plotting Function

Description

This function plots a visualization of a single-queue multi-server system.

Usage

defaultPlotMSQ(
  time,
  currSystem,
  newDropped = 0,
  nextToEnter = 0,
  newServed = 0,
  currProgress,
  numRejects = 0,
  serversCal,
  title = "",
  numServers,
  getPicFcn = function(i) return(NA)
)

Arguments

time

The current time of the simulation

currSystem

A vector of numbers listing the jobs in the current queue and server, ordered from first (the job in service) to last (the most recent) job to enter the queue.

newDropped

Number of a job that was just dropped/rejected due to queue reaching capacity. This will be plotted in the rejection pathway.

nextToEnter

Number of the next job that will enter the queue.

newServed

Number of a job that just finished being serviced.

currProgress

Number quantifying current progress of simulation in [0,1]

numRejects

Number of jobs rejected from queue so far

serversCal

Calendar of all the services as defined in MSQ. Contains at least names 'job', 'time', and 'state' for each server

title

Title of visualization

numServers

Number of servers in the system

getPicFcn

Function to return the an image of the ith job. Should return a raster image if an image exists, or NA otherwise

Details

Generates a snapshot plot of the queue with states specified in parameters. This is a default plotting function in msq. This will work for an msq with only one server, ssq is preferred.