Topic
  • 2 replies
  • Latest Post - ‏2013-01-07T02:13:11Z by SystemAdmin
SystemAdmin
SystemAdmin
1883 Posts

Pinned topic Using Ceil in objective function via Java interface

‏2013-01-06T16:01:57Z |
Hi All,

I want to transform my OPL code to Java. But I can not find the the equivalence of ceil function in java interface. I only find IloModeler.max, IloModeler.min, IloModeler.abs.

Can any one tell me, is this function support in Java interface? Otherwise I need to use some trick to transform the ceil function into constraints.

Thanks.
Updated on 2013-01-07T02:13:11Z at 2013-01-07T02:13:11Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Using Ceil in objective function via Java interface

    ‏2013-01-06T17:41:15Z  
    I think Math.ceil() is what you are looking for.
  • SystemAdmin
    SystemAdmin
    1883 Posts

    Re: Using Ceil in objective function via Java interface

    ‏2013-01-07T02:13:11Z  
    I think Math.ceil() is what you are looking for.
    Thanks for your reply. I am not very sure whether Math.ceil is compatible with ilog variable.

    I find this in ilog.cp.IloCP

    ilog.cp.IloCP cp = new IloCP();
    cp.ceil()