Hi All, I've recently spent a lot of time to understand why my solver failed to instatniate the cost function during minimization, and finally I got to the bottom of the problem which I've broken down to a simple example ( see code below ). Can somebody please explain why this is happening ? I think that this may be a bug in the eclipse engine. I am using Eclipse 6.0 #90 Best regards Luke %------------CODE EXAMPLE BEGINNING------------% :-module(main). :- lib(ic). %this does tot work as I assume it should test1:- ic:(C =:= B * 2), B = 3, (9<3->true;true), %after the execution of the above lines C should be instatntiated to 6 but it is NOT! the constraint does not wake after the instatntiation of B to 3, can somebody explain why ? this seems to be the fault of the arithmetic test after the unification writeln(ic:(C =:= B * 2)). %if I comment out the arithmetic test everything is ok , C is 6 at the end test2:- ic:(C =:= B * 2), B = 3, %(9<3->true;true), writeln(ic:(C =:= B * 2)). %or if I use a constraint to instantiate B instead of unification , C is 6 at the end test3:- ic:(C =:= B * 2), B #= 3, (9<3->true;true), writeln(ic:(C =:= B * 2)). %------------CODE EXAMPLE END------------%Received on Sun May 09 2010 - 13:20:19 CEST
This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 02:31:58 CET