Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  get and Set basis via IloOplCplexBasis

    Posted 03/28/11 09:03 AM

    Originally posted by: HKUcivil


    Hi,

    Now i want to use IloOplCplexBasis class to get and set basis .
    However, when i add

    IloOplCplexBasis::getBasis(cplex)

    It shows the warning that :

    error C2352: 'IloOplCplexBasis::getBasis' : illegal call of non-static member function
    C:\ILOG\CPLEX_Studio_AcademicResearch122\opl\include\ilopl/ilooplmodel.h(546) : see declaration of 'IloOplCplexBasis::getBasis'

    How to solve this problem?
    Thanks.

    Thanks.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: get and Set basis via IloOplCplexBasis

    Posted 03/30/11 11:07 AM

    Originally posted by: SystemAdmin


    Did you read the error message? It is clearly telling what you are doing wrong:
    IloOplCplexBasis::getBasis() is not a static method of class IloOplCplexBasis. So you need an instance of this class to invoke this method.
    In particular, you cannot invoke it with '::' notation (unless you are inside a subclass) but need to invoke it like 'basis->getBasis()' or 'basis.getBasis()', provided that 'basis' is either a pointer or a reference to an instance of IloOplCplexBasis.
    How to obtain such a pointer or instance I don't know. I guess the people on the OPL Forum will be able to help you.
    #CPLEXOptimizers
    #DecisionOptimization