physis.core.scheduler
Class ScaledMeritScheduler

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

public class ScaledMeritScheduler
extends java.lang.Object
implements Scheduler

A somewhat more sophisticated scheduler. It scales the merit so the average means average approximately. The number of actually given sticks don't grow limitless as with the MeritScheduler.


Field Summary
(package private)  DigitalOrganismIterator orgs
           
 
Constructor Summary
ScaledMeritScheduler()
           
 
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

ScaledMeritScheduler

public ScaledMeritScheduler()
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