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

From: Kostas Oikonomou <ko_at_...308...>
Date: Thu, 23 Aug 2012 12:10:10 -0400
> 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

Very good, that takes care of the problem.

I have one more question: I'm trying the example of using a 
MiniZinc/FlatZinc model in Eclipse, found on the lib(flatzinc)
reference page.  So far, I have the following code:

my_fzn_run_file(ModelFile, Options) :-
         % initialize the solver state
         fzn_init(Options, State),
         % load the model and set up the constraints
         open(ModelFile, read, S), fzn_load_stream(S, FznState),
         % Get the objective
         fzn_obj_lookup(FznState, Obj),
         % Now suppose the mzn model has variables X, a 1-d 
array, and Y, a 2d-array.
         fzn_var_lookup(FznState, X, Xe), 
fzn_var_lookup(FznState, Y, Ye),
         % How do I use Xe, Ye, and Obj in bb_min()?
         % ????
         % output solution, if found
         fzn_output(State),
         % increments solutions count, and succeeds if last 
one reached
         fzn_last(State),
         !.

It would be very useful if such an example were added to the 
manual.

                                 Kostas
Received on Thu Aug 23 2012 - 16:10:16 CEST

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