Class PSAstarMain

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

public class PSAstarMain extends Object
The Pigment Sequencing Problem (PSP) with AsTar. Main class for solving a Pigment Sequencing Problem (PSP) using the A* search algorithm.

This program loads a PSP instance (either from a specified file or from a default path), builds a corresponding model, and applies the A* algorithm to minimize the total scheduling cost.

The computed solution is printed to the console, followed by statistics about the search process.

Usage:

 java PSAstarMain [instanceFile]
 
If no instanceFile argument is provided, the default instance located at data/PSP/instancesWith2items/10 is used.
  • Constructor Details

    • PSAstarMain

      public PSAstarMain()
  • Method Details

    • main

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

      This method initializes a PSProblem from the given instance file, constructs a Model for the A* search, and runs the solver using Solvers.minimizeAstar(Model, java.util.function.BiConsumer). The resulting solution and search statistics are printed to standard output.

      Parameters:
      args - optional command-line argument specifying the path to a PSP instance file
      Throws:
      IOException - if an error occurs while reading the problem instance