Top Description Fields Constructors Methods
org.apache.commons.math3.optim.linear

public Class SolutionCallback

extends Object
implements OptimizationData
Class Inheritance
All Implemented Interfaces
org.apache.commons.math3.optim.OptimizationData
Imports
org.apache.commons.math3.optim.OptimizationData, .PointValuePair

A callback object that can be provided to a linear optimizer to keep track of the best solution found.
Since
3.3

Field Summary

Modifier and TypeField and Description
private SimplexTableau
tableau

The SimplexTableau used by the SimplexSolver.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public PointValuePair

Returns:

the best solution found so far by the optimizer, or null if no feasible solution could be found
getSolution
()

Retrieve the best solution found so far.

public boolean

Returns:

true if the solution is optimal, false otherwise
isSolutionOptimal
()

Returns if the found solution is optimal.

pack-priv void
setTableau(final SimplexTableau
the simplex tableau containing a feasible solution
tableau
)

Set the simplex tableau used during the optimization once a feasible solution has been found.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

tableauback to summary
private SimplexTableau tableau

The SimplexTableau used by the SimplexSolver.

Constructor Detail

SolutionCallbackback to summary
public SolutionCallback()

Method Detail

getSolutionback to summary
public PointValuePair getSolution()

Retrieve the best solution found so far.

Note

the returned solution may not be optimal, e.g. in case the optimizer did reach the iteration limits.

Returns:PointValuePair

the best solution found so far by the optimizer, or null if no feasible solution could be found

isSolutionOptimalback to summary
public boolean isSolutionOptimal()

Returns if the found solution is optimal.

Returns:boolean

true if the solution is optimal, false otherwise

setTableauback to summary
pack-priv void setTableau(final SimplexTableau tableau)

Set the simplex tableau used during the optimization once a feasible solution has been found.

Parameters
tableau:SimplexTableau

the simplex tableau containing a feasible solution