Java and CPLEX example project: Precendence Constrained Knapsack Problem
This is a project page for a small example project that showcases how to use CPLEX from Java. It solves the Precedence Constrained Knapsack Problem, but is a useful example if you intend to implement other optimization problems that involve (directed) graphs.
- IBM offers free versions of the IBM ILOG CPLEX Optimization Studio. You can got to https://www.ibm.com/academic/topic/data-science and create an IBM account with your EUR e-mail. You land on a general site “Data Science”. If you scroll down there is a tab “Software”. Click on “Software” and then under ILOG CPLEX Optimization Studio on Download. Your browser may suppress a pop-up, so make sure you allow the IBM website to show popups. In the pop-up, I advise to choose HTTP and select the CPLEX version appropriate for you operating system.
- View the GitHub repository which has a more in-depth explanation. This also contains a more advanced column generation example, but these examples are separate.
- You can look at the code the code of this project, as well as an example instance file. You can download a zip file with the latest files.
- There are lecture slides with some background information and the most important ideas of this example project.
- There is a series of four YouTube videos in which this project is implemented.
- You can view the Javadoc documentation of this example project.