Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  What is the "IloLengthOf"?

    Posted 08/18/17 05:36 AM

    Originally posted by: Laser.Cho


    ======================================================================

    inline IloIntExprArg IloLengthOf(const IloIntervalVar a, IloInt absVal =0){
      IloAssert(a.getImpl(), "IloIntervalVar: empty handle.");
      return a._makeLengthExpr(a.getEnv(),absVal);
    }

    ======================================================================

    this is one of the given function from concert, in the ilosmodel.h.

    and it is used like this

    -===========================

    ilointervalvar movingVar;

    _model.add(TimeVar >= IloPresenceOf(_env, movingVar) * IloLengthOf(movingVar));

    ======================================

     

    what is the function of "IloLengthOf" or "_makeLengthExpr" ?

     

    As I understand(it can be incorrect)

    the example what i mentioned is meaning 

    " If movingvar is exist, then the length of movingvar is smaller than timevar. "

    so, "ilolengthof" means doing return value length of intervalvar. <- Am I right?

     

     

     


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: What is the "IloLengthOf"?

    Posted 08/21/17 03:33 AM

    Originally posted by: PhilippeLaborie


    Indeed. But may I suggest that you look at the documentation rather than in the header files, things would be clearer this way.

    Here is what the documentaion of IloLengthOf says (see https://www.ibm.com/support/knowledgecenter/SSSA5P_12.7.1/ilog.odms.cpo.help/refcppcpoptimizer/html/functions/IloLengthOf.html):

     

    IloLengthOf
    public IloIntExprArg IloLengthOf(const IloIntervalVar a, IloInt absVal=0)
    Definition file: ilconcert/ilosmodel.h
    Returns an expression representing the length of the interval variable.
    This function returns an integer expression that represents the length of interval variable a whenever the interval variable is present. When the interval variable is absent, it returns the constant integer value absVal (by default: 0).
    For more information on expressions on interval variables, see the concept Expressions over Interval Variables.

     


    #CPOptimizer
    #DecisionOptimization