Class KNumVar

  • Direct Known Subclasses:
    KFloatVar, KIntVar

    public class KNumVar
    extends java.lang.Object
    Superclass of decision variables
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  KNumVar.Type
      Variable types
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean swigCMemOwn  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        KNumVar()
      Default constructor
      protected KNumVar​(long cPtr, boolean cMemoryOwn)  
        KNumVar​(KNumVar toCopy)
      Copy constructor
        KNumVar​(KProblem problem)
      main constructor
        KNumVar​(KProblem problem, com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
      Constructor with KProblem and KNumVar_I
        KNumVar​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
      Constructor with KNumVar_I
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int _instanceof()
      Return the type of this variable


      boolean canBeInstantiatedTo​(double value)
      Return true if this variable can be instantiated to 'value'
      void delete()  
      protected void finalize()  
      KNumVar getCopyPtr()
      Return a copy of this object
      protected static long getCPtr​(KNumVar obj)  
      int getDegree()
      returns the number of constraints where this variable appears
      int getIndex()
      Return the index of the variable
      double getInf()
      returns lower bound of this variable
      com.artelys.kalis.SWIGTYPE_p_KNumVar_I getInternalObject()  
      boolean getIsInstantiated()
      returns true if the variable has been assigned a value, false otherwhise
      KProblem getKProblem()  
      java.lang.String getName()  
      com.artelys.kalis.SWIGTYPE_p_KNumVar_I getNumVar_I_ptr()  
      KProblem getProblem()
      returns the KProblem associated with this variable
      double getSup()
      returns upper bound of this variable
      double getTarget()
      get target value
      double getValue()
      returns current instantiation of the variable (when the variable is not instantiated the returned value is undefined)
      void instantiate​(double value)
      Instantiate the variable to value
      boolean isHidden()
      Return true iff this variable is hidden
      void print()  
      void print​(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
      Pretty printing
      void print​(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
      Pretty printing
      void printConstraints()
      Pretty print its constraints
      void printConstraints​(com.artelys.kalis.SWIGTYPE_p_void ctx, com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)  
      void setHidden​(boolean hidden)
      Hidden variable Y/N
      void setInf​(double value)
      set the lower bound to value
      void setName​(java.lang.String name)
      Set the name of the variable
      void setNumVar_I_ptr​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)  
      void setSup​(double value)
      set the upper bound to value
      void setTarget​(double value)
      set the target value
      void useShaving​(boolean use)
      activate shaving Y/N
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • swigCMemOwn

        protected transient boolean swigCMemOwn
    • Constructor Detail

      • KNumVar

        protected KNumVar​(long cPtr,
                          boolean cMemoryOwn)
      • KNumVar

        public KNumVar()
        Default constructor
      • KNumVar

        public KNumVar​(KProblem problem)
        main constructor
      • KNumVar

        public KNumVar​(KProblem problem,
                       com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
        Constructor with KProblem and KNumVar_I
      • KNumVar

        public KNumVar​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
        Constructor with KNumVar_I
      • KNumVar

        public KNumVar​(KNumVar toCopy)
        Copy constructor
    • Method Detail

      • getCPtr

        protected static long getCPtr​(KNumVar obj)
      • finalize

        protected void finalize()
        Overrides:
        finalize in class java.lang.Object
      • delete

        public void delete()
      • instantiate

        public void instantiate​(double value)
        Instantiate the variable to value
      • getProblem

        public KProblem getProblem()
        returns the KProblem associated with this variable
      • getKProblem

        public KProblem getKProblem()
      • getName

        public java.lang.String getName()
      • setName

        public void setName​(java.lang.String name)
        Set the name of the variable
      • getInf

        public double getInf()
        returns lower bound of this variable
      • getSup

        public double getSup()
        returns upper bound of this variable
      • getValue

        public double getValue()
        returns current instantiation of the variable (when the variable is not instantiated the returned value is undefined)
      • getIsInstantiated

        public boolean getIsInstantiated()
        returns true if the variable has been assigned a value, false otherwhise
      • getDegree

        public int getDegree()
        returns the number of constraints where this variable appears
      • getTarget

        public double getTarget()
        get target value
      • setInf

        public void setInf​(double value)
        set the lower bound to value
      • setSup

        public void setSup​(double value)
        set the upper bound to value
      • setTarget

        public void setTarget​(double value)
        set the target value
      • canBeInstantiatedTo

        public boolean canBeInstantiatedTo​(double value)
        Return true if this variable can be instantiated to 'value'
      • useShaving

        public void useShaving​(boolean use)
        activate shaving Y/N
      • setHidden

        public void setHidden​(boolean hidden)
        Hidden variable Y/N
      • isHidden

        public boolean isHidden()
        Return true iff this variable is hidden
      • getNumVar_I_ptr

        public com.artelys.kalis.SWIGTYPE_p_KNumVar_I getNumVar_I_ptr()
      • getInternalObject

        public com.artelys.kalis.SWIGTYPE_p_KNumVar_I getInternalObject()
      • setNumVar_I_ptr

        public void setNumVar_I_ptr​(com.artelys.kalis.SWIGTYPE_p_KNumVar_I numVar)
      • getCopyPtr

        public KNumVar getCopyPtr()
        Return a copy of this object
      • print

        public void print​(com.artelys.kalis.SWIGTYPE_p_std__ostream fout)
        Pretty printing
      • print

        public void print()
      • print

        public void print​(com.artelys.kalis.SWIGTYPE_p_void ctx,
                          com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
        Pretty printing
      • printConstraints

        public void printConstraints()
        Pretty print its constraints
      • printConstraints

        public void printConstraints​(com.artelys.kalis.SWIGTYPE_p_void ctx,
                                     com.artelys.kalis.SWIGTYPE_p_f_p_void_p_q_const__char__int pfp)
      • _instanceof

        public int _instanceof()
        Return the type of this variable


      • getIndex

        public int getIndex()
        Return the index of the variable