Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.

 View Only
Expand all | Collapse all

bin packing problem

  • 1.  bin packing problem

    Posted Mon June 01, 2015 08:52 AM

    Originally posted by: beautylo1


    Hello!

    I have just started to work with CPLEX and have some problems.

    I need to solve a kind of bin packing problem.

    There is a constrain, that every bin has a capacity, and in case its capacity is over I need to take another  bin.

     In program language it would be something like this: t- index number of a bin, capacity - max capacity of the bin, c[i]-cargo size, capacity[t]-fulness of the bin

    t=1 // the first bin

    capacity[t]=0 //fulness of the bin is 0 in the beginning

    if capacity[t]+c[i]<=capacity then capacity[t]:=capacity[t]+c[i]

    else t=t+1 //capacity[2]=0

    it means that every time when we take another bin it is empty and we can start to fil it again.

    My question is, does it possible to program this in CPLEX and if yes, then how?

    Please, help me))


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: bin packing problem

    Posted Mon June 01, 2015 03:10 PM

    Hi

    with constraint programming within CPLEX have you had a look at

    Packing constraint

    The packing constraint is a specialized constraint which maintains the load of a group of containers or bins, given a group of weighted items and an assignment of items to containers.

    An example is available at

    CPLEX_Studio1261\opl\examples\opl\steelmill

     

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer