Examples online
Describes examples delivered with the product.
For the examples explained in the manual, you will find
the complete code for the solution in the
examples subdirectory
of the standard distribution of CPLEX, so that you can see exactly
how CPLEX fits into your own applications. Table 1 lists
the examples in this manual and indicates where to find them.| Example | Source File | In This Manual |
|---|---|---|
dietary optimization:
building a model by rows (constraints) or by columns (variables),
solving with IloCplex in C++ |
ilodiet.cpp |
Example: optimizing the diet problem in C++ |
dietary optimization: building a model by
rows (constraints) or by columns (variables), solving with IloCplex
in Java |
Diet.java |
Example: optimizing the diet problem in Java |
dietary optimization: building a model by
rows (constraints) or by columns (variables), solving with Cplex
in C#.NET |
Diet.cs |
Example: optimizing the diet problem in C#.NET |
| dietary optimization: building a model by rows (constraints) or by columns (variables), solving with the Callable Library | diet.c |
Example: optimizing the diet problem in the Callable Library |
| linear programming: starting from an advanced basis | |
|
| network optimization: using the Callable Library | netex1.c |
Example: using the network optimizer with the Callable Library netex1.c |
| network optimization: relaxing a network flow to an LP | netex2.c |
Example: network to LP transformation netex2.c |
| quadratic programming: maximizing a QP | |
|
| quadratic programming: reading a QP from a formatted file | qpex2.c |
Example: reading a QP from a file qpex2.c |
| quadratically constrained programming: QCP | |
Examples: QCP |
| second order cone programming: SOCP | |
Examples: SOCP |
| mixed integer programming: optimizing a basic MIP | |
Examples: optimizing a simple MIP problem |
| mixed integer programming: reading a MIP from a formatted file | |
Example: reading a MIP problem from a file |
| mixed integer programming: using special ordered sets (SOS) and priority orders | |
Example: using SOS and priority |
| cutting stock: using column generation | cutstock.cpp | What is column generation? |
| transport: piecewise-linear optimization | ilotransport.cpp |
Complete program: ilotransport.cpp |
| food manufacturing 2: using logical constraints | foodmanufac.cpp |
Using logical constraints: Food Manufacture 2 |
| early tardy scheduling | etsp.cpp |
Early tardy scheduling |
| input and output: using the message handler | lpex5.c |
Example: Callable Library message channels |
| using query routines | lpex7.c |
Example: using query routines lpex7.c |
| using callbacks | |
Example: deriving the simplex callback ilolpex4.cpp |
| using the tuning tool | tuneset.c |
Meet the tuning tool and Examples: time limits on tuning in the Interactive Optimizer |
| mixed integer programming: solution pool | location.lp |
Example: simple facility location problem |