I'm studying how to control the taskexecuter's tasksequence.
I made the code as below to change the tasksequence to avoid blocking when the destination processor is breakdown.
The problem that I can't solve now is, if the tasksequence has been changed at once, no more tasksequence is created after finishing the processing.
I don't want another solution, but I just want to know the reason why this problem is happen.
TaskSequence next_ts = gettasksequence(te, 1); Object temp_task4_involve1 = gettaskinvolved(cur_ts,4,1); Object temp_task5_involve1 = gettaskinvolved(next_ts,5,1); Object temp_task5_involve2 = gettaskinvolved(cur_ts,5,2); changetask(cur_ts, 4,TASKTYPE_TRAVEL,gettaskinvolved(next_ts,4,1)); changetask(cur_ts, 5,TASKTYPE_UNLOAD,gettaskinvolved(cur_ts,5,1),gettaskinvolved(next_ts,5,2)); changetask(next_ts, 4,TASKTYPE_TRAVEL,temp_task4_involve1); changetask(next_ts, 5,TASKTYPE_UNLOAD,temp_task5_involve1,temp_task5_involve2); next_ts.rank = 1; cur_ts.dispatch();