Re: [eclipse-clp-users] dump/3

From: Kish Shen <kisshen_at_cisco.com>
Date: Mon, 24 Nov 2008 17:17:58 +0000
Jorge Navas wrote:
>> Which ECLiPSe solver are you trying to port CLP(R) to? Any answer to 
>> your question is very likely to depend on which solver you are
>> using.
> 
> I thought Clp(Q,R) because it may be easier.
> 
>> As dump/3 is a predicate in CLP(R), it would be helpful if you give
>> some description of what dump/3 does. From what I can gather from a
>> quick search, dump/3 seem to be used to extract the problem
>> constraints. This may not be a critical part of your CLP(R)
>> application, as the extracting of the constraints may be for
>> information purpose only.
> 
> dump(Targets,NewVars,Ans).
> 
> Ans is the collection of current constraints projected with respect to
> Targets and given in terms of NewVars. For instance, 
> 
> ?- X > Y + Z, dump([X,Y,Z],[A,B,C],Ans).
> Ans = [ - A + B + C < 0]
> 
> And, as you mentioned dump/3 is usually used for information
> purposes. However, in my case it's very relevant for the application.
> 
> Thanks!
> 
> Jorge
Hi Jorge,

There is a file dump.pl in Clp(Q,R) (in <Clpqr>/clpr/eclipse for the 
Clp(R) version) that produces the solver state. This may do what you want.

Clp(Q,R) is a quite an old contributed software to ECLiPSe, and it is 
written entirely in Prolog, and it is not particularly efficient. If the 
problem your application solves has linear constraints only, and in 
particular if it is an optimisation problem, you may want to consider 
using lib(eplex) instead, which interfaces to external Mathematical 
Programming solvers, and can be orders of magnitude faster than Clp(R) 
of Clp(Q,R). It is also more flexible (for example, you can repeatedly 
solve and modify a problem).

Cheers,

Kish




-- 
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
Received on Mon Nov 24 2008 - 17:18:46 CET

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET