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

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Thu, 23 Aug 2012 00:26:36 +0200
On 20/08/2012 20:29, Kostas Oikonomou wrote:
> Hi,
>
> I am having a problem with getting annotations to work in a
> minizinc model.  My .mzn file has
>
> include "eclipse.mzn";
> ...
> ...
>
> solve
>         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]) :: timeout(60.0);
>
>
> And I run it using
>
>    mzn_run("loc.mzn", "loc.dzn", fzn_fd).
>
> But the timeout has no effect, Eclipse keeps on going.   I
> also tried the delta() annotation, that has no effect either.
>
> Am I doing something wrong?


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
Received on Wed Aug 22 2012 - 22:54:51 CEST

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