help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Assertion failed: l[k] != -DBL_MAX, Error detected in fi


From: Robbie Morrison
Subject: Re: [Help-glpk] Assertion failed: l[k] != -DBL_MAX, Error detected in file glpios02.c at line 312
Date: Wed, 29 Aug 2012 05:20:25 +1200
User-agent: SquirrelMail/1.4.22

Hi John

------------------------------------------------------------
To:           Robbie Morrison <address@hidden>, GLPK help
<address@hidden>
Subject:      Re: [Help-glpk] Assertion failed: l[k] != -DBL_MAX, Error
detected in file glpios02.c at line 312
Message-ID:  <address@hidden>
From:         John Kalman <address@hidden>
Date:         Tue, 28 Aug 2012 09:42:28 -0700 (PDT)
------------------------------------------------------------

> Hi Robbie
>
> thanks for the answer.
>
> I am actually solving a MIP (mixed integer program)
> with glpk,

MIP in GLPK terms, 0-1 integer program in terms
of your model, I take it.

> I checked all the inputs and constraints and
> they seem to be ok (the only constrain is of the form
> G*x<=h and all the control variables are binary), I do
> not have any explicit boundaries on the control
> variables (since all elements x_i of vector x can be
> only 0 or 1).

That sounds okay to me.

> I do not understand the meaning of the constant DBL_MAX
> and the meaning of the assertion l[k] != -DBL_MAX,

DBL_MAX (without the negation) is the largest double
value that your system will support.

  http://en.wikipedia.org/wiki/C_data_types

It is normally defined in: #include <cfloat>
On my 64-bit system it is 1.79769e+308

GLPK uses DBL_MAX to represent infinity (instead of
IEEE 754 inf, probably for reasons of portability).

'l' is the lower bound on the 'k'th variable.

The source code talks about implied bounds (it is
extremely well documented).

> perhaps I can just delete this assertion in the source
> code and recompile? What could go wrong?

There is a compiler switch to do this in C (I don't
know how it works with the python wrapper).  Place the
following before your GLPK header include:

#define NDEBUG

Why not first add some 'printf' statements to identify
'l' and 'k':

printf("debug output follows\n");
printf("k       : %d\n", k);
printf("l       : %f\n", l);
printf("DBL_MAX : %f\n", DBL_MAX);

Disabling the assert will probably result in a
catastrophic failure elsewhere.  But try it, its only a
protection thing!  :)

> regards,
> John

Can you export your problem as CPLEX or MPS and then
run that directly using GLPSOL.  That would help to
eliminate your model from the hunt.

[snip: remainder of thread]

good luck, Robbie
---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]





reply via email to

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