SOS
- java.lang.Object
-  
  - com.dashoptimization.objects.SOS
 
-  
    
   -  
         Nested Class SummaryModifier and Type Class Description static classSOS.DefinitionA special ordered set constraint.
 -  
         Method SummaryModifier and Type Method Description intcompareTo(SOS other)booleanequals(java.lang.Object other)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.java.lang.StringgetName()Get the name of this object.XpressProblemgetProblem()Get the problem to which this element belongs.inthashCode()SOSsetName(java.lang.String newName)Set the name of this SOS.static SOS.Definitionsos(SetType type, Variable[] items, double[] weights, java.lang.String name)Create a special ordered set constraint.static SOS.Definitionsos1(Variable[] items, double[] weights, java.lang.String name)Create a special ordered set constraint of type 1.static SOS.Definitionsos2(Variable[] items, double[] weights, java.lang.String name)Create a special ordered set constraint of type 2.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(SOS other) - Specified by:
- 
          compareToin interfacejava.lang.Comparable<SOS>
- Since:
- 43.00
 
 -  hashCodepublic final int hashCode() - Overrides:
- 
          hashCodein classjava.lang.Object
 
 -  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.
 -  setNamepublic SOS setName(java.lang.String newName) Set the name of this SOS. Sets the name of this SOS in the problem instance that owns the object.- Parameters:
- 
          newName- The name to be set.
- Returns:
- This set
- Since:
- 43.00
 
 -  sospublic static SOS.Definition sos(SetType type, Variable[] items, double[] weights, java.lang.String name) Create a special ordered set constraint.- Parameters:
- 
          type- Type of constraint.
- 
          items- The elements in the constraint.
- 
          weights- Weights for the items in the constraint. May benull.
- 
          name- Name of constraint.
- Since:
- 43.00
 
 -  sos1public static SOS.Definition sos1(Variable[] items, double[] weights, java.lang.String name) Create a special ordered set constraint of type 1. Only one of the items in the constraint may be non-zero.- Parameters:
- 
          items- The elements in the constraint.
- 
          weights- Weights for the items in the constraint. May benull.
- 
          name- Name of constraint.
- Since:
- 43.00
 
 -  sos2public static SOS.Definition sos2(Variable[] items, double[] weights, java.lang.String name) Create a special ordered set constraint of type 2. At most two elements in the constraint may be non-zero. Additionally, non-zero elements must be adjacent. The ordering of elements is given byweights. Ifweightsisnullthen the elements are given the same order in which they appear initems.- Parameters:
- 
          items- The elements in the constraint.
- 
          weights- Weights for the items in the constraint. May benull.
- 
          name- Name of constraint.
- 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.
 
