Package desmoj.core.simulator

Examples of desmoj.core.simulator.TimeSpan


    // create the TruckGeneratorEvent
    TruckGeneratorEvent truckGenerator = new TruckGeneratorEvent(this, "TruckGenerator", true);

    // schedule for start of simulation
    truckGenerator.schedule(new TimeSpan(0));
  }
View Full Code Here


      // create a new truck
      Truck truck = new Truck(model, "Truck", true);
      // create a new truck arrival event
      TruckArrivalEvent truckArrival = new TruckArrivalEvent(model, "TruckArrivalEvent", true);
      // and schedule it for the current point in time
      truckArrival.schedule(truck, new TimeSpan(0.0));
    }

    if (!(!produce && model.getTruckQueue().length() == 0)) {
      schedule(new TimeSpan(model.getTruckArrivalTime(), TimeUnit.MINUTES));
      // from inside to outside...
      // draw a new inter-arrival time value
      // wrap it in a TimeSpan object
      // and schedule this event for the current point in time + the
      // inter-arrival time
View Full Code Here

      // create a service end event
      ServiceEndEvent serviceEnd = new ServiceEndEvent(myModel, "ServiceEndEvent", true);

      // and place it on the event list
      serviceEnd.schedule(vanCarrier, truck, new TimeSpan(myModel.getServiceTime(), TimeUnit.MINUTES));

    }

  }
View Full Code Here

  private void scheduleStationStartEventForPartsContainer(PartsContainer partsContainer) {
    EIn entityToSchedule;

    entityToSchedule = ((EIn) partsContainer);

    super.getStartEvent().schedule(entityToSchedule, new TimeSpan(0));
  }
View Full Code Here

   *
   * @return the transport time
   */
  public TimeSpan getTransportTime() {
    if (transportTime == null) {
      return new TimeSpan(0);
    } else {
      return transportTime.sampleTimeSpan();
    }
  }
View Full Code Here

          "dont call this method more than once on a single object");
    }

    started = true;
    for (int i = 0; i < getRemainingServiceCapacity(); i++) {
      getStartEvent().schedule(createDummyEntity(), new TimeSpan(0));
    }
  }
View Full Code Here

TOP

Related Classes of desmoj.core.simulator.TimeSpan

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.