Package org.ddolib.examples.mcp
Class MCPLnsMain
java.lang.Object
org.ddolib.examples.mcp.MCPLnsMain
Entry point for solving the Maximum Cut Problem (MCP)
using a Large Neighborhood Search (LNS) approach combined with
Decision Diagram Optimization (DDO).
The Maximum Cut problem consists in partitioning the vertices of a graph into two disjoint sets such that the sum of the weights of edges crossing the partition (i.e., edges with endpoints in different sets) is maximized.
This class demonstrates how to:
- Load a Maximum Cut instance from a file
- Define a
LnsModelwith problem-specific components - Use a lower bound heuristic to guide the search
- Run a Large Neighborhood Search (LNS) optimization
- Print intermediate and final solutions
Execution
The program accepts an optional command-line argument specifying the path to a Maximum Cut instance file. If not provided, a default instance is loaded from:
data/MCP/mcp_5_2.txt
Model Components
MCPProblem– defines the graph and edge weightsMCPFastLowerBound– provides a fast lower bound on the cut valueMCPRanking– ranks states during decision diagram compilation
Search Configuration
- Search strategy: Large Neighborhood Search (LNS)
- Time limit: 1000 milliseconds
No dominance rule or width heuristic is explicitly specified, so default behaviors (if provided by the framework) are used.
Output
The program prints:
- Intermediate solutions during the search
- Final solution statistics
- The best partition (cut) found
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MCPLnsMain
public MCPLnsMain()
-
-
Method Details
-
main
Main entry point of the program.Loads a Maximum Cut instance, configures the LNS model with problem-specific heuristics, and runs the optimization process.
- Parameters:
args- optional command-line arguments:args[0]– path to the MCP instance file
- Throws:
IOException- if the instance file cannot be read
-