The start date when merging the allocation is defined by the task

In the future the start will be defined by the aggregate of resource
allocations if the task is planned backwards.

FEA: ItEr62OTS04PlanificacionHaciaAtras
This commit is contained in:
Óscar González Fernández 2010-10-28 13:30:15 +02:00
parent 4df83498fb
commit a52adc6783
2 changed files with 7 additions and 17 deletions

View file

@ -359,22 +359,7 @@ public class Task extends TaskElement implements ITaskLeafConstraint {
}
public void mergeAllocation(Scenario scenario,
CalculatedValue calculatedValue,
AggregateOfResourceAllocations aggregate,
List<ResourceAllocation<?>> newAllocations,
List<ModifiedAllocation> modifications,
Collection<? extends ResourceAllocation<?>> toRemove) {
if (aggregate.isEmpty()) {
return;
}
final IntraDayDate start = aggregate.getStart();
final IntraDayDate end = aggregate.getEnd();
mergeAllocation(scenario, start, end, calculatedValue, newAllocations,
modifications, toRemove);
}
private void mergeAllocation(Scenario scenario, final IntraDayDate start,
public void mergeAllocation(Scenario scenario, final IntraDayDate start,
final IntraDayDate end,
CalculatedValue calculatedValue,
List<ResourceAllocation<?>> newAllocations,

View file

@ -130,7 +130,12 @@ public class AllocationResult {
public void applyTo(Scenario scenario, Task task) {
List<ModifiedAllocation> modified = getModified();
task.mergeAllocation(scenario, getCalculatedValue(), aggregate,
if (aggregate.isEmpty()) {
return;
}
final IntraDayDate start = task.getIntraDayStartDate();
final IntraDayDate end = aggregate.getEnd();
task.mergeAllocation(scenario, start, end, getCalculatedValue(),
getNew(), modified, getNotModified(originals(modified)));
}