Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Cplex.Version gives an error

    Posted 05/29/13 06:01 AM

    Originally posted by: ChiragSolanki1986


    Hi,

     

    We are currently planning to migrate from CPLEX  V12.2to V12.5. However in our initial testing we have got a runtime error while executing the statement 

    Cplex cpl = new Cplex();

    Writer.WriteLine("Using CPLEX Version" : cpl.Version); //Error in this Line

    I receive an error stating that the "Invalid managed/umanaged type combination".

    Note : We are using C# and Concert(ILOG.Concert.dll & ILOG.Cplex.dll)) to optimize our solution.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Cplex.Version gives an error

    Posted 06/03/13 01:54 PM

    Thank you for reporting this.  I was able to reproduce the error.  We are working on a resolution and will let you know when we have more information.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Cplex.Version gives an error

    Posted 06/05/13 01:03 PM

    You can use the following work around in V12.5:

    string version = string.Format(
                    "{0}.{1}.{2}.{3}",
                    CplexStubs.CPX_VERSION_VERSION,
                    CplexStubs.CPX_VERSION_RELEASE,
                    CplexStubs.CPX_VERSION_MODIFICATION,
                    CplexStubs.CPX_VERSION_FIX);
    System.Console.WriteLine("Using CPLEX Version: " + version);

    These are undocumented fields in the class and there is no guarantee that they will exist in the next version or fix pack.  However, in the next version/fix pack the Version property should be fixed.

     


    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Cplex.Version gives an error

    Posted 06/11/13 11:14 AM

    Here's another workaround, using reflection:

    string version = Assembly.GetAssembly(typeof(Cplex)).GetName().Version.ToString();

     


    #CPLEXOptimizers
    #DecisionOptimization