home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-02-20 | 1.3 KB | 53 lines |
-
- package examples.warehouse.GUI;
-
- import simula.*;
- import simula.simset.simulation.* ;
- import simula.Lang ;
- /**
- * Main program for warehouse simulation
- * @author Andrea Poltronieri
- * @version 1.0 12 Feb 1998
- */
-
- public class WareHouseMain extends SimulationMain {
-
- /**
- * @param _simulation The active Simulation
- * @exception simula.SimulaException Any exception from Korretto API
- */
- public WareHouseMain(Simulation _simulation) throws SimulaException {
- super(_simulation);
-
- }
- /**
- * Executes the main program for the simulation
- */
- public void run() {
- try {
- examples.warehouse.WareHouseSimulation sim=(examples.warehouse.WareHouseSimulation)this.sim ;
-
- sim.n = 0; // No units are present in warehouse at time 0: experiment on this
- sim.rejected = 0; // No batches are initially rejected
- sim.arrived = 0; // And no one is arrived
- sim.iharea = 0;
- sim.lastevent = 0;
-
- sim.activate(new examples.warehouse.Arrivals(sim));
-
- sim.worker = new examples.warehouse.Removals(sim) ;
- sim.activate(sim.worker) ;
-
-
- sim.hold(sim.simperiod) ;
-
-
- sim.end() ;
-
-
- } catch(SimulaException e) {
- Lang.outtext(" Exception :> " + e+e.getMessage());
- System.exit(1);
- }
- }
- }