Package org.ojalgo.optimisation
Class Optimisation.Result
java.lang.Object
org.ojalgo.optimisation.Optimisation.Result
- All Implemented Interfaces:
Comparable<Optimisation.Result>
,Optimisation
,Access1D<BigDecimal>
,Structure1D
- Enclosing interface:
Optimisation
public static final class Optimisation.Result
extends Object
implements Optimisation, Access1D<BigDecimal>, Comparable<Optimisation.Result>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.ojalgo.structure.Access1D
Access1D.Aggregatable<N extends Comparable<N>>, Access1D.Collectable<N extends Comparable<N>,
R extends Mutate1D>, Access1D.ElementView<N extends Comparable<N>>, Access1D.SelectionView<N extends Comparable<N>>, Access1D.Sliceable<N extends Comparable<N>>, Access1D.Visitable<N extends Comparable<N>> Nested classes/interfaces inherited from interface org.ojalgo.optimisation.Optimisation
Optimisation.Constraint, Optimisation.ConstraintType, Optimisation.Integration<M extends Optimisation.Model,
S extends Optimisation.Solver>, Optimisation.Model, Optimisation.Objective, Optimisation.Options, Optimisation.ProblemStructure, Optimisation.Result, Optimisation.Sense, Optimisation.Solver, Optimisation.State Nested classes/interfaces inherited from interface org.ojalgo.structure.Structure1D
Structure1D.BasicMapper<T>, Structure1D.IndexMapper<T>, Structure1D.IntIndex, Structure1D.Logical<S extends Structure1D,
B extends Structure1D.Logical<S, B>>, Structure1D.LongIndex, Structure1D.LoopCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConstraintsMetaData
private Access1D
<?> private final Access1D
<?> private final Optimisation.State
private final double
-
Constructor Summary
ConstructorsConstructorDescriptionResult
(Optimisation.State state, double value, Access1D<?> solution) Result
(Optimisation.State state, Optimisation.Result result) Result
(Optimisation.State state, Access1D<?> solution) -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(Optimisation.Result reference) long
count()
The total number of elements in this structure.double
doubleValue
(int index) boolean
get
(long index) The dual variables or Lagrange multipliers, matched to their respective constraints (model entity and constraint type pairs).The dual variables or Lagrange multipliers associated with the problem.getSolution
(NumberContext precision) Will round the solution to the given precisiongetState()
double
getValue()
Objective Function Valueint
hashCode()
multipliers
(double... multipliers) (package private) Optimisation.Result
multipliers
(List<EntryPair.KeyedPrimitive<EntryPair<ModelEntity<?>, Optimisation.ConstraintType>>> matchedMultipliers) multipliers
(ConstraintsMetaData constraintsMap, Access1D<?> multipliers) private void
multipliers
(Optimisation.Result target) multipliers
(Access1D<?> multipliers) static Optimisation.Result
of
(double value, Optimisation.State state, double... solution) static Optimisation.Result
of
(Optimisation.State state, double... solution) static Optimisation.Result
Parse aString
, as produced by thetoString()
method, into a new instance.int
size()
The total number of elements in this structure.toString()
May potentially be a very longString
as it must contain all variable values.withSolution
(Access1D<?> solution) withSolutionLength
(int length) withState
(Optimisation.State state) withValue
(double value) static Optimisation.Result
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ojalgo.structure.Access1D
asCollectable1D, asKeyed1D, axpy, byteValue, byteValue, dot, doubleValue, elements, floatValue, floatValue, intValue, intValue, longValue, longValue, nonzeros, select, shortValue, shortValue, supplyTo, toRawCopy1D
-
Field Details
-
myConstraintsMap
-
myMatchedMultipliers
private List<EntryPair.KeyedPrimitive<EntryPair<ModelEntity<?>,Optimisation.ConstraintType>>> myMatchedMultipliers -
myMultipliers
-
mySolution
-
myState
-
myValue
private final double myValue
-
-
Constructor Details
-
Result
-
Result
-
Result
-
-
Method Details
-
of
-
of
-
parse
Parse aString
, as produced by thetoString()
method, into a new instance. -
wrap
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Optimisation.Result>
-
count
public long count()Description copied from interface:Structure1D
The total number of elements in this structure.You only need to implement this method if the structure can contain more than Integer.MAX_VALUE elements.
- Specified by:
count
in interfaceStructure1D
-
doubleValue
public double doubleValue(int index) - Specified by:
doubleValue
in interfaceAccess1D<BigDecimal>
-
equals
-
get
- Specified by:
get
in interfaceAccess1D<BigDecimal>
-
getMatchedMultipliers
public List<EntryPair.KeyedPrimitive<EntryPair<ModelEntity<?>,Optimisation.ConstraintType>>> getMatchedMultipliers()The dual variables or Lagrange multipliers, matched to their respective constraints (model entity and constraint type pairs). -
getMultipliers
The dual variables or Lagrange multipliers associated with the problem. -
getSolution
Will round the solution to the given precision -
getState
-
getValue
public double getValue()Objective Function Value -
hashCode
public int hashCode() -
multipliers
-
multipliers
-
multipliers
-
size
public int size()Description copied from interface:Structure1D
The total number of elements in this structure.- Specified by:
size
in interfaceStructure1D
-
toString
May potentially be a very longString
as it must contain all variable values. TheString
produced here is (must be) usable by theparse(String)
method. -
withNegatedValue
-
withSolution
-
withSolutionLength
-
withState
-
withValue
-
multipliers
-
multipliers
Optimisation.Result multipliers(List<EntryPair.KeyedPrimitive<EntryPair<ModelEntity<?>, Optimisation.ConstraintType>>> matchedMultipliers)
-