Thi is not correct and the workaround is not useful.
I am asking two things:
1. That under NO circumstances should I have to reset a server because aspose tasks has run it out of memory. The MPP provided does this on the orphan task and on the first task. I don’t know why you cant replicate it on the orphan task, but it is a general requirement, you must not allow it to happen under any circumstance. This should be an urgent fix. I avoid any “orphan task” by detecting it, making it inactive and so ignoring it. I avoid the first task by making sure not to recalculate it (eg see code below). I also plug in its dates of the projects last end date after the recalculate to avoid its recalculation.
2. The tasks recalculaate should do exactly what the MPP does. It does NOT. There is a finish to start constraint that is not being honored correctly in ASPOSE tasks. Attached is the recalculated MPP in MS Project 2013 and the constraints on task 15 are honored. In Aspose they are NOT. See the attached picture, where the end dat is correct, wheras aspose “shrinks” the total duration. I fix up the first date separately by lugging in the last finish date to also be eg 15/8/2013
A work around that depends on knowing which task to recalculate to get over this is no workaround at all. Of course I need a general solution not one specific to an MPP. Currently I have 8 different MPP’s from the customer and eventually expect around 20. BTW son are much more complicated with more than 100 taks and they seem to work. To date only this one demonstrates the two issues.
Now fortnately I did manage to work around both issues as follows before I met the customer today:
’ Replace this offending code that is based on recalculating the second task on
‘with new code
’ Aspose.Tasks.Task.Recalculate(tsk)
’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’
prj.CalculateCriticalPath()
Dim k As Integer = 0
For Each tsk1 As Aspose.Tasks.Task In collector.Tasks
If tsk1.IsCritical And tsk1.IsActive And tsk1.IsMilestone Then
k = k + 1
’ Avoid killing the customer server, and recalculate all taks on the critical path
’ forcing the longest paths to be honored correctly
If k > 1 Then Aspose.Tasks.Task.Recalculate(tsk1)
End If
Next
’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’'
ie replacing the ’ Aspose.Tasks.Task.Recalculate(tsk) with a calculation based on critical path and forcing the finsih to start constraint on task 15 to honor the longest duration, or indeed any finish to start.
I am using MPP 2013 and my customer MPP 2010 so it is not version dependent.