Class Or

java.lang.Object
  |
  +--Or

public class Or
extends java.lang.Object

An Or manager for our orders

orCriterion
0 - all 'or' branches in sequence
1 - choosing first branch
2 - choosing second branch
3 - a random branch
4 - the branch whose first step has the shortest waiting list
5 - the branch whose number is stored in (x,0) pos in memoryMatrix designated by orMemoryMatrix in VEFrameModelSwarm.java; the matrix may be sensitive or insensitive to layers; range of the branch number: from 1 to branchNumber
x is 0 if the first node in 'or' sequence is numbered 1; is kk if the first node is numbered 10kk with kk 00 to 99

Author:
Pietro Terna

Field Summary
static MemoryMatrix mm
          memory matrix addresses to be used in orCriterion 5
static int orCriterion
          or criterion to be applied
static swarm.collections.ListImpl unitList
          the list of the operating units
 
Constructor Summary
Or()
           
 
Method Summary
static boolean applyOr(Order o)
          applying 'or'
static void setMemoryMatrix(MemoryMatrix m)
          setting the address of memory matrix
static void setOrCriterion(int k)
          setting the 'or' criterion
static void setUnitList(swarm.collections.ListImpl ul)
          setting the list of the units
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

orCriterion

public static int orCriterion
or criterion to be applied


unitList

public static swarm.collections.ListImpl unitList
the list of the operating units


mm

public static MemoryMatrix mm
memory matrix addresses to be used in orCriterion 5

Constructor Detail

Or

public Or()
Method Detail

setOrCriterion

public static void setOrCriterion(int k)
setting the 'or' criterion


setUnitList

public static void setUnitList(swarm.collections.ListImpl ul)
setting the list of the units


setMemoryMatrix

public static void setMemoryMatrix(MemoryMatrix m)
setting the address of memory matrix


applyOr

public static boolean applyOr(Order o)
applying 'or'