help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] Re: copying control parameters to another problem


From: Andrew Makhorin
Subject: [Help-glpk] Re: copying control parameters to another problem
Date: Sat, 22 Feb 2003 10:59:18 +0300

>Is there a generic way of copying all the control parameters from one
>problem object to another? By generic I mean that I don't need to
>specify the parameters explicitly, or to know what type (integer/real)
>the parameters are, so that the code would still work when there are
>changes in the parameter list (e.g. between versions of GLPK).

There is no generic api routine to do that. In principle, the following
(not so good) way may be used:

      LPX *from, *to;
      . . .
      memcpy(((char *)to)   + offsetof(LPX, msg_lev),
             ((char *)from) + offsetof(LPX, msg_lev),
             sizeof(LPX) - offsetof(LPX, msg_lev));

However I can't imagine in which cases this operation would be
necessary, because changing the default value of a control parameter is
(as a rule) specific for a particular problem instance.





reply via email to

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