Class MCPLnsMain

java.lang.Object
org.ddolib.examples.mcp.MCPLnsMain

public class MCPLnsMain extends Object
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 LnsModel with 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

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 Details

    • MCPLnsMain

      public MCPLnsMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      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