> 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. KostasReceived on Thu Aug 23 2012 - 16:10:16 CEST
This archive was generated by hypermail 2.2.0 : Fri Aug 24 2012 - 06:14:24 CEST