[eclipse-clp-users] Column generation with colgen

From: Sergii Dymchenko <kit1980_at_gmail.com>
Date: Mon, 8 Jul 2013 16:50:53 -0700
Hi,

I can't find any simple examples how to use colgen library.

There is an example in "ECLiPSE: A Tutorial introduction", but it's more
than 2 pages of code and not easy to understand.

I've found a very short and easy to understand cutting stock example in
slides from Mark Wallace "Hybrid algorithms, local search, and Eclipse"
(First International Summer School on Constraint Programming, 2005,
http://www.math.unipd.it/~frossi/cp-school/):

:- lib(ic), lib(colgen).

solve(Cost) :-
    Vars = [Threes,Fives,Nines], Vars #:: 0..10,
    3*Threes+5*Fives+9*Nines #= Used,  Used #=< 17,
    Waste #= 17-Used,
    colgen: (sum(Threes) >= 25),
    colgen: (sum(Fives) >= 20),
    colgen: (sum(Nines) >= 15),
    minimize(my_solve(C,Vars), sum(Waste), Cost).

my_solve(C,Vars) :-
    labeling(Vars),
    colgen: sol(C,Vars).

The problem is that ECLiPSe and colgen library have changed so much from
2005, and I have no idea how to modify the example to work with recent
ECLiPSe version (probably, changing 'sum' to identified_constraint with
implicit_sum is needed, plus other things).

Maybe someone with more colgen knowledge can help me to modify the example
to work with recent ECLiPSE?

Sergii.
Received on Mon Jul 08 2013 - 23:51:02 CEST

This archive was generated by hypermail 2.2.0 : Wed Jul 10 2013 - 06:14:39 CEST