trait TeamFormationLib extends AnyRef
This library provides the basic blocks to create logical teams, i.e., a subset of node that have a persistent common goal. One a team is formed, the nodes cannot leave it. Inside a team, there will be a logic influenced by the leader-based movement, i.e., the leader will be responsible for the movement of the team. This library provides a way to create this teams based on intra-distance and extra-distance. The foster is the distance between nodes that are in the same team. The latter is influence of the leader during the formation of the team.
- Self Type
- MacroSwarmSupport.TeamFormationLib with E.AggregateProgram with E.StandardSensors with E.FieldUtils with E.TimeUtils with MacroSwarmSupport.BaseMovementLib with E.CustomSpawn with E.BlocksWithGC with MacroSwarmSupport.BlocksWithShare with MacroSwarmSupport.FlockLib with MacroSwarmSupport.LeaderBasedLib
- Alphabetic
- By Inheritance
- TeamFormationLib
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class Team(leader: E.ID, isFormed: Boolean, velocity: Point3D) extends Product with Serializable
A team is a set of nodes that have a common goal.
A team is a set of nodes that have a common goal. The team is formed when the leader is able to influence the nodes to move towards the goal. The team is persistent, i.e., the nodes cannot leave the team.
- leader
the leader of the team
- isFormed
whether the team is formed or not
- velocity
the velocity of local movement of the team
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTeamFormed(source: Boolean, targetDistance: Double, necessary: Int = 1): Boolean
The logic of creating a team based on the distance between the nodes.
The logic of creating a team based on the distance between the nodes. A team is consider formed when all the nodes have the same average distances from their neighbours.
- source
whether the node is the leader or not
- targetDistance
the distance between the nodes in the team
- necessary
the number of nodes to be considered when computing the average distance
- returns
whether the team is formed or not
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def teamFormation(center: Boolean, targetIntraDistance: Double, separationWeight: Double, condition: (Boolean) => Boolean): (TeamFormationLib.this)#Team
The actual team formation logic.
The actual team formation logic. In this case, a leader already exists and it is provided as input. This block is responsible of maintaining the right intra distance between the nodes. The condition is a function that takes as input the leader and returns whether the team is formed or not.
An example of usage is the following:
scala teamFormation(leader, 80, 0.1, leader => isTeamFormed(leader, 100, 2))
- center
the leader of the team
- targetIntraDistance
the distance between the nodes in the team
- separationWeight
the weight of the separation force
- condition
the condition to be satisfied to consider the team formed
- def teamFormation(targetIntraDistance: Double, targetExtraDistance: Double, separationWeight: Double, condition: (Boolean) => Boolean): (TeamFormationLib.this)#Team
The logic of creating a team based on the distance between the nodes.
The logic of creating a team based on the distance between the nodes.
In this case, it use internally S to compute leaders based on the extra distance.
The condition is a function that takes as input the leader and returns whether the team is formed or not.
An example of usage is the following:
scala teamFormation(80, 300, 0.1, leader => isTeamFormed(leader, 100, 2))
- targetIntraDistance
the distance between the nodes in the team
- targetExtraDistance
the area of influence of the leader
- separationWeight
the weight of the separation force
- condition
the condition to be satisfied to consider the team formed
- returns
whether the team is formed or not
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)