XPRMMPVar
- java.lang.Object
-
- com.dashoptimization.XPRMValue
-
- com.dashoptimization.XPRMReference
-
- com.dashoptimization.XPRMMPVar
-
- All Implemented Interfaces:
- XPRMTyped
public class XPRMMPVar extends XPRMReference
A decision variable in Mosel. The functions provided here can be used to retrieve solution information related to the current problem after it has been solved.
-
-
Field Summary
-
Fields inherited from interface com.dashoptimization.XPRMTyped
GRP_DYN, GRP_GEN, MSK_FIN, MSK_GRP, MSK_STR, MSK_TYP, STR_ARRAY, STR_CONST, STR_LIST, STR_MEM, STR_NTYP, STR_PROB, STR_PROC, STR_REC, STR_REF, STR_SET, STR_UTYP, TYP_BOOL, TYP_EXTN, TYP_INT, TYP_LINCTR, TYP_MPVAR, TYP_NOT, TYP_REAL, TYP_STRING
-
-
Method Summary
Modifier and Type Method and Description XPRMMPVar
asMPVar()
A decision variable.int
getNumber()
Column number.double
getRedCost()
Reduced cost.double
getSolution()
Solution value.int
getTypeCode()
Type code.java.lang.String
getTypeName()
String representation of type.java.lang.String
toString()
Solution value as a string.-
Methods inherited from class com.dashoptimization.XPRMReference
getStructCode, getStructName
-
-
-
-
Method Detail
-
getSolution
public final double getSolution()
Solution value.- Returns:
- The solution value or 0 if no solution is available
-
getRedCost
public final double getRedCost()
Reduced cost.- Returns:
- The reduced cost or 0 if no solution is available
-
getNumber
public final int getNumber()
Column number. This is the column representing the variable in the matrix - available only if the matrix has been generated.- Returns:
- The column number (≥0) or a negative value if no matrix is available or the variable does not belong to the problem.
-
asMPVar
public final XPRMMPVar asMPVar()
Description copied from class:XPRMValue
A decision variable. This function is defined if the actual object is a decision variable.
-
getTypeCode
public final int getTypeCode()
Description copied from interface:XPRMTyped
Type code. The code is one of theTYP_*
values.- Returns:
- Encoded type
-
getTypeName
public final java.lang.String getTypeName()
Description copied from interface:XPRMTyped
String representation of type.- Returns:
- Type name
-
toString
public final java.lang.String toString()
Solution value as a string.- Specified by:
-
toString
in classXPRMReference
- Returns:
- Text representation of the solution value
-
-
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.