Re: [eclipse-clp-users] eclipse problem

From: Marco Gavanelli <marco.gavanelli_at_...17...>
Date: Fri, 13 Aug 2010 09:58:00 +0200
On 06/08/10 21:58, paniz alipour wrote:
> Hi all
> this is the code of university time tabling ,my question is this
> I have 2 hard constraint,I want to know whether such red line codes are true
> or not

The lines in color (I corrected some param mistake) are

          (for(I,1,NCourse),foreach(X,L), param(J,K,T) do
      sum(L1)#=<1	<-------
  labeling(Vars)		<-------

What do you mean with "whether such red line codes are true or not"?
You could write

		->	writeln("sum(L1)#=<1 is true")
		;	writeln("sum(L1)#=<1 is false")

and the same for the line with labeling, but it does not make much sense 
(specially for the constraint).

After correcting the mistakes in the loops (see the warnings ECLiPSe 
gives you), the solve(T) goal succeeds, which means that all the 
sub-goals it contains have succeeded.


Marco Gavanelli, Ph.D. in Computer Science
Dept of Engineering
University of Ferrara
Tel/Fax  +39-0532-97-4833
Received on Fri Aug 13 2010 - 07:58:09 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST