38 Print(
"+----------------------------------------------------------+\n");
39 Print(
"| FACILITY %-47s |\n",
Name().c_str());
40 Print(
"+----------------------------------------------------------+\n");
41 sprintf(s,
" Status = %s ", (
Busy()) ?
"BUSY" :
"not BUSY");
42 Print(
"| %-56s |\n",s);
46 Print(
"| %-56s |\n", s);
51 Print(
"+----------------------------------------------------------+\n");
57 Print(
" Input queue '%s.Q1'\n",
Name().c_str());
62 Print(
" External input queue '%s'\n",
Q1->
Name().c_str());
66 Print(
" Interrupted services queue '%s.Q2'\n",
Name().c_str());
78 Print(
"+----------------------------------------------------------+\n");
79 Print(
"| HISTOGRAM %-46s |\n",
Name().c_str());
84 for (i=0; i<=
count+1; i++)
88 Print(
"| from | to | n | rel | sum |\n");
89 Print(
"+------------+------------+----------+----------+----------+\n");
92 for (i=1; i<=
count; i++)
96 double to = from+
step;
97 Print(
"| %10.3f | %10.3f | %8u | %8.6f | %8.6f |\n",
98 from, to, x, (
double)x/sum, (
double)s/sum);
101 Print(
"+------------+------------+----------+----------+----------+\n");
118 Print(
"+----------------------------------------------------------+\n");
122 Print(
"+----------------------------------------------------------+\n");
125 Print(
"| %-56s |\n", s);
128 Print(
"| Current length = %-26lu |\n",
size());
134 Print(
"| Average length = %-25g |\n",mv);
141 Print(
"| Average time = %-25g |\n", mv);
143 Print(
"| Standard deviation = %-25g |\n",
147 Print(
"+----------------------------------------------------------+\n");
148#ifdef XXX_PRINT_QUEUE_
151 Print(
"Queue contents:\n");
154 for(p=
begin(), u=1; p!=
end(); ++p, u++) {
158 Print(
"End of queue.\n");
168 Print(
"+----------------------------------------------------------+\n");
169 Print(
"| STATISTIC %-46s |\n",
Name().c_str());
170 Print(
"+----------------------------------------------------------+\n");
172 Print(
"| no record |\n");
176 Print(
"| Number of records = %-26ld |\n",
n);
179 Print(
"| Standard deviation = %-25g |\n",
StdDev());
181 Print(
"+----------------------------------------------------------+\n");
190 Print(
"+----------------------------------------------------------+\n");
191 Print(
"| STORE %-50s |\n",
Name().c_str());
192 Print(
"+----------------------------------------------------------+\n");
193 sprintf(s,
" Capacity = %lu (%lu used, %lu free) ",
195 Print(
"| %-56s |\n",s);
199 Print(
"| %-56s |\n", s);
206 Print(
"+----------------------------------------------------------+\n");
211 Print(
" Input queue '%s.Q'\n",
Name().c_str());
216 Print(
" External input queue '%s'\n",
Q->
Name().c_str());
225 Print(
"+----------------------------------------------------------+\n");
226 Print(
"| STATISTIC %-46s |\n",
Name().c_str());
227 Print(
"+----------------------------------------------------------+\n");
229 Print(
"| no record |\n");
234 sprintf(s,
" Time = %g - %g ",
t0, (
double)
Time);
235 Print(
"| %-56s |\n", s);
236 Print(
"| Number of records = %-26ld |\n",
n);
240 Print(
"+----------------------------------------------------------+\n");
bool Busy() const
in service
TStat tstat
usage statistics
virtual void Output() const override
print statistics
Queue * Q2
Interrupted requests queue.
bool OwnQueue() const
test for default queue
virtual void Output() const override
print to default output
virtual void Output() const override
print object to default output
virtual std::string Name() const override
name of object
virtual void Output() const override
print statistics
virtual std::string Name() const
get object name
unsigned long Number() const
virtual void Output() const override
print statistics
unsigned long Capacity() const
max capacity
virtual void Output() const override
print statistics
bool OwnQueue() const
OwnQueue.
unsigned long Free() const
free capacity
TStat tstat
usage statistics
unsigned long used
Currently used capacity.
virtual void Output() const override
print object to default output
unsigned long Number() const
Internal header file for SIMLIB/C++.
Implementation of class CalendarList interface is static - using global functions in SQS namespace.
const double & Time
model time (is NOT the block)
int Print(const char *fmt,...)
for Output methods, can be redirected
Main SIMLIB/C++ interface.