[Top][All Lists]

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

Re: [Help-glpk] Change Parameter

From: Michael Hennebry
Subject: Re: [Help-glpk] Change Parameter
Date: Fri, 24 Sep 2004 13:16:38 -0500 (CDT)

On Fri, 24 Sep 2004, Marcos Roberto Silva wrote:

> I create a simple C code to solve the model *.mod with the data file,
> with the API's, but I need to run program several times changing one
> single parameter of the data file.
> It's possible to change this parameter (into the C code) without create
> a new data file? There are some function to do this?

You can change problem data using the API.
Whether that is practical depends on how your
parameter affects the data and whether you can
figure out the what row and column indices go
with which row and column names.

To do so generically, I think that you would have to edit GLPK.
to let it take an open FILE instead of a file name.
You also need a way to associate a FILE with a string
instead of external data.
You can do this with mmap and fdopen,
but I'm not sure that it's worth it.

Is there a reason that you don't want to generate a new file?
For my code, I generally use the API for problem generation.

Mike   address@hidden
"Nothing says it like words if you know how to use them."
                    --  the Professional Organization of English Majors

reply via email to

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