Re: [eclipse-clp-users] multi-loop and if then statement

From: liu.yu.senior.china <liu.yu.senior.china_at_...6...>
Date: Tue, 8 Sep 2009 11:47:46 -0500
Dear Mr. Winterer,

Thank you for your help. THe problem lies in that line. I changed the line to Fi$=Levels[J] => Z, to test how constraint implications worka. However, I get No. 

If I change the line to Fi==Levels[J] -> Vi is Voltage[J]; true  , I  can get all the solutions of Fs, but Vs is not instantiated in all the solutinos. The condition never succeeds!! It seems contradictory to build the constraints before labeling and let them take effect after labeling.

Besides, I don't understand why constraint implication (=>) will take effect after labeling. Is it the reasoning to choose it insteand of if else ?

Thank you very much.





发件人: Thorsten Winterer 
发送时间: 2009-09-08  07:39:39 
收件人: liu.yu.senior.china 
抄送: eclipse-clp-users 
主题: Re: multi-loop and if then statement 
I don't think that this line:
> Fi$=Levels[J] -> Vi is Voltage[J]; true
does what you intended it to do. The condition "Fi$=Levels[J]" will
evaluate to true if posting the constraint is successful. If it is, then
Vi is set to Voltage[J], and there will be no choicepoint.
I assume that you meant "if the constraint holds (after labeling Fi),
then Vi should be set to Voltage[J]". For this, you need to use =>/2,
and not Condition -> Then ; Else.
Received on Tue Sep 08 2009 - 16:48:05 CEST

This archive was generated by hypermail 2.3.0 : Sun Aug 18 2019 - 21:14:41 CEST