Skip to content

Commit ccd0c6f

Browse files
authored
Update README.md
1 parent 6d7bca6 commit ccd0c6f

File tree

1 file changed

+30
-1
lines changed
  • src/test/java/org/javasim/examples/basic

1 file changed

+30
-1
lines changed
Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,30 @@
1-
Probably the first example ever written for C++SIM/JavaSim.
1+
This is an example of a simulation written using the simulation package. The example is taken from the book by Isi Mitrani (Simulation Techniques for Discrete Event Systems p22).
2+
3+
The simulation is of a service which attempts to execute as many requests for jobs as possible. The job requests are queued until the service can deal with them. However, the service is prone to failures, and so jobs started will be delayed until the service has been reactivated.
4+
5+
The classes provided include:
6+
7+
Arrivals - This class controls the rate at which Jobs arrive at
8+
the service (Machine)
9+
10+
Breaks - This class controls the availability of the Machine by
11+
"killing" it and restarting it at intervals drawn from
12+
a Uniform distribution.
13+
14+
Job - This class represents the jobs which the Machine must process.
15+
16+
Machine - This is the Machine on which the service resides. It obtains
17+
jobs from the job queue for the service and then attempts to
18+
execute them. The machine can fail and so the response time for
19+
jobs is not guaranteed to be the same.
20+
21+
MachineShop - This is the main part of the simulation which starts the
22+
various processes (Scheduler, Arrivals, Machine, Job)
23+
involved. It also prints out statistics for the response time
24+
for the jobs.
25+
26+
Queue - This represents the queue which Jobs are placed on prior to being
27+
used by the Machine (service).
28+
29+
Main - This is the body of the program which initializes the threads package
30+
prior to the simulation starting.

0 commit comments

Comments
 (0)