Forum Discussion

FICO's avatar
FICO
Community Manager
2 years ago

Error with Knitro tolerance parameters

Years ago, I used Knitro tolerance parameters XKTR_PARAM_OPTTOL and XKTR_PARAM_FEASTOL successfully. Now (FICO Xpress Mosel 64-bit v6.4.4, FICO Xpress v9.3.0), there seems to be an issue.

setparam() does not produce an error, or any output, but getparam() does:

Code:

        writeln(">>>> XKTR_PARAM_OPTTOL = ", getparam("XKTR_PARAM_OPTTOL"))

        writeln(">>>> XKTR_PARAM_FEASTOL = ", getparam("XKTR_PARAM_FEASTOL")) 

Output:

?12001 Error: invalid parameter number 81027

?Error: (SLP) invalid parameter number 81027

>>>> XKTR_PARAM_OPTTOL = 0

?12001 Error: invalid parameter number 81022

?Error: (SLP) invalid parameter number 81022

>>>> XKTR_PARAM_FEASTOL = 0

What could be the reason? What is the right way to set these parameters and check their values?

By the way, I tried an alternative version of these parameters that I found in the doc: XPRS_KNITRO_PARAM_OPTTOL and XPRS_KNITRO_PARAM_FEASTOL. This gives a compilation error:

Control parameter `XPRS_KNITRO_PARAM_OPTTOL' unknown.

Thank you for your help!

Miroslav

7 Replies

  • FICO's avatar
    FICO
    Community Manager

    Hi Miroslav. This is a bug: getparam is broken for Knitro parameters. I don't see any workaround for checking the values of these parameters but I am working on a fix. Setparam is unaffected, so you can continue to set the parameters as usual.

  • FICO's avatar
    FICO
    Community Manager

    Hi Chris,

    Makes sense. Thanks for confirming that setparam works for these parameters.

    Regarding the alternative names of these parameters, XPRS_KNITRO_PARAM_OPTTOL and XPRS_KNITRO_PARAM_FEASTOL: Do you know why they give a compilation error? Are they supposed to be used in a different context?

    Thank you,

    Miroslav

  • FICO's avatar
    FICO
    Community Manager

    I would consider that a bug too. I will fix both of these issues.

  • FICO's avatar
    FICO
    Community Manager

    Both these issues will be fixed in the upcoming Xpress 9.5 release. They will also be fixed in the next available patches of earlier supported releases.

  • FICO's avatar
    FICO
    Community Manager

    Thank you!

    Slightly unrelated: What are the names of these parameters in Python API? I typically remove the "XPRS_" prefix but what are they here?

    Thank you,

    Miroslav

  • FICO's avatar
    FICO
    Community Manager

    In Python they have the xktr prefix, e.g.,  problem.controls.xktr_param_opttol