When all preconditions are met the actual delivery is started, this is indicated by the dispatching of an {@link rinde.sim.event.Event} with{@link PDPModelEventType#START_DELIVERY} type. If there is not enough timein the specified {@link TimeLapse} to complete the delivery at once, theaction will be completed in the next tick. Note that this method does not, and in fact, should not be called again in the next tick to continue the delivery. The continued delivery is handled automatically, the effect is that the {@link Vehicle} will receive less time (or no time at all) in itsnext tick. When the delivery is completed an {@link rinde.sim.event.Event}with type {@link PDPModelEventType#END_DELIVERY} is dispatched. As a resultthe {@link Vehicle} no longer contains the {@link Parcel} and the{@link Parcel} is NOT added to the{@link rinde.sim.core.model.road.RoadModel} again. @param vehicle The {@link Vehicle} that wishes to deliver a {@link Parcel}. @param parcel The {@link Parcel} that is to be delivered. @param time The {@link TimeLapse} that is available for delivery.
|
|
|
|