C#.NET examples
These examples in C#.NET use Concert Technology.
The following examples are delivered with CPLEX in IBM ILOG CPLEX Optimization Studio.
| AdMIPex1.cs | uses node and branch callbacks to optimize a MIP. |
| AdMIPex2.cs | uses a heuristic callback to optimize a MIP. |
| AdMIPex3.cs | uses a branch callback on a MIP with special ordered sets (SOSs). |
| AdMIPex4.cs | demonstrates how to add lazy constraints and user cuts. |
| AdMIPex5.cs | adds cuts through the cut callback of a MIP. This example also demonstrates both lazy constraints and user cuts. |
| AdMIPex6.cs | starts a MIP optimization from an LP solution. |
| AdMIPex8.cs | demonstrates how to add lazy constraints and user cuts with the generic callback. |
| AdMIPex9.cs | uses a heuristic callback based on the knapsack principle. |
| Benders.cs | demonstrates a Benders decomposition. |
| BendersATSP.cs | demonstrates lazy constraint callbacks to separate integer feasible LP solutions and user cut callbacks to separate fractional infeasible LP solutions in a do-it-yourself Benders decomposition of an asymmetric traveling salesperson problem. |
| Blend.cs | solves a blending problem. |
| CplexServer.cs | shows how to enter a problem with the class CplexModeler and how to serialize the model for solving. |
ConflictEx1.cs |
demonstrates how to use the conflict refiner. |
| CutStock.cs | is a cutting stock model, illustrating column generation. |
| Diet.cs | is an implementation of the well known diet problem; this linear program can be generated by columns (add foods to the diet) or by rows (add requirements to the diet); optionally, demonstrates how to model a multiobjective problem by creating a second objective. |
| MultiObjEx1.cs | demonstrates how to read in and optimize a multiobjective problem. |
| Etsp.cs | demonstrates a scheduling problem with costs for earliness and tardiness. |
| Facility.cs | is a warehouse-location problem. Optionally, the example can apply a Benders decomposition. |
| FixCost1.cs | is a production planning problem with fixed costs. |
| FixNet.cs | uses indicator constraints to avoid numeric difficulty in a fixed-charge network flow problem. |
| FoodManufact.cs | implements a solution to the food production planning problem, well known from the modeling textbook of H. P. Williams. |
| GenericBranch.cs | demonstrates how to perform customized branching using the generic callback. |
| GlobalQPex1.cs | shows how to read a convex or nonconvex quadratic programming model (QP) or mixed integer quadratic programming model (MIQP) and solve it for a first order or global optimum. |
| Goalex1.cs | uses the goal API for branching. |
| Goalex2.cs | uses the goal API to add cuts. |
| Goalex3.cs | uses the goal API to add node evaluators. |
| IndefQPex1.cs | solves an indefinite quadratic program (nonPSD QP) to a local optimum. |
| LPex1.cs | is a basic linear programming model illustrating data population techniques. |
| LPex2.cs | is a basic linear programming model with data coming from files. |
| LPex3.cs | shows how to add rows to a model and re-optimize. |
| LPex4.cs | illustrates callbacks. |
| LPex6.cs | shows how to load a basis. |
| LPex7.cs | shows how to access names of columns. |
| MIPex1.cs | is a basic MIP model. |
| MIPex2.cs | is another basic MIP model. |
| MIPex3.cs | includes special ordered sets (SOSs) in a MIP model. |
| MIPex4.cs | shows how to use an informational callback for logging, limiting number of nodes, and interrupting optimization; also shows how to terminate optimization; also shows how to use time stamps. |
| MIQPex1.cs | is a mixed integer quadratic programming model; it includes a quadratic objective in a MIP model. |
| MixBlend.cs | is a MIP blending model. |
| QPex1.cs | includes a quadratic term in the objective function of an LP. |
| QPex2.cs | is another model with a quadratic objective. |
| QPex3.cs | uses the Concert Technology interface for quadratic expressions to enter and to modify a model with quadratic expressions in linear combination in the objective function. |
| QCPex1.cs | is a quadratically constrained problem. |
| Populate.cs | shows how to generate and keep multiple solutions in the solution pool. |
| Rates.cs | is a planning problem with semi-continuous variables. |
| SocpEx1.cs | shows how to access dual values and reduced costs in SOCP models. |
| QCPDual.cs | shows how to access dual values and reduced costs in quadratically constrained programming models (QCP). |
| Steel.cs | is a production planning problem illustrating ways to build a model; it is based on steelT.mod from the AMPL modeling book by Fourer, Gay, and Kernighan. |
| Transport.cs | uses a piecewise linear cost function. |
| TuneSet.cs | analyzes a set of models and suggests nondefault parameter settings for better performance. |
| Warehouse.cs | is a warehouse-location problem; it uses goals. |