Max values or vars

Help
2012-08-16
2013-05-30
  • 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
    Xa+Xb+Xc=

     
  • Radoslaw Szymanek

    Hi,

    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.

    best,
    Radek

     
  • 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 (http://jacopguide.osolpro.com/guideJaCoP.html#x1-430001).

    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);
    "

    /Kris

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks