Decision Optimization

Expand all | Collapse all

How to call OPL model and data from C++?

  • 1.  How to call OPL model and data from C++?

    Posted Wed September 15, 2021 03:21 PM
    Hi,

    I would like to check how can I call OPL model (*.mod) and data (*.dat) into C++ code?

    Best regards,
    Mohamed

    ------------------------------
    Mohamed Awad
    ------------------------------


  • 2.  RE: How to call OPL model and data from C++?

    Posted Thu September 16, 2021 03:05 AM
    You can use the C++ APIs of OPL: https://www.ibm.com/docs/en/icos/20.1.0?topic=introduction-using-c-interface
    See for example the mulprod.cpp C++ example in CPLEX_Studio201/opl/examples/opl_interfaces/cpp/src which shows exactly how to run a .mod/.dat

    ------------------------------
    Vincent Beraudier
    ------------------------------