Re: [eclipse-clp-users] handling floats in objective function using the Flatzinc library

From: Joachim Schimpf <jschimpf_at_...311...>
Date: Sat, 15 Sep 2012 22:01:14 +0200
On 12/09/2012 23:27, Martin Michalowski wrote:
 > Hi,
> We have been using ECLiPSe in some of our research as the backend solver for models defined
> using Minizinc.  We have come across an issue that maybe someone on the list could help clarify.
> We pass the flatzinc representation of our model to ECLiPSe where the objective function to be
> minimized or maximized contains a product expression with floats (specifically ones that are
> <1.0 and represent probabilities).  The solution returned is the same no matter if we are
> maximizing or minimizing the objective function.  If we change this expression to contain
> integers rather than floats (or floats > 1.0) we get the expected behavior from ECLiPSe
> (different answers based on either maximizing or minimizing the objective function).

Hi Martin,

I suppose you are using fzn_ic as the solver option.  This means that ECLiPSe's
library(ic) interval solver is used, together with library(branch_and_bound)
for the optimization aspect.  This requires some care when used with floating
point intervals: the branch-and-bound library by default tries to improve the
objective in steps of 1.0, which probably is too coarse in your case.
You should be able to change this using a solve-annotation like

solve ::delta(0.1) minimize ...;

These minizinc/flatzinc annotations are described here
and are translated into options for bb_min/3, documented here

> I would be happy to provide the models if requested.

The above is my guess from the information you have given.  If you send
me a sample model, I can have a closer look!

Received on Sat Sep 15 2012 - 20:01:25 CEST

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