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

From: Joachim Schimpf <jschimpf_at_coninfer.com>
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.2.0 : Thu Aug 23 2012 - 06:18:06 CEST