Re: [eclipse-clp-users] annotation "timeout" in minizinc model, Eclipse 6.185

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Thu, 23 Aug 2012 15:12:53 +0200
On 23/08/2012 01:39, Kostas Oikonomou wrote:
> Hi Joachim,
>
> Thanks for the clarification.
>
>> Yes, your annotation is in the wrong place: you have to
>> annotate the 'solve', not the objective.  Try
>>
>> solve :: timeout(60.0)
>>            minimize sum(c in CO, m in MH) (dcm[c,m]*F[c,m]) + sum(m in MH, o in ONU)
>>            (dmo[m,o]*D[m,o]) ;
>>
>>
>> Regards,
>> Joachim
>
> However, when I do this, I get an error:
>
> [eclipse 3]: minizinc:mzn_run("loc.mzn", "loc.dzn", fzn_fd).
> calling an undefined procedure fzn_fd : float_fzn_to_solver(60.0, _83895) in module flatzinc
> Aborted in line 253
> Abort

Ah, sorry.  It worked for me because I tried with fzn_ic instead of fzn_fd.

You have found a bug here: fzn_fd does not accept float annotations.
I'll fix that.  You can fix your installed system by inserting the line
float_fzn_to_solver(X, F) :- F is float(X).
into the file <eclipsedir>/lib_public/fzn_fd.ecl


>
> Also, the purpose of my introducing the timeout is that I assume that Eclipse will print the
> last solution it has found before the timeout.  Is that assumption correct?

Yes, that's right.


-- Joachim
Received on Thu Aug 23 2012 - 13:13:05 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 16 2024 - 09:13:20 CEST