home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-02-20 | 2.7 KB | 79 lines |
-
- package examples.warehouse;
-
-
- import simula.* ;
- import simula.simset.* ;
- import simula.simset.simulation.* ;
- /**
- * A versatile warehouse model
- * @author Andrea Poltronieri
- * @version 1.0 12 Feb 1998
- */
- public class WareHouseSimulation extends Simulation{
- /**Arrivals frequency */
- public double arr ;
- /**Removal frequency */
- public double rem ;
- /** Number of itemes transited for the warehouse*/
- public double iharea ;
- /** Time of last arrive/departure*/
- public double lastevent ;
- /** Simulation length */
- public double simperiod ;
- /** Arrived batches*/
- public int arrived ;
- /** Rejected batches */
- public int rejected ;
- /** Lower bound for incoming batches */
- public int in1 ;
- /** Upper boud for incoming batches */
- public int in2 ;
- /** Lower bound for outgoing batches */
- public int out1 ;
- /** Upper bound for outgoing batches */
- public int out2 ;
- /** Occuped storage space*/
- public int n ;
- /** Storage space*/
- public int m ;
- /** Random generator seed*/
- public int seed ;
- /** Process wich performs batch processing*/
- public Removals worker ;
-
-
- /**
- * Print credits on standar error.
- */
- private static void credits ( ) {
- System.err.println("***********************************************************") ;
- System.err.println("* Example for Korretto *") ;
- System.err.println("* A versatile warehouse model *") ;
- System.err.println("* see 'Simulation techiniques for discrete event systems' *") ;
- System.err.println("* I. Mitrani -- Cambridge University press *") ;
- System.err.println("* example 3.1 *") ;
- System.err.println("***********************************************************") ;
- System.err.println("* author : Andrea Poltronieri *") ;
- System.err.println("* Verona University *") ;
- System.err.println("* e-mail : poltro@arena.sci.univr.it *") ;
- System.err.println("* http://arena.sci.univr.it/~poltro *") ;
- System.err.println("***********************************************************") ;
- return;
- }
- /**
- * Start the simualtion, instantiating a new Simulation and launching the main program
- * @param args[] Ignored
- * @see simula.simset.simulation.Simulation
- * @see simula.simset.simulation.SimulationMain
- */
- public static void main (String args[]) {
- try{
- credits();
- WareHouseSimulation sim = new WareHouseSimulation();
- WareHouseMain main = new WareHouseMain(sim);
-
- } catch (Exception e) { System.out.println("Exception caught: " + e);}
-
- }
- }