Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  CPXENVptr vs. CPXCENVptr

    Posted 09/19/11 05:45 PM

    Originally posted by: GS2000


    What is the difference between CPXENVptr and CPX*C*ENVptr?

    They both appear in the callable library reference document. For example,

    Definition for Global function CPXopenCPLEX is listed as:
    CPXENVptr CPXopenCPLEX(int * status_p)

    Global function CPXprimopt
    int CPXprimopt(CPXCENVptr env, CPXLPptr lp)
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: CPXENVptr vs. CPXCENVptr

    Posted 09/20/11 02:33 AM

    Originally posted by: SystemAdmin


    You can think of these two definitions like this:
    struct cpxenv;
    typedef struct cpxenv *CPXENVptr;
    typedef struct cpxenv const *CPXCENVptr;
    

    As you can see, the CPX*C*ENVptr version has an additional 'const' qualifier. If an argument to a function is CPXCENVptr then the function will not change the environment pointed to, if the argument is CPXENVptr then it may change it.
    One good example is CPXsetintparam() and CPXgetintparam(). CPXsetintparam() changes the parameter settings in the environment and therefore has a CPXENVptr argument. CPXgetintparam() does not change the environment but only reads a parameter value from it. Therefore it has a CPXCENVptr argument.
    #CPLEXOptimizers
    #DecisionOptimization