Class RealConstraint


  • public class RealConstraint
    extends Constraint
    A constraint on real variables, solved using IBEX.
    Since:
    18/07/12
    Author:
    Charles Prud'homme, Jean-Guillaume Fages
    • Constructor Detail

      • RealConstraint

        public RealConstraint​(String functions,
                              Variable... rvars)
        Make a new RealConstraint to model one or more continuous functions, separated with semi-colon ";"
        A function is a string declared using the following format:
        - the '{i}' tag defines a variable, where 'i' is an explicit index the array of variables vars,
        - one or more operators :'+,-,*,/,=,<,>,<=,>=,exp( ),ln( ),max( ),min( ),abs( ),cos( ), sin( ),...'
        A complete list is available in the documentation of IBEX.

             model.realIbexGenericConstraint("({0}*{1})+sin({0})=1.0;ln({0}+[-0.1,0.1])>=2.6", x,
         y).post();
         
        Parameters:
        functions - list of functions, separated by a semi-colon
        rvars - a list of real variables
    • Method Detail

      • reifyWith

        public void reifyWith​(BoolVar bool)
        Reifies the constraint with a boolean variable If the reified boolean variable already exists, an additional (equality) constraint is automatically posted.
        Overrides:
        reifyWith in class Constraint
        Parameters:
        bool - the variable to reify with