Class OjAlgoSolver
java.lang.Object
com.darkcollective.relix.solver.ojalgo.OjAlgoSolver
- All Implemented Interfaces:
MathProgrammingSolver
The shipped
MathProgrammingSolver: ojAlgo's deterministic branch-and-bound.
Every ojAlgo type in the build is named in this one class. Instances hold no state and are therefore thread-safe; a model is built per solve.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionname()A short name for this solver, used in diagnostics.solve(LinearProgram program) Solves a program.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.darkcollective.relix.solver.MathProgrammingSolver
priority
-
Constructor Details
-
OjAlgoSolver
public OjAlgoSolver()
-
-
Method Details
-
name
Description copied from interface:MathProgrammingSolverA short name for this solver, used in diagnostics.- Specified by:
namein interfaceMathProgrammingSolver- Returns:
- the solver's name, for diagnostics
-
solve
Description copied from interface:MathProgrammingSolverSolves a program.Three outcomes, and a provider is expected to distinguish them rather than collapse the last two: an optimal assignment (
SolverResult.Solved), a program proved to have none (SolverResult.Infeasible), and a search that did not decide — failed, cut off, unbounded, malformed (SolverResult.Undetermined, carrying a short reason). Infeasibility is a normal answer the engine acts on; an undecided search is an error it reports, because a query cannot honestly say "no rows" about a question nobody answered. An exception means the provider itself broke.- Specified by:
solvein interfaceMathProgrammingSolver- Parameters:
program- the program to solve; must not be null- Returns:
- what the solver concluded; never
null
-