On Tue, Aug 05, 2003 at 01:04:42PM -0400, Xiaohua Kong wrote: > Hi Joachim, > > Thanks for you answer. > I am a new user in CLP. My target is to decide the range of a variable (say > Va in my small example), so that there exists solution for the CSP problem. > That's why the solution with the range of the variable is better than > discrete values (such as, by using labeling). Is there any way I can do to > find the range of a variable if the constraints are linear? Hi Xiaohua, If your constraints are linear, most likely you will be better off using the eplex solver (see the constraint library manual) rather than the ic one. The eplex solver interfaces to an external simplex-based linear constraint solver (XPRESS-MP is available with ECLiPSe, but you can also use CPLEX if you already have it). Such a solver can fairly efficiently find an optimal solution to any linear objective function you provide, so you can use it to find the minimum and maximum values of a variable. See in particular the section "Probing Using a Different Objective", which talks about the eplex_probe/2 predicate. If you really want to use the ic solver for some reason (e.g. you have some nonlinear constraints), then you can use the general branch_and_bound library (see the reference manual). This can also be used to optimise a function, but is likely to be much less efficient (its advantage is that it can optimise any function for any solver, given a suitable labelling procedure). Cheers, WarwickReceived on Tue Aug 05 19:48:18 2003
This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:25 PM GMT GMT