Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
6 replies Latest Post - ‏2013-01-22T12:15:13Z by SystemAdmin
SystemAdmin
SystemAdmin
7929 Posts
ACCEPTED ANSWER

Pinned topic CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

‏2013-01-21T14:37:38Z |
In CPLEX 12.5 to get the default, min, max values for upper and lower limits on the objective value I use

int CPXXinfodblparam(CPXCENVptr env, int whichparam, double * defvalue_p, double * minvalue_p, double * maxvalue_p)

For whichparam = 1026 (CPX_PARAM_OBJULIM) and whichparam = 1025 (CPX_PARAM_OBJULIM), the output defaults are +1e+75 and -1e75 (which are correct), whereas the min and max values are 0.0.

Please correct this trivial bug.
Updated on 2013-01-22T12:15:13Z at 2013-01-22T12:15:13Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    7929 Posts
    ACCEPTED ANSWER

    Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

    ‏2013-01-21T15:55:43Z  in response to SystemAdmin
    That is not a bug.
    If the function returns 0 for both the min and max value then this means that the parameter has no limits. See the reference documentation.
    • SystemAdmin
      SystemAdmin
      7929 Posts
      ACCEPTED ANSWER

      Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

      ‏2013-01-21T20:15:26Z  in response to SystemAdmin
      Nice, it seems to be even worse than a "trivial bug". First, how do you check two doubles for zero. Second, what do you mean with "the parameter has no limit". Please remember that it should work for all platforms.
      • SystemAdmin
        SystemAdmin
        7929 Posts
        ACCEPTED ANSWER

        Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

        ‏2013-01-22T06:27:29Z  in response to SystemAdmin
        I'm afraid I don't see your problem here :-(

        > Fish2013 wrote:
        > Nice, it seems to be even worse than a "trivial bug". First, how do you check two doubles for zero.
        >
        You can simply use the '==' operator to do that. Since these are constants there is no round-off impossible and using '==' on floating point numbers is fine here.

        > Second, what do you mean with "the parameter has no limit".
        >
        It means that you can specify any double precision floating point value here, including positive and negative infinity -- though using a NaN here might result in unexpected behavior.

        > Please remember that it should work for all platforms.
        >
        I don't see how any of the above would depend on the platform (for the platforms that CPLEX supports).
        • SystemAdmin
          SystemAdmin
          7929 Posts
          ACCEPTED ANSWER

          Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

          ‏2013-01-22T07:37:44Z  in response to SystemAdmin
          Do you mean I should use minvalue_p == 0.0 && maxvalue_p == 0.0?
          • SystemAdmin
            SystemAdmin
            7929 Posts
            ACCEPTED ANSWER

            Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

            ‏2013-01-22T09:10:59Z  in response to SystemAdmin
            > Fish2013 wrote:
            > Do you mean I should use minvalue_p == 0.0 && maxvalue_p == 0.0?
            >
            Yes, that is what I meant.
            • SystemAdmin
              SystemAdmin
              7929 Posts
              ACCEPTED ANSWER

              Re: CPLEX 12.5 with CPX_PARAM_OBJULIM / CPX_PARAM_OBJLLIM

              ‏2013-01-22T12:15:13Z  in response to SystemAdmin
              Hi, Daniel. Thanks for your comments.