case classLocallyParallelActivity[Env](activities: Seq[Activity[Env]]) extends Activity[Env] with Product with Serializable
Runs a set of activities in parallel using Scala's parallel collections.
Note
Building simulations with truly-concurrent agents is *really* hard.
As a design assumption, ThirdWay considers thread-based, parallel
simulations to be a bad idea. However, there are situations that
demand true concurrency. For example, the cognitive component of
thick agents may be embarrassingly parallel.
Rather than using synchronized-based locking, schedule the heavy
operation separately. For example, create an activity that calls
some agent's think() method. This method should do no
environmental or schedule mutation. Then, schedule it repeatedly,
with an ordering that comes after mutating and interacting
activities.
Linear Supertypes
Product, Equals, Activity[Env], Serializable, Serializable, AnyRef, Any
Runs a set of activities in parallel using Scala's parallel collections.
Building simulations with truly-concurrent agents is *really* hard. As a design assumption, ThirdWay considers thread-based, parallel simulations to be a bad idea. However, there are situations that demand true concurrency. For example, the cognitive component of thick agents may be embarrassingly parallel. Rather than using
synchronized
-based locking, schedule the heavy operation separately. For example, create an activity that calls some agent'sthink()
method. This method should do no environmental or schedule mutation. Then, schedule it repeatedly, with an ordering that comes after mutating and interacting activities.