home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-02-20 | 1.2 KB | 43 lines |
-
- package examples;
-
- import simula.simset.simulation.* ;
- import simula.*;
-
- public class MainProcess extends SimulationMain {
-
-
- public MainProcess(Simulation _simulation) throws SimulaException {
- super(_simulation);
- }
- public void run() {
- try {
- PrintProcess pp1 = new PrintProcess("Ariane 1", sim);
- PrintProcess pp2 = new PrintProcess("Ariane 2", sim);
- PrintProcess pp3 = new PrintProcess("Ariane 3", sim);
-
- Lang.outtext("French Guyana space center : Launch Ariane 1 NOW ! ") ;
- sim.activate(pp1);
-
- Lang.outtext("French Guyana space center : Launch Ariane 2 at 2:00 PM ") ;
- sim.activate_at(pp2, 2, false);
-
- Lang.outtext("French Guyana space center : Launch Ariane 3 before Ariane 2 ") ;
- sim.activate_before(pp3, pp2);
-
- Lang.outtext("French Guyana space center : Ariane 2 mission cancelled ! ") ;
- sim.cancel(pp2);
-
- Lang.outtext("French Guyana space center : coffee break..");
- sim.hold(9);
-
- Lang.outtext("French Guyana space center : mission over.");
- System.exit(1);
-
- } catch(SimulaException e) {
- Lang.outtext("French Guyana space center exception :> " + e.getMessage());
- System.exit(1);
- }
- }
- public String toString() { return "coffee break ending at " + evTime + " PM "; }
- }