0

I have a model which asks all agents once in go procedure and rest of producers start with a condition, if the agent has that condition will do the tasks.

To go
  ask agents 
    [
       Task1
       TASK 2
    ]
end 


To Task1
 if condition [...]

end


to Task 2
   if condition [...]

end

I can do this another way by making my conditions ask agents with [condition] and eliminate the ask in go procedure.

To go
         Task1
         Task1  
End 

To task1
 ask agents with [Condition1] [...]
end

to task2
    ask agents with [Condition2] [...]
end

I have done my entire model using first approach and it will be really time consuming to test it with the second one, I was wondering if anyone had ever find out the impact of these two approaches on performance (if there is any difference at all!)

Marzy
  • 1,884
  • 16
  • 24

1 Answers1

1

I would predict no performance difference.

Seth Tisue
  • 29,985
  • 11
  • 82
  • 149
  • 1
    Note that there is a semantic difference in that with `with`, all the checks on the conditions happen up front, before any agents do the tasks, whereas with `if`, the task-doing is interleaved with the checking. It could make a difference one of the agents can do something that affects the condition on one of the other agents. – Seth Tisue Nov 12 '13 at 21:30