timetable.solver
Class Solver

java.lang.Object
  |
  +--timetable.solver.Solver

public class Solver
extends java.lang.Object

Řešič problému interaktivního rozvrhování.


Field Summary
(package private)  Config config
          konfigurace
 long generateTime
          doba generování možných umístění
 long maxScheduledActivities
          maximální počet naplánovaných aktivit, kterého se podařilo dosáhnout
 int nrIters
          počet iterací
(package private)  Problem problem
          Problém - rozvrhovací data
 long selectValueTime
          doba výběru umístění
 long selectVariableTime
          doba výběru aktivity
 long solveTime
          doba řešení problému
(package private)  Tabu tabu
          tabu-list - pro výběr umístění
(package private)  ValueSelectionInterface valueSelection
          heuristika výběru umístění
(package private)  VariableSelectionInterface variableSelection
          heuristika výběru nenaplánované aktivity
 
Constructor Summary
Solver(Config config, Problem problem)
          Konstruktor.
 
Method Summary
 Problem getProblem()
          Vrátí problém - data.
 void reset()
          Reset řešiče i problému - odebrání všech naplánovaných aktivit z rozvrhu.
 void setValueSelection(ValueSelectionInterface valueSelection)
          Nastavení heuristiky výběru umístění
 void setVariableSelection(VariableSelectionInterface variableSelection)
          Nastavení heuristiky výběru nenaplánované aktivity
 int schedule(Activity activity)
          Rozvrhne danou aktivitu.
 boolean schedule(Activity activity, int slot, Resource useResource)
          Rozvrhne danou aktivitu na dané místo (určeno pouze počátčením slotem a jedním zdrojem - takových míst může být více).
 void solve()
          Řešení problému.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

Config config
konfigurace

problem

Problem problem
Problém - rozvrhovací data

tabu

Tabu tabu
tabu-list - pro výběr umístění

variableSelection

VariableSelectionInterface variableSelection
heuristika výběru nenaplánované aktivity

valueSelection

ValueSelectionInterface valueSelection
heuristika výběru umístění

nrIters

public int nrIters
počet iterací

solveTime

public long solveTime
doba řešení problému

generateTime

public long generateTime
doba generování možných umístění

selectValueTime

public long selectValueTime
doba výběru umístění

selectVariableTime

public long selectVariableTime
doba výběru aktivity

maxScheduledActivities

public long maxScheduledActivities
maximální počet naplánovaných aktivit, kterého se podařilo dosáhnout
Constructor Detail

Solver

public Solver(Config config,
              Problem problem)
       throws TimetableException
Konstruktor.
Parameters:
config - konfigurace
problem - problém rozvrhu
Method Detail

getProblem

public Problem getProblem()
Vrátí problém - data.
Returns:
problém rozvrhu

reset

public void reset()
           throws TimetableException
Reset řešiče i problému - odebrání všech naplánovaných aktivit z rozvrhu.

setVariableSelection

public void setVariableSelection(VariableSelectionInterface variableSelection)
Nastavení heuristiky výběru nenaplánované aktivity
Parameters:
variableSelection - heuristika výběru nenaplánované aktivity

setValueSelection

public void setValueSelection(ValueSelectionInterface valueSelection)
Nastavení heuristiky výběru umístění
Parameters:
variableSelection - heuristika výběru umístění nenaplánované aktivity

solve

public void solve()
           throws TimetableException
Řešení problému.

schedule

public int schedule(Activity activity)
             throws TimetableException
Rozvrhne danou aktivitu.
Parameters:
activity - nenaplánovaná aktivita
Returns:
počáteční slot (-1 pokud se nepodařilo aktivitu naplánovat)

schedule

public boolean schedule(Activity activity,
                        int slot,
                        Resource useResource)
                 throws TimetableException
Rozvrhne danou aktivitu na dané místo (určeno pouze počátčením slotem a jedním zdrojem - takových míst může být více).
Parameters:
activity - nenaplánovaná aktivita
slot - počáteční slot
useResource - zdroj, který musí být použit (null, pokud nená zvolen)
Returns:
true, pokud se podařilo aktivitu naplánovat