Production problems
Provides examples of the use of mixed integer-linear programming (MILP) to solve production problems.
An inside/outside production model
To meet the demands of its customers, a company manufactures its products in its own factories (inside production) or buys them from other companies (outside production). The inside production is subject to some resource constraints: each product consumes a certain amount of each resource. In contrast, outside production is theoretically unlimited. The problem is to determine how much of each product should be produced inside and outside the company while minimizing the overall production cost, meeting the demand, and satisfying the resource constraints.
The examples are:
The complex production problem: examples/opl/production. This is accessed through the default run configuration Basic Configuration.
The problem revisited to use tuples: examples/opl/production/production.mod. This is accessed through the run configuration Tuples.
The same problem using named data: examples/opl/production/productn.mod. This is accessed through the run configuration Named data.
See A production problem in the Language User’s Manual.
A multiperiod production planning model
Large linear-programming problems are often obtained from simpler ones by generalizing them along one or more dimensions.
A typical extension of production-planning problems is to consider several production periods and to include inventories in the model. The multi-period production planning model generalizes the inside/outside production model. The main generalization is to consider the demand for the products over several periods and to allow the company to produce more than the demand in a given period. There is an inventory cost associated with storing the additional production.
The examples are:
A basic multiperiod production model: examples/opl/mulprod. This is accessed using the default run configuration Solve problem once.
A version of the project that illustrates how to modify the CPLEX model and resolve it incrementally: examples/opl/mulprod/mulprod_change_main.mod. This is accessed using the run configuration Modify CPLEX model incrementally.
A flow-control script version of the project that illustrates how to modify the model and resolve it iteratively: examples/opl/mulprod_main.mod. This is accessed using the run configuration Solve models sequence by changing data.
See also A multi-period production planning problem in the Language User’s Manual and The multiperiod production planning example in IDE Tutorials.
A production planning model for steel
This example is a linear program (LP) based on the basic production planning model from: Fourer, Gay, and Kernighan, The AMPL Modeling Language.
The problem is to decide how to produce steel products over time, considering that production, selling, and inventory can be changed over time. There is a capacity on production in each week, and you can only sell up to the amount demanded (no backorders). This model assumes that the data is given as separate arrays for each set of numeric values.
The steel model demonstrates how to get data from and publish results to a spreadsheet.
To access this example, go to: examples/opl/xsteel.