Hi,
I am working on a problem where I automatically create a linear programming problem that I want Ciao to solve (via clpr or clpq). The problem is represented as a list of inequations that I translate to constraints at runtime.
Now posting a constraint as simple as "A .<. B + C" fails when created on-line, while the hard-coded variant works perfectly. I thus assume that clpr/clpq do not lack the capacity to solve it, it is just the way it is posted.
Here is an example: Giving the list of "constraints"
% [ leq(0, A), leq(A, 1), leq(A, B+C), flt(A), flt(B), flt(C) ] %
to the predicate
% post_constraints([], V) :- write('Solution:'), nl, write(V). post_constraints([ flt(E) | T], V) :- flt(E), post_constraints(T, V). post_constraints([ leq(L, R) | T], V) :- L .=<. R, post_constraints(T, V). %
results in failure.
Any ideas how to resolve this?
Thanks, Hannes Strass.
============================================================================== Message: Address: Action: help majordomo(a)clip.dia.fi.upm.es Info. on useful commands subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list <whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list ----------------------------------------------------------------------------- Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/ -----------------------------------------------------------------------------