Inequality
- java.lang.Object
-  
  - com.dashoptimization.objects.Inequality
 
-  
   - All Implemented Interfaces:
- 
     Index,java.lang.Comparable<Inequality>
 
 public final class Inequality extends java.lang.Object implements Index, java.lang.Comparable<Inequality> A reference to an equation, inequality, or ranged row.- Since:
- 43.00
 
-  
    
   -  
         Nested Class SummaryModifier and Type Class Description static classInequality.DefinitionClass representing a<=,>=,==, or ranged constraint.
 -  
         Method SummaryModifier and Type Method Description InequalitychgCoef(Variable v, double newCoef)Change the coefficient for a variable in this row.InequalitychgCoefs(Variable[] v, double[] newCoef)Change the coefficients for multiple variables in this row.intcompareTo(Inequality other)booleanequals(java.lang.Object other)doublegetDual()Get the current dual value value for this row.intgetIndex()Get the index that this object has in the underlying model.intgetIndexForProb(XpressProblem prob)Get the index stored in this object but raise an exception if the problem that created this object is notprob.ExpressiongetLhs()Get the left-hand side of this inequality.java.lang.StringgetName()Get the name of this object.XpressProblemgetProblem()Get the problem to which this element belongs.doublegetRhs()Get the right-hand side for this row.doublegetRhsRange()Get the right-hand side range for this row.doublegetSlack()Get the current slack value for this row.RowTypegetType()Get the type for this row.doublegetValue(double[] data)Get the value of this row from an array.inthashCode()InequalitysetName(java.lang.String newName)Set the name of this inequality.InequalitysetRhs(double newRhs)Set the right-hand side for this row.InequalitysetRhsRange(double newRange)Set the right-hand side range for this row.InequalitysetType(RowType newType)Set the type for this row.voidupdateIndex(int delta)
 
-  
         
-  
    
   -  
         Method Detail-  getIndexpublic int getIndex() Get the index that this object has in the underlying model. Attention: this is a very advanced function. Use it only if you know exactly what you are doing.Used in these examples: - GlobalObjectiveParametrics
- GlobalRHSParametrics
 Used in these examples: - GlobalObjectiveParametrics
- GlobalRHSParametrics
 
 -  updateIndexpublic void updateIndex(int delta) - Specified by:
- 
          updateIndexin interfaceIndex
- Since:
- 43.00
 
 -  getIndexForProbpublic int getIndexForProb(XpressProblem prob) Get the index stored in this object but raise an exception if the problem that created this object is notprob.- Specified by:
- 
          getIndexForProbin interfaceIndex
- Parameters:
- 
          prob- The problem for which the index is queried. If this object does not belong toprobthen an execption is raised.
- Returns:
- 
          The low-level index for this object in 
          prob.
- Since:
- 43.00
 
 -  getProblempublic XpressProblem getProblem() Get the problem to which this element belongs.- Specified by:
- 
          getProblemin interfaceIndex
- Returns:
- 
          The problem to which this element belongs. This will be 
          nullif the element was deleted.
- Since:
- 43.00
 
 -  equalspublic final boolean equals(java.lang.Object other) Used in these examples: - FixBV
- Knapsack
- MostViolated
- SaveSol
- Tableau
 - Overrides:
- 
          equalsin classjava.lang.Object
- Since:
- 43.00
 
 -  compareTopublic final int compareTo(Inequality other) - Specified by:
- 
          compareToin interfacejava.lang.Comparable<Inequality>
- Since:
- 43.00
 
 -  hashCodepublic final int hashCode() - Overrides:
- 
          hashCodein classjava.lang.Object
 
 -  getRhspublic double getRhs() Get the right-hand side for this row. Queries thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs and returns the right-hand side from that instance.- Since:
- 43.00
 
 -  getRhsRangepublic double getRhsRange() Get the right-hand side range for this row. Queries thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs and returns the right-hand side range from that instance.- Since:
