Package org.ddolib.examples.knapsack
Class KSAcsMain
java.lang.Object
org.ddolib.examples.knapsack.KSAcsMain
Knapsack Problem (KS) with Acs.
This class demonstrates how to solve an instance of the Knapsack Problem (KS) using the Anytime Column Search (ACS) algorithm.
The program performs the following steps:
- Loads a knapsack instance from a data file.
- Defines an
AcsModelwith a fast lower bound and dominance checker. - Creates a
Solversand runs the ACS algorithm. - Prints updates when a new incumbent solution is found.
- Outputs the final search statistics.
The ACS solver in this example is configured to stop after 10 iterations, and the column width for the ACS model is set to 10.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
KSAcsMain
public KSAcsMain()
-
-
Method Details
-
main
Entry point of the ACS demonstration for the Knapsack Problem.- Parameters:
args- command-line arguments (not used)- Throws:
IOException- if the instance file cannot be read
-