Examples of timeNeeded()


Examples of rinde.sim.core.model.pdp.DefaultPDPModel.PickupAction.timeNeeded()

    model.pickup(truck, pack2, TimeLapseFactory.create(0, 40));
    assertFalse(rm.containsObject(pack2));
    final PickupAction action = (PickupAction) model
        .getVehicleActionInfo(truck);
    assertFalse(action.isDone());
    assertEquals(60, action.timeNeeded());
    assertEquals(ParcelState.PICKING_UP, model.getParcelState(pack2));
    assertEquals(VehicleState.PICKING_UP, model.getVehicleState(truck));

    model.continuePreviousActions(truck, TimeLapseFactory.create(0, 40));
    assertFalse(action.isDone());
View Full Code Here

Examples of rinde.sim.core.model.pdp.DefaultPDPModel.PickupAction.timeNeeded()

    assertEquals(ParcelState.PICKING_UP, model.getParcelState(pack2));
    assertEquals(VehicleState.PICKING_UP, model.getVehicleState(truck));

    model.continuePreviousActions(truck, TimeLapseFactory.create(0, 40));
    assertFalse(action.isDone());
    assertEquals(20, action.timeNeeded());
    assertEquals(ParcelState.PICKING_UP, model.getParcelState(pack2));
    assertEquals(VehicleState.PICKING_UP, model.getVehicleState(truck));

    final TimeLapse tl = TimeLapseFactory.create(0, 40);
    model.continuePreviousActions(truck, tl);
View Full Code Here

Examples of rinde.sim.core.model.pdp.DefaultPDPModel.PickupAction.timeNeeded()

    assertEquals(VehicleState.PICKING_UP, model.getVehicleState(truck));

    final TimeLapse tl = TimeLapseFactory.create(0, 40);
    model.continuePreviousActions(truck, tl);
    assertTrue(action.isDone());
    assertEquals(0, action.timeNeeded());
    assertEquals(20, tl.getTimeLeft());
    assertEquals(ParcelState.IN_CARGO, model.getParcelState(pack2));
    assertEquals(VehicleState.IDLE, model.getVehicleState(truck));

  }
View Full Code Here

Examples of rinde.sim.core.model.pdp.PDPModel.VehicleParcelActionInfo.timeNeeded()

    @Nullable
    DefaultParcel destination = null;
    if (!isIdle) {
      final VehicleParcelActionInfo vpai = pm.getVehicleActionInfo(vehicle);
      destination = ((DefaultParcel) vpai.getParcel());
      remainingServiceTime = vpai.timeNeeded();
    } else if (!rm.isVehicleDiversionAllowed()) {
      // check whether the vehicle is already underway to parcel
      destination = rm.getDestinationToParcel(vehicle);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.