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

From: Thorsten Winterer <thorsten_winterer_at_...126...>
Date: Tue, 08 Sep 2009 14:39:51 +0200
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.

Regards,
Thorsten
Received on Tue Sep 08 2009 - 13:00:01 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST