Re: Solver, MILP and Boolean constraints



On Mon, Oct 18, 2004 at 06:27:39PM +0200, Jean Bréfort wrote:
I join the sample file Massi sent me. Effectively, there are problems.
First, if we use a constraint relative to a range as E2:E15, 
global_range_contained fails because a->v_range.cell.b.sheet is NULL and
is different from a->v_range.cell.a.sheet. IMHO a better test would be:

      if ((a->v_range.cell.a.sheet != a->v_range.cell.b.sheet)
              && (a->v_range.cell.b.sheet != NULL))
              return FALSE;

Close.  I've adjusting the calling sequence to pass in a Sheet*
context and replaced it with.
        target = eval_sheet (a->v_range.cell.a.sheet, sheet);
        if (target != eval_sheet (a->v_range.cell.b.sheet, sheet))
                return FALSE;

and something similar for the (b) comparison.

Worse, when I replaced the E2:E15 Bool test by E2 Bool, E3 Bool,...,
gnumeric dies silently on attempting to solve the problem. I don't know
why. After the moduifications I made in the global_range_contained code,
I can't anymore reproduce the problem.

Anyway, the solver does not seem able to solve the problem (the message
is: "Unknown error").

There were several levels of 'unknown error' steming from the move
from lp_solve 4 -> 5 earlier this year.  Things should work in
1.3.93 (Release Candidate 2)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]