Re: [eclipse-clp-users] simple eplex question

From: Kostas Oikonomou <ko_at_...308...>
Date: Fri, 07 Sep 2012 09:30:58 -0400
Yes, thanks.  I was confused by the fact that the "is" 
operator converts subarrays to lists automatically.
But this doesn't happen in other situations.

                         Kostas

On 09/ 6/12 05:54 PM, Sergey Dymchenko wrote:
> Hello,
>
> I think that the problem is that dot product will not work for arrays,
> only for lists.
> Try "P $>= [](1,2)*[](3,4)" and you'll get the same error.
>
> Sergey.
>
> On Fri, Sep 7, 2012 at 12:03 AM, Kostas Oikonomou <ko@...308...> wrote:
>> By reading the Constraint Library manual  section 9.2.2, I
>> believe that the following
>> code should work
>>
>> :- lib(eplex).
>>
>> tst :-
>> eplex_solver_setup(min(P)),
>> A = []([](1,2,3), [](4,5,6)),
>> B = []([](6,7,8), [](9,10,11)),
>> P :: 0.0..1000.0,
>> %P $>= [1,2]*[3,4],           % works
>> P $>= A[1..2,3]*B[1..2,3], % produces run-time error
>> eplex_solve(_),
>> eplex_get(typed_solution,Val),
>> write("P = "), writeln(Val)
>> .
>>
>> but it doesn't.  I don't understand why.
>>
>>                               Kostas
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> ECLiPSe-CLP-Users mailing list
>> ECLiPSe-CLP-Users_at_lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
Received on Fri Sep 07 2012 - 13:31:10 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST