2016-08-26 145 views

回答

0

下面是答案:

Tasks t = null; 
if(delayTasks.size()>0){ 

    //use a random agent stored at delayTasks 
    int i = uniform_discr(0, delayTasks.size()-1); 
    t=delayTasks.get(i); 

    //or use any specific condition 
    for(int i=0; i< delayTasks.size(); i++){ 
    //if() any condition 
     t=delayTasks.get(i); 
    } 

    //Then you release the agent t 
    if(...){ 
     delayTasks.stopDelay(t); 
    } 
} 
相關問題