java.lang.Object
org.ojalgo.optimisation.convex.ConvexData<N>
- All Implemented Interfaces:
ExpressionsBasedModel.EntityMap,Optimisation,Optimisation.ProblemStructure
public final class ConvexData<N extends Comparable<N>>
extends Object
implements ExpressionsBasedModel.EntityMap
-
Nested Class Summary
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 -
Field Summary
Fields inherited from interface org.ojalgo.optimisation.Optimisation.ProblemStructure
DEBUG -
Method Summary
Modifier and TypeMethodDescriptionintNot included inOptimisation.ProblemStructure.countConstraints()(because they are not simple linear equality or inequality constraints),intintintintThe number of variables, in the solver, that directly correspond to a model variable.intThe number of slack variables.intgetAE()Equality constraints body: [AE][X] == [BE]getBE()Equality constraints RHS: [AE][X] == [BE]doublegetBE(int row) getBI()Inequality constraints RHS: [AI][X] invalid input: '<'= [BI]doublegetBI(int row) getConstraint(int idc) doubledoublegetSlack(int ids) Returns which model entity, and constraint type, that corresponds to the slack variable at the supplied index.intindexOf(int idm) Converts from a solver specific variable index to the corresponding index of the variable in the model.booleanisNegated(int idm) Is this solver variable negated relative to the corresponding model variable?
-
Method Details
-
countAdditionalConstraints
public int countAdditionalConstraints()Description copied from interface:Optimisation.ProblemStructureNot included inOptimisation.ProblemStructure.countConstraints()(because they are not simple linear equality or inequality constraints),- Specified by:
countAdditionalConstraintsin interfaceOptimisation.ProblemStructure
-
countConstraints
public int countConstraints()- Specified by:
countConstraintsin interfaceOptimisation.ProblemStructure
-
countEqualityConstraints
public int countEqualityConstraints()- Specified by:
countEqualityConstraintsin interfaceOptimisation.ProblemStructure
-
countInequalityConstraints
public int countInequalityConstraints()- Specified by:
countInequalityConstraintsin interfaceOptimisation.ProblemStructure
-
countModelVariables
public int countModelVariables()Description copied from interface:ExpressionsBasedModel.EntityMapThe number of variables, in the solver, that directly correspond to a model variable. (Not slack or artificial variables.)This defines the range of the indices that can be used with the
ExpressionsBasedModel.EntityMap.indexOf(int)andExpressionsBasedModel.EntityMap.isNegated(int)methods.- Specified by:
countModelVariablesin interfaceExpressionsBasedModel.EntityMap
-
countSlackVariables
public int countSlackVariables()Description copied from interface:ExpressionsBasedModel.EntityMapThe number of slack variables.This defines the range of the indices that can be used with the
ExpressionsBasedModel.EntityMap.getSlack(int)method.- Specified by:
countSlackVariablesin interfaceExpressionsBasedModel.EntityMap
-
countVariables
public int countVariables()- Specified by:
countVariablesin interfaceOptimisation.ProblemStructure
-
getAE
Equality constraints body: [AE][X] == [BE] -
getBE
Equality constraints RHS: [AE][X] == [BE] -
getBE
public double getBE(int row) -
getBI
Inequality constraints RHS: [AI][X] invalid input: '<'= [BI] -
getBI
public double getBI(int row) -
getConstraint
- Specified by:
getConstraintin interfaceExpressionsBasedModel.EntityMap
-
getDensityAE
public double getDensityAE() -
getDensityAI
public double getDensityAI() -
getObjective
-
getRowsAE
-
getRowsAI
-
getSlack
Description copied from interface:ExpressionsBasedModel.EntityMapReturns which model entity, and constraint type, that corresponds to the slack variable at the supplied index.- Specified by:
getSlackin interfaceExpressionsBasedModel.EntityMap- Parameters:
ids- Index of solver slack variable (If there are 3 slack variables this input argument should be in the range [0.2].)
-
indexOf
public int indexOf(int idm) Description copied from interface:ExpressionsBasedModel.EntityMapConverts from a solver specific variable index to the corresponding index of the variable in the model. Note that not all model variables are necessarily represented in the solver, and a model variable may result in multiple solver variables. Further, slack variables, artificial variables and such are typically not represented in the model.- Specified by:
indexOfin interfaceExpressionsBasedModel.EntityMap- Parameters:
idm- Index of solver variable- Returns:
- Index of model variable (negative if no map)
-
isNegated
public boolean isNegated(int idm) Description copied from interface:ExpressionsBasedModel.EntityMapIs this solver variable negated relative to the corresponding model variable?- Specified by:
isNegatedin interfaceExpressionsBasedModel.EntityMap- Parameters:
idm- Index of solver variable- Returns:
- true if this solver variable represents a negated model variable
-