physis.core.task
Class TaskLibrary

java.lang.Object
  |
  +--physis.core.task.TaskLibrary

public class TaskLibrary
extends java.lang.Object


Field Summary
private  java.util.Vector alltasks
          Contains all of the tasks in the order of instantiation.
private  java.util.Hashtable groups_by_names
          Keys groupnames, values Taskarrays.
private  Task[][][] task_lookup_table
          Taskarrays are mapped by their inputsize and outputsize.
 
Constructor Summary
TaskLibrary()
           
 
Method Summary
 void buildLibrary(java.lang.String taskfilename)
          Builds the internal datastructure of the task framework.
 void changeBonusesGlobally(int percent)
           
 double checkIOActivity(Metabolism metabolism, PerformedTasksRegister performed_tasks)
          Returns the meritmultiplier according to the organism's activity or Zero if it didn't perform any task.
 java.util.Enumeration getTaskGroups()
           
 java.lang.String getTaskNameByID(int id)
           
 TaskIterator getTasksFromGroup(java.lang.String groupname)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

alltasks

private java.util.Vector alltasks
Contains all of the tasks in the order of instantiation.

groups_by_names

private java.util.Hashtable groups_by_names
Keys groupnames, values Taskarrays.

task_lookup_table

private Task[][][] task_lookup_table
Taskarrays are mapped by their inputsize and outputsize.
Constructor Detail

TaskLibrary

public TaskLibrary()
Method Detail

buildLibrary

public void buildLibrary(java.lang.String taskfilename)
Builds the internal datastructure of the task framework.

getTaskGroups

public java.util.Enumeration getTaskGroups()

getTasksFromGroup

public TaskIterator getTasksFromGroup(java.lang.String groupname)

checkIOActivity

public double checkIOActivity(Metabolism metabolism,
                              PerformedTasksRegister performed_tasks)
Returns the meritmultiplier according to the organism's activity or Zero if it didn't perform any task.

getTaskNameByID

public java.lang.String getTaskNameByID(int id)

changeBonusesGlobally

public void changeBonusesGlobally(int percent)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object