Max values or vars

  • David Torres

    David Torres - 2012-08-16

    i've setted my IntVars, but i need Jacop to give the max values of them, in order to ahve the max value of determine function
    for example i got:
    Xa,Xb,Xc as intVars
    i set some constraints
    and i need this function to maximize

  • Radoslaw Szymanek


    I am sorry, but I do not understand your post.

    Please have a look at the examples provided with the solver. It should give you a good introduction how to use JaCoP and CP.

    You probably will need Sum constraint, and use search with optimization variable.


  • David Torres

    David Torres - 2012-08-16

    In short, i need to know how to use "cost"  var, in optimizations problems .

  • kris

    kris - 2012-08-17

    For details on optimization ans search, please refer to JaCoP Guide, section 5.1 (

    In short.

    "The minimization in JaCoP is achieved by defining variable for cost and using branch-and-bound (B&B) search, as specified below.

       IntVar cost;
       boolean result = label.labeling(store, select, cost);



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks