Decision Optimization

 View Only
Expand all | Collapse all

Migrating .MOD from C# to C++

  • 1.  Migrating .MOD from C# to C++

    Posted Thu March 20, 2014 07:57 AM

    Originally posted by: TheLoneStranger


    Hello,

    I have a C# project that calls a CPLEX model using a .MOD/.DAT file. The .DAT file is populated using a custom OPL Data source derived from ILOG.OPL.CustomOplDataSource. 

    I need to convert this to a C++ solution and I would like to still use the same approach, i.e. .MOD plus data.

    Google'ing CPLEX C++ .MOD does not turn up any useful information.

    Please can someone point me to the C++ classes which are the equivalent (or close enough) to the C# classes that are used to read .MOD files and interact with .DAT files.

     

    Kind regards,

     

    Mark


    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Migrating .MOD from C# to C++

    Posted Thu March 20, 2014 08:48 AM

    You should look at the opl/examples/opl_interfaces/cpp/src/oplrunsample.cpp example shipped with CPLEX Optimization Studio. This illustrates how to load .mod and .dat files and run projects.

    There also is example opl/examples/opl_interfaces/cpp/src/customdatasource.cpp that illustrates custom data sources in C++.


    #CPLEXOptimizers
    #DecisionOptimization