Re: Interraction between main programs and events

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Mon 25 Jul 2005 04:02:09 PM GMT
Message-ID: <42E50D01.2000104@icparc.ic.ac.uk>
ludovic picouays wrote:
> Hello everybody.
> 
> We want to develop a new global constraint with adjustment.
> 
> We use some events (suspend/4 and demon/1) on modification of domain
> of variable and we call a C++ program which gives us if there is some
> adjustments, no adjustement or no solution.
> 
> During the search (indomain),  we want that the main program fails if
> there is no solution. At the moment, only the predicate calls by
> events fails. But there is no repercussion on the main program.
> 
> Could you give us a solution to make interact the main program and the
> predicate calls by the event ?

I do not understand precisely what your problem is.

When you have a delayed goal (demon or not), and it it woken
(e.g. because of a domain modification) during your search,
and it detects failure, then the system will backtrack to the
most recent choice (e.g. indomain) in your search tree and
continue to search another part of the tree. It does not mean
that your whole program fails - this only happens when all
alternatives of the search tree are exhausted.
This is what constraints do - they cut off branches in the
search tree.

-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Mon Jul 25 17:03:03 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:38 PM GMT GMT