Defines an activity to run at a specific, scheduled time and group.
Runs a set of activities in parallel using Scala's parallel collections.
Does nothing.
Does nothing. Useful for testing
An activity that reschedules itself indefinitely, at a fixed interval.
An activity that reschedules itself indefinitely, at a fixed interval.
the implementation note in TentativeActivity
Runs a sequence of activities in a fixed order.
Runs a set of activities in randomized order.
An Activity
that will run once, but only if it has not been stop()
ed.
An Activity
that will run once, but only if it has not been stop()
ed.
The initial implementation used had activity: Option[Activity]
.
Calling stop
set this field to None
. It felt like proper Scala.
However, it also allows for substitution of an activity, which is
wrong. An immutable activity is better.
Calling stop
does not remove the TentativeActivity
from the
schedule. Instead, once dequeued
, it simply fails to take any
action on apply(env, schedule)
.
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.