net.sf.myra.framework
Class ParallelScheduler

java.lang.Object
  extended by net.sf.myra.framework.Scheduler
      extended by net.sf.myra.framework.ParallelScheduler

public class ParallelScheduler
extends Scheduler

This class represents an extension of the Scheduler, which support parallel trail construction. Note that for this implementation to work, the trail factory, local search operator and objective function implementations must be thread safe.

Version:
$Revision$ $Date:: $
Author:
Fernando Esteban Barril Otero
See Also:
Scheduler

Field Summary
static java.lang.String WORKERS
          The property key under which the number of workers threads value is stored.
 
Fields inherited from class net.sf.myra.framework.Scheduler
action, condition, environment, function, information, search, updater
 
Constructor Summary
ParallelScheduler(Colony colony, StopCondition condition, ObjectiveFunction function, PheromoneUpdater updater, HeuristicInformation information)
          Creates a new ParallelScheduler instance.
 
Method Summary
protected  void createSolutions()
          Creates the ants' trails (solutions).
 void run()
          Evolves the colony 'till the stop condition is reached.
 
Methods inherited from class net.sf.myra.framework.Scheduler
daemonActions, getDaemonAction, getLocalSearch, getPheromoneUpdater, initialize, setDaemonAction, setLocalSearch, updatePheromones
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WORKERS

public static final java.lang.String WORKERS
The property key under which the number of workers threads value is stored. If not specified, there will be one worker thread per processor/core.

See Also:
Constant Field Values
Constructor Detail

ParallelScheduler

public ParallelScheduler(Colony colony,
                         StopCondition condition,
                         ObjectiveFunction function,
                         PheromoneUpdater updater,
                         HeuristicInformation information)
Creates a new ParallelScheduler instance.

Parameters:
colony - the colony of ants.
condition - the stop condition.
function - the objective function.
updater - the pheromone update policy.
Method Detail

createSolutions

protected void createSolutions()
Description copied from class: Scheduler
Creates the ants' trails (solutions).

Overrides:
createSolutions in class Scheduler

run

public void run()
Description copied from class: Scheduler
Evolves the colony 'till the stop condition is reached.

Overrides:
run in class Scheduler


Copyright © 2013. All Rights Reserved.