mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
removed comments
This commit is contained in:
parent
40b75eae92
commit
3ec00c3dd3
1 changed files with 0 additions and 14 deletions
|
|
@ -35,37 +35,23 @@ class ServiceLoadActivityLevelConstraint implements HardActivityStateLevelConstr
|
|||
Capacity prevMaxLoad;
|
||||
if(prevAct instanceof Start){
|
||||
futureMaxLoad = stateManager.getRouteState(iFacts.getRoute(), StateFactory.MAXLOAD, Capacity.class);
|
||||
// futureMaxLoad = (int)stateManager.getRouteState(iFacts.getRoute(), StateFactory.MAXLOAD).toDouble();
|
||||
prevMaxLoad = stateManager.getRouteState(iFacts.getRoute(), StateFactory.LOAD_AT_BEGINNING, Capacity.class);
|
||||
// prevMaxLoad = (int)stateManager.getRouteState(iFacts.getRoute(), StateFactory.LOAD_AT_BEGINNING).toDouble();
|
||||
}
|
||||
else{
|
||||
futureMaxLoad = stateManager.getActivityState(prevAct, StateFactory.FUTURE_MAXLOAD, Capacity.class);
|
||||
// futureMaxLoad = (int) stateManager.getActivityState(prevAct, StateFactory.FUTURE_MAXLOAD).toDouble();
|
||||
prevMaxLoad = stateManager.getActivityState(prevAct, StateFactory.PAST_MAXLOAD, Capacity.class);
|
||||
// prevMaxLoad = (int) stateManager.getActivityState(prevAct, StateFactory.PAST_MAXLOAD).toDouble();
|
||||
|
||||
}
|
||||
if(newAct instanceof PickupService || newAct instanceof ServiceActivity){
|
||||
if(!Capacity.addup(newAct.getSize(), futureMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())){
|
||||
return ConstraintsStatus.NOT_FULFILLED;
|
||||
}
|
||||
// if(newAct.getCapacityDemand() + futureMaxLoad > iFacts.getNewVehicle().getCapacity()){
|
||||
//// log.debug("insertionOf("+newAct+").BETWEEN("+prevAct+").AND("+nextAct+")=NOT_POSSIBLE");
|
||||
// return ConstraintsStatus.NOT_FULFILLED;
|
||||
// }
|
||||
}
|
||||
if(newAct instanceof DeliverService){
|
||||
if(!Capacity.addup(Capacity.invert(newAct.getSize()), prevMaxLoad).isLessOrEqual(iFacts.getNewVehicle().getType().getCapacityDimensions())){
|
||||
return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
||||
}
|
||||
// if(Math.abs(newAct.getCapacityDemand()) + prevMaxLoad > iFacts.getNewVehicle().getCapacity()){
|
||||
//// log.debug("insertionOf("+newAct+").BETWEEN("+prevAct+").AND("+nextAct+")=NOT_POSSIBLE[break=neverBePossibleAnymore]");
|
||||
// return ConstraintsStatus.NOT_FULFILLED_BREAK;
|
||||
// }
|
||||
|
||||
}
|
||||
// log.debug("insertionOf("+newAct+").BETWEEN("+prevAct+").AND("+nextAct+")=POSSIBLE");
|
||||
return ConstraintsStatus.FULFILLED;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue