physis.core.scheduler
Class MeritScheduler

java.lang.Object
  |
  +--physis.core.scheduler.MeritScheduler
All Implemented Interfaces:
Scheduler

public class MeritScheduler
extends java.lang.Object
implements Scheduler

Another dummy scheduler. The organism receives the same number of sticks as its merit. Newborns with zero merit get the average.


Field Summary
(package private)  DigitalOrganismIterator orgs
           
 
Constructor Summary
MeritScheduler()
           
 
Method Summary
 void fillWithOrganisms(DigitalOrganismIterator orgs_)
          Before starting the scheduling process the scheduler has to build up its internal data structure.
 void scheduleUpdate(int average)
          It schedules the executing of each digital organisms.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

orgs

DigitalOrganismIterator orgs
Constructor Detail

MeritScheduler

public MeritScheduler()
Method Detail

scheduleUpdate

public void scheduleUpdate(int average)
Description copied from interface: Scheduler
It schedules the executing of each digital organisms. The problem: we have to emulate the parallel processing of the virtual processors, and we have to take care the different working speeds.
Specified by:
scheduleUpdate in interface Scheduler
Following copied from interface: physis.core.scheduler.Scheduler
Parameters:
average_time_slice - the average number of executed instructions/per unit.

fillWithOrganisms

public void fillWithOrganisms(DigitalOrganismIterator orgs_)
Description copied from interface: Scheduler
Before starting the scheduling process the scheduler has to build up its internal data structure. The parameter is an iterator of the whole population.
Specified by:
fillWithOrganisms in interface Scheduler