Package umontreal.iro.lecuyer.simevents

Examples of umontreal.iro.lecuyer.simevents.Event


      public Event previous() {
         if(!hasPrevious())
            throw new NoSuchElementException();

         nextIndex--;
         Event ev = prev.event;
         lastRet = prev;
         prev = prev.left;
         next = next.left;
         return ev;
      }
View Full Code Here


    // This method looks for the next process to give it the control.
    // If there are some event in the eventList, they will be executed
    // This method doesn't reactivate the executive.
    // Its behavior is the same of the executive (see the Sim.start method)
   protected void dispatch() {
      Event ev;
      while ((ev = removeFirstEvent()) != null) {
         if (ev instanceof SimThread) {
            // This is a process, the control will transfered to it.
            currentProcess = ((SimThread)ev).myProcess;
            ((SimThread)ev).activate();
            return;
         }
         else ev.actions();
         // This event is executed by the calling process.
      }
      SimThread.simActivate(this);                     // Simulation is over.
   }
View Full Code Here

TOP

Related Classes of umontreal.iro.lecuyer.simevents.Event

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.