Queuing system.
Queuing system
Facility Box("Server");
Histogram Table("Table of time spent in system",0,25,20);
class Customer : public Process {
double ArrivalTime;
void Behavior() {
ArrivalTime = Time;
Seize(Box);
Wait(10);
Release(Box);
Table(Time-ArrivalTime);
}
};
class Generator : public Event {
void Behavior() {
}
};
Box.Output();
Table.Output();
}
void Activate(Entity *e)
activate entity e
void SetOutput(const char *name)
redirects Output(), Print() to file
void Run()
run simulation experiment
int Print(const char *fmt,...)
for Output methods, can be redirected
double Exponential(double mv)
Exponential distribution generator.
void Init(double t0, double t1=SIMLIB_MAXTIME)
Initialize simulator and model time.
const SIMLIB_statistics_t & SIMLIB_statistics
interface to internal run-time statistics structure
Main SIMLIB/C++ interface.
void Output() const
print run-time statistics to output