Where to find the interfaces examples
Presents examples that show how to use the API to extend your model and integrate it in your application.
The examples of OPL Interfaces also refer to some of the optimization
problems described in Table 2 but
their purpose is to show how to use the API to extend your model and
integrate it in your application, as summarized in Table 1.
Note:
The examples used in this documentation are designed to illustrate the features of the product. They should not be viewed as recommended methods or approaches for these problems.
All examples illustrating the use of OPL API libraries are in
<Install_dir>/opl/examples/opl_interfaces/cpp
<Install_dir>/opl/examples/opl_interfaces/java
<Install_dir>/opl/examples/opl_interfaces/dotnet
The .NET examples are available in C# (extension .cs ). These examples are similar to the C++ examples, except they are available for Windows only.
| Purpose | Name |
|---|---|
| Iterating through OPL elements | iterators |
| Basic model | mulprod |
| User-defined data sources | warehouse |
| Modifying a model | mulprod_main |
| Column generation | cutstock cutstock_change |
| Custom data sources and data handlers | customdatasource |
| SteelMill, a CP example | steelmill |
| Source code to run OPL: oplrunsample | oplrunsample |
| CP car production sequencing | carseq |
| Using data from other sources (described in the Language User's Manual) | externaldataread (in Java only) |
| Using an external knapsack algorithm (described in the Language User's Manual) | javaknapsack |
| High volume processing with multiple threads | ConcurrentProcessing |