Class GRAstarMain

java.lang.Object
org.ddolib.examples.gruler.GRAstarMain

public class GRAstarMain extends Object
Golomb Rule Problem (GRP) with AsTar. Main class for solving the Golomb Ruler Problem (GRP) using the A* search algorithm.

This class demonstrates how to create a Golomb Ruler problem instance, define an A* search model, and solve the problem using Solvers.minimizeAstar(Model, java.util.function.BiConsumer). The solution and search statistics are printed to the console.

  • Constructor Details

    • GRAstarMain

      public GRAstarMain()
  • Method Details

    • main

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

      The method performs the following steps:

      1. Creates a Golomb Ruler problem instance with 8 marks.
      2. Defines an A* model for the problem.
      3. Solves the problem using the A* search algorithm.
      4. Prints the solution and search statistics to the console.
      Parameters:
      args - command-line arguments (not used)
      Throws:
      IOException - if an I/O error occurs while printing the solution