We’ve posted another sample using DOcloud with the Java API on GitHub. See Cutting Stock Java sample.
This example demonstrates the use of the DOCloud API to iteratively solve a multi-model problem, which is a series of linked optimization problems. In the example, large bulk rolls of sheet metal of a given width are cut into rolls of different smaller widths to meet customer demands while minimizing the number of bulk rolls that need to be sliced.
The cutting stock problem is solved by decomposing the optimization problem into a pair of optimization models called the Master problem and the Subproblem. The example implements the well-known column generation algorithm (also known as Dantzig-Wolfe Decomposition). The DOcloud API enables a simple and straightforward code design.
The example also illustrates some best practices in using DOcloud to solve decision optimization problems: It uses a standardized template to represent the classes in the application data model and it encapsulates the optimization solver in a reusable class. The resulting implementation of the column generation algorithm should be readily adaptable to other types of decomposition model.