Topic
1 reply Latest Post - ‏2013-04-03T13:55:02Z by ol
MichaelD.Moffitt
MichaelD.Moffitt
1 Post
ACCEPTED ANSWER

Pinned topic bin packing with CP Optimizer?

‏2013-04-03T07:52:36Z |
Hello,

I would like to create a bin packing solver using CP Optimizer. This was apparently possible with a predecessor called ILOG Solver:

http://www.cs.cornell.edu/w8/iisi/ilog/cp11/usrsolver/binpacking11.html

I copied this program and was almost able to compile it, with a few errors here and there. After massaging the code a bit, this is the only line that doesn't seem to "port" into the CP Optimizer:

model.add(_capacity == Capacity(_type));

It complains:

binpacking.cpp:31: error: no match for call to â(IloIntArray) (IloIntVar&)â

Is there something simple I can do to resurrect this example? Many thanks!
Updated on 2013-04-03T13:55:02Z at 2013-04-03T13:55:02Z by ol
  • ol
    ol
    56 Posts
    ACCEPTED ANSWER

    Re: bin packing with CP Optimizer?

    ‏2013-04-03T13:55:02Z  in response to MichaelD.Moffitt
    Hello,
    Capacity is an array, you should use:
    
    Capacity[_type]
    


    Regards,
    Olivier