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; We have probably the same problem with b, I propose the following: if ((a->v_range.cell.a.sheet != b->v_range.cell.a.sheet) && (a->v_range.cell.a.sheet != b->v_range.cell.b.sheet) && (b->v_range.cell.b.sheet != NULL)) return FALSE; 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"). Le lundi 18 octobre 2004 à 16:02 +0200, Jean Bréfort a écrit :
It might be a bug. Can you join your file? Le lundi 18 octobre 2004 à 15:52 +0200, Massi A Milani a écrit :Thank you very much for your clarification. I am sorry that I was not too much clear on the issue. The reason I have sent the email to the list is exactly the following Cells in my problem (T2:T204) are in the "By changing cells" entry. Therefore, Gnumeric should not give me that message. Massi On Mon, 18 Oct 2004 15:44:02 +0200, Jean Bréfort <jean brefort normalesup org> wrote:Le samedi 16 octobre 2004 à 14:16 +0000, Massi a écrit :Hi guys, I am running a MILP problem with Gnumeric 1.2.13. The Solver of Gnumeric is able to solve it in less than 1 second, 5 time faster than Excel. However, introducing a Boolean constraint (i.e. modifiable cells can only assume a binary value, 0 or 1), I get the following message Constraint `T2:T204 Bool ' is for a cell that is not an input cell Since the Handbook of Gnumeric does not actually specify how to input a binary constraint, I included it as I usually do in Excel. I am just wondering whether I made a mistake or Boolean constraints do not work properly. I would really appreciated your help. Massi PS: I have been pretty happy to notice that Gnumeric does not have the 200-constraint limit as Excel does. Good job, guys!The cell for which you add a constraint must be an input cell of the problem. In other words, it must already be listed in the "By Changing Cells" entry._______________________________________________ gnumeric-list mailing list gnumeric-list gnome org http://mail.gnome.org/mailman/listinfo/gnumeric-list
Attachment:
example.xls
Description: MS-Excel spreadsheet