org.jscience.architecture.traffic.algorithms.tlc
Class TLCFactory

java.lang.Object
  extended by org.jscience.architecture.traffic.algorithms.tlc.TLCFactory

public class TLCFactory
extends java.lang.Object

DOCUMENT ME!


Field Summary
protected static int ACGJ_1
          DOCUMENT ME!
protected static int ACGJ_2
          DOCUMENT ME!
protected static int ACGJ_3
          DOCUMENT ME!
protected static int ACGJ_3_FV
          DOCUMENT ME!
protected static int ACGJ_4
          DOCUMENT ME!
protected static int ACGJ_5
          DOCUMENT ME!
protected static int BEST_FIRST
          DOCUMENT ME!
protected static java.lang.String[] categoryDescs
          DOCUMENT ME!
protected static int[][] categoryTLCs
          DOCUMENT ME!
protected static int GENNEURAL
          DOCUMENT ME!
protected  Infrastructure infra
          DOCUMENT ME!
protected static int LOCAL
          DOCUMENT ME!
protected static int LONGEST_QUEUE
          DOCUMENT ME!
protected static int MOST_CARS
          DOCUMENT ME!
protected  java.util.Random random
          DOCUMENT ME!
protected static int RANDOM
          DOCUMENT ME!
protected static int RELATIVE_LONGEST_QUEUE
          DOCUMENT ME!
protected static int RLD
          DOCUMENT ME!
protected static int RLD2
          DOCUMENT ME!
protected static int RLSARSA1
          DOCUMENT ME!
protected static int RLSARSA2
          DOCUMENT ME!
protected static int RLSARSA3
          DOCUMENT ME!
protected static int RLSARSA4
          DOCUMENT ME!
protected static int RLSARSA5
          DOCUMENT ME!
protected static int RLSARSA6
          DOCUMENT ME!
protected static int TC_1_DESTLESS
          DOCUMENT ME!
protected static int TC_1OPT
          DOCUMENT ME!
protected static int TC_2_DESTLESS
          DOCUMENT ME!
protected static int TC_2FINAL
          DOCUMENT ME!
protected static int TC_2OPT
          DOCUMENT ME!
protected static int TC_3_WORKINPROGRESS
          DOCUMENT ME!
protected static int TC_3OPT
          DOCUMENT ME!
protected static int TC1_B1
          DOCUMENT ME!
protected static int TC1_FIX
          DOCUMENT ME!
protected static int TC2_B1
          DOCUMENT ME!
protected static int TC3_B1
          DOCUMENT ME!
protected static java.lang.String[] tlcDescs
          DOCUMENT ME!
protected static java.lang.String[] xmlNames
          DOCUMENT ME!
 
Constructor Summary
TLCFactory(Infrastructure infra)
          Makes a new TLCFactory for a specific infrastructure with a new random number generator.
TLCFactory(Infrastructure infra, java.util.Random random)
          Makes a new TLCFactory for a specific infrastructure
 
Method Summary
 TLController genTLC(int cat, int tlc)
          DOCUMENT ME!
 TLController genTLC(java.lang.String tlcDesc)
          Returns an instance of a TLC by its description.
static java.lang.String[] getCategoryDescs()
          Returns an array containing the TLC category descriptions.
static int[][] getCategoryTLCs()
          Returns an array of TLC numbers for each TLC category.
static java.lang.String getDescription(int algoId)
          Look up the description of a TLC algorithm by its id
static int getId(java.lang.String algoDesc)
          Looks up the id of a TLC algorithm by its description
 TLController getInstanceForLoad(int algoId)
          Gets a new instance of an algorithm by its number.
static int getNumberByXMLTagName(java.lang.String tagName)
          Gets the number of an algorithm from its XML tag name
static int getNumberOfTLCs()
          Returns the total number of TLCs currently available.
static java.lang.String[] getTLCDescriptions()
          Returns an array of TLC descriptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RANDOM

protected static final int RANDOM
DOCUMENT ME!

See Also:
Constant Field Values

LONGEST_QUEUE

protected static final int LONGEST_QUEUE
DOCUMENT ME!

See Also:
Constant Field Values

MOST_CARS

protected static final int MOST_CARS
DOCUMENT ME!

See Also:
Constant Field Values

BEST_FIRST

protected static final int BEST_FIRST
DOCUMENT ME!

See Also:
Constant Field Values

RELATIVE_LONGEST_QUEUE

protected static final int RELATIVE_LONGEST_QUEUE
DOCUMENT ME!

See Also:
Constant Field Values

RLD

protected static final int RLD
DOCUMENT ME!

See Also:
Constant Field Values

RLD2

protected static final int RLD2
DOCUMENT ME!

See Also:
Constant Field Values

TC_1OPT

protected static final int TC_1OPT
DOCUMENT ME!

See Also:
Constant Field Values

TC_2OPT

