[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Problem with absolute value
From: |
Reginald Beardsley |
Subject: |
Re: [Help-glpk] Problem with absolute value |
Date: |
Tue, 15 Jan 2013 06:02:33 -0800 (PST) |
Robbie et al,
There's a lot of software lying around that does almost what you need, but not
quite. I have a rule to not write code until I've run out of excuses for not
writing code. The only time I get in trouble is when I violate that rule.
Usually because I underestimate the complexity of the the task.
Job Bentley wrote quite eloquently about this in Programming Pearls.
In this instance I wanted to make the case that breaking the problem up and
dumping the data into files between steps is very beneficial and should not be
viewed as a burden or extra work.
When I write code in C the first step is to read the input. This is almost
invariably followed by a section of the form:
if( debug ){
// dump everything in the same format as
// the input file for checking w/ cmp(1)
// or diff(1)
debug = 0;
}
NB Branch prediction in modern processors results in zero run time overhead for
doing this.
It takes a really long time to find a mistake you made at the data input stage.
Even when writing a monolithic program, I proceed in very small steps saving to
RCS frequently with a narrative in the comment log explaining where I am. At
each step I try to test what I've done before checking it in. This makes it
easy to abandon bad algorithmic choices.
On the subject of the scripting section in the wiki, I suspect that there will
be a growing number of users of GLPK who are not doing OR problems. I've
certainly been telling anyone I know that they need to look at it.
This implies a challenge in figuring out how to organize things to deal with
the wide range of OS environments and scripting languages. I'm surprised that
no one has mentioned interfacing to Matlab, Octave, Scilab etc. I know GLPK is
accessible from R, but not sure about the others.
Have Fun!
Reg
- Re: [Help-glpk] Problem with absolute value, (continued)
- Re: [Help-glpk] Problem with absolute value, Jeffrey Kantor, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Alessandro Saccoia, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Reginald Beardsley, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Alessandro Saccoia, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Dmitry Nadezhin, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Reginald Beardsley, 2013/01/14
- Re: [Help-glpk] Problem with absolute value, Alessandro Saccoia, 2013/01/16
- Re: [Help-glpk] Problem with absolute value, Jeffrey Kantor, 2013/01/16
- Re: [Help-glpk] Problem with absolute value, Alessandro Saccoia, 2013/01/17
- Re: [Help-glpk] Problem with absolute value, Robbie Morrison, 2013/01/15
- Re: [Help-glpk] Problem with absolute value,
Reginald Beardsley <=
- Re: [Help-glpk] Problem with absolute value, Robbie Morrison, 2013/01/15