|
Cream version 1.4 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjp.ac.kobe_u.cs.cream.Solver
jp.ac.kobe_u.cs.cream.DefaultSolver
public class DefaultSolver
A branch-and-bound solver.
Solver
Field Summary |
---|
Fields inherited from class jp.ac.kobe_u.cs.cream.Solver |
---|
BETTER, DEFAULT, MAXIMIZE, MINIMIZE, NONE |
Constructor Summary | |
---|---|
DefaultSolver(Network network)
Constructs a branch-and-bound solver for the given network. |
|
DefaultSolver(Network network,
int options)
Constructs a branch-and-bound solver for the given network and options. |
|
DefaultSolver(Network network,
int options,
String name)
Constructs a branch-and-bound solver for the given network, options, and name. |
|
DefaultSolver(Network network,
String name)
Constructs a branch-and-bound solver for the given network and name. |
Method Summary | |
---|---|
int |
getChoice()
Returns the option for choosing variable value. |
Trail |
getTrail()
Returns the trail stack. |
void |
run()
The body of the solver. |
boolean |
satisfy()
Performs the consistency algorithm until no variables are changed. |
Variable |
selectVariable()
Selects a decision variable. |
void |
setChoice(int choice)
Sets the option for choosing variable value. |
Methods inherited from class jp.ac.kobe_u.cs.cream.Solver |
---|
clearBest, findAll, findAll, findBest, findBest, findFirst, findFirst, getBestSolution, getBestValue, getCount, getElapsedTime, getID, getMonitor, getOption, getSolution, isAborted, join, resetIDCounter, resume, setMonitor, start, start, start, start, stop, toString, waitNext, waitNext |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DefaultSolver(Network network)
network
- the constraint networkpublic DefaultSolver(Network network, int options)
network
- the constraint networkoptions
- the options for search choicepublic DefaultSolver(Network network, String name)
network
- the constraint networkname
- the name of the solverpublic DefaultSolver(Network network, int options, String name)
network
- the constraint networkoptions
- the options for search choice, or DEFAULT for default search
choicename
- the name of the solver, or null for a default nameMethod Detail |
---|
public int getChoice()
public void setChoice(int choice)
choice
- the choice to setpublic Trail getTrail()
public boolean satisfy()
public Variable selectVariable()
public void run()
Solver
Solver.start()
methods.
run
in interface Runnable
run
in class Solver
|
Cream version 1.4 Core API Specification |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |