Forum Discussion

FICO's avatar
FICO
Community Manager
9 years ago

How do I change a batch of control parameters?

Hi, I am new to Xpress.  Is it possible to change control parameters by reading in a parameters file ?  I need to be able to quickly change about 60 parameters multiple times.   

4 Replies

  • FICO's avatar
    FICO
    Community Manager

    Are you working with Mosel or with one of the library APIs?

  • FICO's avatar
    FICO
    Community Manager

    I figure it out.  I just needed the  integer values of the parameters which I got from the header file.

  • FICO's avatar
    FICO
    Community Manager

    With the C API you could also use this routine:

       int XPRS_CC XPRSsetparam(XPRSprob prob,const char* _paramname, const char* _svalue);

    that allows you to set Optimizer controls by string, meaning that you do not have to first check whether the control is an integer or double, such as in:

      XPRSsetparam(myprob, "XPRS_PRESOLVE", "1");

  • FICO's avatar
    FICO
    Community Manager

    Thanks. I will try that.  My workaround was to read in the integer value for the name of the parameter. I appreciate your help:)