Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

how can i use mod function in opl script

  • 1.  how can i use mod function in opl script

    Posted 01/12/11 08:55 PM

    Originally posted by: victortkl


    Hi,
    in the reference, mod function can be used as
    8 mod 3 == 2
    

    but it may be failed in opl script main
    how can i use this funcion?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: how can i use mod function in opl script

    Posted 01/13/11 05:04 AM
    Hi

    execute
    {
     writeln(8 % 3); 
    }
    


    gives

    2

    Regards

    Alex
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: how can i use mod function in opl script

    Posted 01/13/11 06:20 AM

    Originally posted by: victortkl


    > AlexFleischer wrote:
    > Hi
    >
    >
    > execute
    > {
    >  writeln(8 % 3); 
    > }  
    >
    

    >
    > gives
    >
    > 2
    >
    > Regards
    >
    > Alex
    > AlexFleischer wrote:
    > Hi
    >
    >
    > execute
    > {
    >  writeln(8 % 3); 
    > }  
    >
    

    >
    > gives
    >
    > 2
    >
    > Regards
    >
    > Alex
    > AlexFleischer wrote:
    > Hi
    >
    >
    > execute
    > {
    >  writeln(8 % 3); 
    > }  
    >
    

    >
    > gives
    >
    > 2
    >
    > Regards
    >
    > Alex
    it works. thank you
    #DecisionOptimization
    #OPLusingCPLEXOptimizer