algorithms
Class UpdateLoadAtActivityLevel

java.lang.Object
  extended by algorithms.UpdateLoadAtActivityLevel
All Implemented Interfaces:
ActivityVisitor

public class UpdateLoadAtActivityLevel
extends java.lang.Object
implements ActivityVisitor

Updates load at activity level.

Note that this assumes that StateTypes.LOAD_AT_DEPOT is already updated, i.e. it starts by setting loadAtDepot to StateTypes.LOAD_AT_DEPOT. If StateTypes.LOAD_AT_DEPOT is not set, it starts with 0 load at depot.

Thus it DEPENDS on StateTypes.LOAD_AT_DEPOT

Author:
stefan

Constructor Summary
UpdateLoadAtActivityLevel(StateManagerImpl stateManager)
          Updates load at activity level.
 
Method Summary
 void begin(VehicleRoute route)
           
 void finish()
           
 void visit(TourActivity act)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateLoadAtActivityLevel

public UpdateLoadAtActivityLevel(StateManagerImpl stateManager)
Updates load at activity level.

Note that this assumes that StateTypes.LOAD_AT_DEPOT is already updated, i.e. it starts by setting loadAtDepot to StateTypes.LOAD_AT_DEPOT. If StateTypes.LOAD_AT_DEPOT is not set, it starts with 0 load at depot.

Thus it DEPENDS on StateTypes.LOAD_AT_DEPOT

If you want to update StateTypes.LOAD_AT_DEPOT see InitializeLoadsAtStartAndEndOfRouteWhenInsertionStarts, UpdateLoadsAtStartAndEndOfRouteWhenJobHasBeenInserted

The loads can be retrieved by
stateManager.getActivityState(activity,StateTypes.LOAD);

See Also:
InitializeLoadsAtStartAndEndOfRouteWhenInsertionStarts}, {@link UpdateLoadsAtStartAndEndOfRouteWhenJobHasBeenInserted}
Method Detail

begin

public void begin(VehicleRoute route)
Specified by:
begin in interface ActivityVisitor

visit

public void visit(TourActivity act)
Specified by:
visit in interface ActivityVisitor

finish

public void finish()
Specified by:
finish in interface ActivityVisitor