Kish Shen wrote: > Ulrich Scholz wrote: >> Dear all, >> >> I try to write a CP problem with the eplex constraint solver. Below you >> find my code. >> >> I use decision variables to select one of a list of values. On the call >> >> :- generateSubcomponents(3, S). >> >> I get the following error: >> >> Eplex warning: Unable to linearise my_instance : Utility =:= [3, 1, 6] * [_184, _186, _188] >> type error in eplex : (my_instance : Utility =:= [3, 1, 6] * [_184, _186, _188]) >> Abort >> ... >> >> my_instance: Utility $= Utilities * DVs, >> >> Subcomponent = [Utility, DVs, Utilities]. >> -------------- >> > Hi, > > You are not using the correct syntax -- you cannot simply use lists in > expression. Actually, the List*List syntax is legal in lib(eplex) and lib(ic). The problem is the relative precedence of the : and the $= operator. The : binds stronger than the $=, so you have to add parentheses like my_instance:(Utility $= Utilities * DVs) Cheers, -- JoachimReceived on Wed Sep 10 2008 - 16:28:26 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST