Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  for loop

    Posted 12/13/11 01:01 AM

    Originally posted by: UMQX_Olfat_ELMahi


    Hello

    i am new to OPL and i really need help what i am trying to do is making some calculation before start solving the problem and for that i need to use for loop.

    when i use it with no keywords it wors fine for Example:
    execute{
    for(var i=0; i<no ; i++)
    VO[i] = i / 20000 ;
    }

    but when i try to add some keyword like ceil or ftoi it gives me error "ceil" element does not Exist in OPL
    execute{
    for(var i=0; i<no ; i++)
    VO[i] = ceil(i / 20000) ;
    }
    can you help me.

    Thanks.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: for loop

    Posted 12/13/11 05:23 AM

    Originally posted by: SystemAdmin


    Does it work if you write Opl.ceil instead of ceil?
    In general, for questions regarding OPL you should turn to the OPL forum here http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2053.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: for loop

    Posted 12/13/11 10:42 AM

    Originally posted by: UMQX_Olfat_ELMahi


    Ya it did work thank you for the advice and for the link
    have a very nice day like the one you just give me.
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: for loop

    Posted 12/13/11 12:48 PM

    Originally posted by: UMQX_Olfat_ELMahi


    Type Opl.ftoi
    #CPLEXOptimizers
    #DecisionOptimization