protected static final int TC_2OPT
DOCUMENT ME!

See Also:
Constant Field Values

TC_3OPT

protected static final int TC_3OPT
DOCUMENT ME!

See Also:
Constant Field Values

TC1_B1

protected static final int TC1_B1
DOCUMENT ME!

See Also:
Constant Field Values

TC2_B1

protected static final int TC2_B1
DOCUMENT ME!

See Also:
Constant Field Values

TC3_B1

protected static final int TC3_B1
DOCUMENT ME!

See Also:
Constant Field Values

TC_1_DESTLESS

protected static final int TC_1_DESTLESS
DOCUMENT ME!

See Also:
Constant Field Values

TC_2_DESTLESS

protected static final int TC_2_DESTLESS
DOCUMENT ME!

See Also:
Constant Field Values

TC_3_WORKINPROGRESS

protected static final int TC_3_WORKINPROGRESS
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_1

protected static final int ACGJ_1
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_2

protected static final int ACGJ_2
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_3

protected static final int ACGJ_3
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_3_FV

protected static final int ACGJ_3_FV
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_4

protected static final int ACGJ_4
DOCUMENT ME!

See Also:
Constant Field Values

ACGJ_5

protected static final int ACGJ_5
DOCUMENT ME!

See Also:
Constant Field Values

LOCAL

protected static final int LOCAL
DOCUMENT ME!

See Also:
Constant Field Values

GENNEURAL

protected static final int GENNEURAL
DOCUMENT ME!

See Also:
Constant Field Values

TC_2FINAL

protected static final int TC_2FINAL
DOCUMENT ME!

See Also:
Constant Field Values

TC1_FIX

protected static final int TC1_FIX
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA1

protected static final int RLSARSA1
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA2

protected static final int RLSARSA2
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA3

protected static final int RLSARSA3
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA4

protected static final int RLSARSA4
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA5

protected static final int RLSARSA5
DOCUMENT ME!

See Also:
Constant Field Values

RLSARSA6

protected static final int RLSARSA6
DOCUMENT ME!

See Also:
Constant Field Values

tlcDescs

protected static final java.lang.String[] tlcDescs
DOCUMENT ME!


xmlNames

protected static final java.lang.String[] xmlNames
DOCUMENT ME!


categoryDescs

protected static final java.lang.String[] categoryDescs
DOCUMENT ME!


categoryTLCs

protected static final int[][] categoryTLCs
DOCUMENT ME!


infra

protected Infrastructure infra
DOCUMENT ME!


random

protected java.util.Random random
DOCUMENT ME!

Constructor Detail

TLCFactory

public TLCFactory(Infrastructure infra)
Makes a new TLCFactory for a specific infrastructure with a new random number generator.

Parameters:
infra - The infrastructure

TLCFactory

public TLCFactory(Infrastructure infra,
                  java.util.Random random)
Makes a new TLCFactory for a specific infrastructure

Parameters:
infra - The infrastructure
random - The random number generator which some algorithms use
Method Detail

getId

public static int getId(java.lang.String algoDesc)
Looks up the id of a TLC algorithm by its description

Parameters:
algoDesc - The description of the algorithm
Returns:
The id of the algorithm

getTLCDescriptions

public static java.lang.String[] getTLCDescriptions()
Returns an array of TLC descriptions

Returns:
DOCUMENT ME!

getDescription

public static java.lang.String getDescription(int algoId)
Look up the description of a TLC algorithm by its id

Parameters:
algoId - The id of the algorithm
Returns:
The description

getCategoryDescs

public static java.lang.String[] getCategoryDescs()
Returns an array containing the TLC category descriptions.

Returns:
DOCUMENT ME!

getCategoryTLCs

public static int[][] getCategoryTLCs()
Returns an array of TLC numbers for each TLC category.

Returns:
DOCUMENT ME!

getNumberOfTLCs

public static int getNumberOfTLCs()
Returns the total number of TLCs currently available.

Returns:
DOCUMENT ME!

getNumberByXMLTagName

public static int getNumberByXMLTagName(java.lang.String tagName)
Gets the number of an algorithm from its XML tag name

Parameters:
tagName - DOCUMENT ME!
Returns:
DOCUMENT ME!

genTLC

public TLController genTLC(java.lang.String tlcDesc)
                    throws InfraException
Returns an instance of a TLC by its description.

Parameters:
tlcDesc - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
InfraException - DOCUMENT ME!

genTLC

public TLController genTLC(int cat,
                           int tlc)
                    throws InfraException
DOCUMENT ME!

Parameters:
cat - DOCUMENT ME!
tlc - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
InfraException - DOCUMENT ME!

getInstanceForLoad

public TLController getInstanceForLoad(int algoId)
                                throws InfraException
Gets a new instance of an algorithm by its number. This method is meant to be used for loading.

Parameters:
algoId - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
InfraException - DOCUMENT ME!