- 43.00
 
 -  getNamepublic java.lang.String getName() Get the name of this object. Queries the problem instance that own this objects and returns the name from that instance.
 -  getTypepublic RowType getType() Get the type for this row. Queries thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs and returns the name obtained from that instance.- Since:
- 43.00
 
 -  setRhspublic Inequality setRhs(double newRhs) Set the right-hand side for this row. Set the right-hand side in thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs.- Parameters:
- 
          newRhs- New rhs.
- Returns:
- This row
- Since:
- 43.00
 
 -  setRhsRangepublic Inequality setRhsRange(double newRange) Set the right-hand side range for this row. Sets the right-hand side range value in thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs.- Parameters:
- 
          newRange- The new range value for this row.
- Returns:
- This row.
- Since:
- 43.00
 
 -  setTypepublic Inequality setType(RowType newType) Set the type for this row. Set the type in thecom.dashoptimization.objects.XpressProbleminstance to which this row belongs.- Parameters:
- 
          newType- New type.
- Returns:
- This row
- Since:
- 43.00
 
 -  setNamepublic Inequality setName(java.lang.String newName) Set the name of this inequality. Sets the name of this inequality in the problem instance that owns the object.- Parameters:
- 
          newName- The name to be set.
- Returns:
- Always returns this instance.
- Since:
- 43.00
 
 -  getValuepublic double getValue(double[] data) Get the value of this row from an array. The function assumes thatdatais an array that stores a value for each row in the underlying problem and returns the value from this array that corresponds to this row.dataarrays can be obtained for example fromprob.getMipSolSlack(),prob.getLpSolSlack(),prob.getLpSolDual().Used in these examples: - AddMipSol
- FixBV
- GlobalObjectiveParametrics
- GlobalRHSParametrics
- GoalProg
- Knapsack
- LoadLP
- MipSolEnum
- MipSolPool
- MostViolated
- SaveSol
- TSP
- Tableau
- Trimloss
 - Since:
- 43.00
 
 -  getSlackpublic double getSlack() Get the current slack value for this row.Note: This functions uses XPRSprob.getSlacks(IntHolder, double[], int, int)under the hood. This is only valid to call if the `com.dashoptimization.objects.XpressProblem` instance owning this row is currently not under optimization.Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using XPRSprob.getSlacks()to get the values for all rows and then usegetValue(double[])to extract the value for a particular row. This strategy is also valid from callbacks.- Returns:
- Slack for this row.
- Since:
- 43.00
 
 -  getDualpublic double getDual() Get the current dual value value for this row.Note: This functions uses XPRSprob.getDuals(IntHolder, double[], int, int)under the hood. This is only valid to call if the `com.dashoptimization.objects.XpressProblem` instance owning this row is currently not under optimization.Note: Calling this function for multiple rows is not efficient. If you need to get values for multiple rows then consider using XPRSprob.getDuals()to get the values for all rows and then usegetValue(double[])to extract the value for a particular row. This strategy is also valid from callbacks.- Returns:
- Dual value for this row.
- Since:
- 43.00
 
 -  chgCoefpublic Inequality chgCoef(Variable v, double newCoef) Change the coefficient for a variable in this row.- Parameters:
- 
          v- Variable for which to change the coefficient.
- 
          newCoef- New coefficient.
- Returns:
- Always returns this instance.
- Since:
- 43.00
 
 -  chgCoefspublic Inequality chgCoefs(Variable[] v, double[] newCoef) Change the coefficients for multiple variables in this row.- Parameters:
- 
          v- Variables for which to change the coefficient.
- 
          newCoef- New coefficients.
- Returns:
- Always returns this instance.
- Since:
- 43.00
 
 -  getLhspublic Expression getLhs() Get the left-hand side of this inequality.- Returns:
- The left-hand side of this inequality.
- Since:
- 43.00
 
 
-  
 
-  
         
© 2001-2024 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.
 
