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 What to do? Is it a problem of my use of decision variables? How to find an optimal solution in a discrete CSP? Thanks, Ulrich ------------ :- lib(eplex_osi_clpcbc). :- eplex_instance(my_instance). generateSubcomponent(NbImplementation, Subcomponent) :- % the decision variables length(DVs, NbImplementation), my_instance: (DVs $:: 0..1), my_instance: integers(DVs), % the utilities length(Utilities, NbImplementation), (foreach(Utility, Utilities) do( % results in an random Integer in the range [1, 8] generateNoZeroRandom(8, Utility) ) ), my_instance: Utility $= Utilities * DVs, Subcomponent = [Utility, DVs, Utilities]. -------------- -- Ulrich Scholz Phone: +49-6221-533244 Email: ulrich.scholz at eml-d.villa-bosch.de -- European Media Laboratory GmbH Schloss-Wolfsbrunnenweg 33 69118 Heidelberg Amtsgericht Mannheim / HRB 335719 Managing Partner: Dr. h.c. Klaus Tschira, Scientific and Managing Director: Prof. Dr.-Ing. Andreas Reuter www.eml-d.villa-bosch.deReceived on Wed Sep 10 2008 - 07:31:48 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST