[eclipse-clp-users] Problem building tutorial/lp_cut_stock.ecl

From: Josef Chmel <josef.chmel_at_...227...>
Date: Mon, 22 Feb 2010 21:48:27 +0100
Hi,
I can't build the file /tutorial/lp_cut_stock.ecl from the examples of
the distribution.

I get the following message:

*** Warning: Singleton local variable Xj in do-loop (not used in loop
body)
illegal stream specification in get_stream_info(7, name, _117814)


As workaround it is possible to comment out line 59:
                % param(Xj)

and insert a dummy usage for loop variable J after line 41.
                foreach(J,VV),
                        
All together:

        ...
        (
            for(J, 1, K0),
            foreach(J,VV),                         % DUMMY
            foreach(Wj, Obj),
            foreach(Xj:Used, Vars),
            fromto(XijVars0, VIn, VOut, XijVars),
            param(Lengths, StockLength, Bounds)
        do
            cut_stock:integers([Xj,Wj]),
            % Xj variable bounds
            cut_stock:(Xj::0..1),
            % Wj variable bounds
            cut_stock:(Wj::0..StockLength),
            (
                foreach(Li, Lengths),
                foreach(Xij, Used),
                foreach(Li*Xij, Knapsack),
                foreach(XiVars, VIn),
                foreach([Xij|XiVars], VOut),
                foreach(Maxi, Bounds)
                %param(Xj)                        % COMMENT OUT
            do
                % Xij variable bounds
                cut_stock:integers(Xij),
                cut_stock:(Xij::0..Maxi)
            ),
            % cutting knapsack constraint
            cut_stock:(sum(Knapsack) + Wj =:= StockLength*Xj)
        ),
        ...

But this seems more to be a bug in eclipse-clp itself.

I use eclipse version 6.0#127 on Ubuntu Linux and Windows Vista.
The error is on both systems the same.

Best regards
Josef Chmel
Received on Mon Feb 22 2010 - 21:05:16 CET

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST