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");
110 Print(
" PROCESS %-38s %10s \n",
Name().c_str(), isCurrent()?
"Current":
" ");
118 Print(
"+----------------------------------------------------------+\n");
119 Print(
"| QUEUE %-39s %10s |\n",
Name().c_str(), StatN.Number()?
"":
"not used");
120 if (StatN.Number() > 0)
122 Print(
"+----------------------------------------------------------+\n");
124 sprintf(s,
" Time interval = %g - %g ",StatN.StartTime(), (double)
Time);
125 Print(
"| %-56s |\n", s);
126 Print(
"| Incoming %-26ld |\n", StatN.Number());
127 Print(
"| Outcoming %-26ld |\n", StatDT.Number());
128 Print(
"| Current length = %-26lu |\n", size());
129 Print(
"| Maximal length = %-25g |\n", StatN.Max());
130 double dt = double(
Time) - StatN.StartTime();
133 double mv = StatN.MeanValue();
134 Print(
"| Average length = %-25g |\n",mv);
136 if (StatDT.Number()>0)
138 Print(
"| Minimal time = %-25g |\n", StatDT.Min());
139 Print(
"| Maximal time = %-25g |\n", StatDT.Max());
140 double mv = StatDT.MeanValue();
141 Print(
"| Average time = %-25g |\n", mv);
142 if (StatDT.Number()>99)
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);
177 Print(
"| Average value = %-25g |\n", MeanValue());
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) ",
194 Capacity(), used, Free());
195 Print(
"| %-56s |\n",s);
199 Print(
"| %-56s |\n", s);
206 Print(
"+----------------------------------------------------------+\n");
209 if (Q->StatN.Number()>0)
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);
238 Print(
"| Average value = %-25g |\n", MeanValue());
240 Print(
"+----------------------------------------------------------+\n");
virtual void Output() const override
print object to default output
virtual void Output() const override
print statistics
bool OwnQueue() const
test for default queue
bool Busy() const
in service
virtual void Output() const override
print statistics
int Print(const char *fmt,...)
for Output methods, can be redirected
Implementation of class CalendarList interface is static - using global functions in SQS namespace...
double max(double a, double b)
const double & Time
model time (is NOT the block)
unsigned long Number() const
double min(double a, double b)
virtual void Output() const override
print to default output
Internal header file for SIMLIB/C++.
Main SIMLIB/C++ interface.
virtual std::string Name() const
get object name
virtual void Output() const override
print statistics
Queue * Q2
Interrupted requests queue.
virtual void Output() const override
print statistics
virtual void Output() const override
print object to default output
TStat tstat
usage statistics