bug-glpk
[Top][All Lists]
Advanced

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

Re: [Bug-glpk] Assertion failed: str2num(buf, &num) == 0 Error detected


From: Noli Sicad
Subject: Re: [Bug-glpk] Assertion failed: str2num(buf, &num) == 0 Error detected in file ..\src\glpsql.c at line 900
Date: Mon, 15 Feb 2010 07:47:13 +0700

Hello Xypron,

Thanks for this tip on create and querying tables that works with
current version of SQL tables.

However, Andrew mentioned that NULL should mean missing data, like '.'
in the data
section, neither 0 nor error.

Here are examples of table with missing data '.' (aka default to 0)

#Ven_UpSliceFac[o,g,gg]
param Ven_UpSliceFac default 0 :=
  [2.5mm, *, *] (tr):  MMX:=
        MMX_B   0.50
        MMX_H   0.50
  [3.0mm, *, *] (tr):   MMX:=
        MMX_B   0.50
        MMX_H   0.50;

param Ven_D_Fac default 0 :=
  [2.5mm, *, *]: A B Cp C D MMX:=
        A 1 -1 . . . .
        B . 1 -1 . . .
        Cp . . 1 -1 . .
        C  . . . 1 -1 .
        D  . . . . 1 -1
  [3.0mm, *, *] : A B Cp C D MMX:=
        A 1 -1 . . . .
        B . 1 -1 . . .
        Cp . . 1 -1 . .
        C  . . . 1 -1 .
        D  . . . . 1 -1;

Most of the data are handcoded in the spreadsheet for Access, Excel,
xBase (dbf) and CSV table. And most of the time, the database and data
are created by other people not the modeler, as the case of the
Otago.mdb that I sent to you.

 I think if the glpsql.c and  glpmpl06.c would have proper patch then
the still nagging bug.

Error in xBase driver in str2num(buf, &num) == 0
http://www.mail-archive.com/address@hidden/msg00332.html

Andrew, do you have any suggestion how to patch this bug properly?

Thanks.

Noli


On 2/15/10, xypron <address@hidden> wrote:
>
> Hello Noli,
>
> when using SQL you can specify in the CREATE
> statement, if a column can be NULL. If you don't want a
> null you can use a create statement like:
>
> CREATE TABLE example(
> id INT NOT NULL AUTO_INCREMENT,
> col INT NOT NULL DEFAULT 13,
> lin INT NOT NULL DEFAULT -47,
> PRIMARY KEY(id));
>
> You can use a SELECT statement like the following
> to replace null be a value:
>
> SELECT val from example
> WHERE
>   not val = null
> UNION
> SELECT 0 val from example
> WHERE
>   col = null;
>
> Best regards
>
> Xypron
>
>
> Noli Sicad wrote:
>>
>> Hello Xypron,
>>
>> Would it be possible to put 0 for this NULL rather terminating the
>> mathprog, just to process this query or reading table.
>>
>>
>
> --
> View this message in context:
> http://old.nabble.com/Assertion-failed%3A-str2num%28buf%2C--num%29-%3D%3D-0-Error-detected-in-file-..%5Csrc%5Cglpsql.c-at-line-900-tp27559656p27585990.html
> Sent from the Gnu - GLPK - Bugs mailing list archive at Nabble.com.
>
>
>
> _______________________________________________
> Bug-glpk mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-glpk
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]