Class PSLnsMain

java.lang.Object
org.ddolib.examples.pigmentscheduling.PSLnsMain

public class PSLnsMain extends Object
Entry point for solving the Pigment Sequencing Problem (PSP) using a Large Neighborhood Search (LNS) approach combined with Decision Diagram Optimization (DDO).

The Pigment Sequencing Problem consists in determining an optimal order of pigments or items in a sequence to minimize setup times, color transitions, or other sequencing costs. It arises in manufacturing, printing, and similar production processes.

This class demonstrates how to:

  • Load a PSP instance from a file
  • Define a LnsModel with problem-specific components
  • Use a lower bound heuristic to guide the search
  • Use a ranking heuristic to prioritize states
  • Control the decision diagram width
  • Run a Large Neighborhood Search (LNS) optimization
  • Print intermediate and final solutions

Instance Configuration

The program loads a PSP instance from:

 data/PSP/instancesWith5items/3
 
if no command-line argument is provided. Otherwise, it uses the path supplied as args[0].

Model Components

  • PSProblem – defines the sequencing instance and constraints
  • PSFastLowerBound – provides a fast lower bound on the objective
  • PSRanking – ranks states during decision diagram compilation
  • FixedWidth – limits the decision diagram width

Search Configuration

  • Search strategy: Large Neighborhood Search (LNS)
  • Time limit: 10,000 milliseconds (10 seconds)
  • Width heuristic: fixed width of 100 nodes per layer

Output

The program prints:

  • Intermediate solutions during the search
  • Final solution statistics
  • The best pigment sequence found
See Also:
  • Constructor Details

    • PSLnsMain

      public PSLnsMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Main entry point of the program.

      Loads a PSP 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 PSP instance file
      Throws:
      IOException - if the instance file cannot be read