[eclipse-clp-users] Copying domain and delayed goals

From: Sergii Dymchenko <kit1980_at_...6...>
Date: Tue, 23 Apr 2013 14:38:39 -0700
Hello,

Is it possible to copy domain and delayed goals of some variables to
another variables?

I tried (after lib(ic).):

> A :: 1..3, B :: 1..3, A #\= B, copy_term([A, B], [AN, BN]).
A = A{1 .. 3}
B = B{1 .. 3}
AN = AN{1 .. 3}
BN = BN{1 .. 3}

Delayed goals:
    -(B{1 .. 3}) + A{1 .. 3} #\= 0
Yes (0.00s cpu)

But I'd also want to have delayed goal -(BN{1 .. 3}) + AN{1 .. 3} #\= 0

'A :: 1..3, B :: 1..3, A #\= B, get_domain(A, DA), get_domain(B, DB),
AN :: DA, BN :: DB.' gives the same result as the previous command.

If it's not possible then I'd appreciate any suggestions how I should
implement the following scenario:
- Large number of constraints, that takes some time to propagate,
possibly leaving delayed goals.
- Many small independed 'queries', each query is an additional small
number of constraints.
- Do propagation for the first (large) set of constraints once
- For every query add additional constraints and label variables.
Obviously for every new query there should be a 'fresh copy' of the
large set of constraints - propagated, but not labeled.

Sergii.
Received on Tue Apr 23 2013 - 21:38:47 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST