Class SMICAstarMain

java.lang.Object
org.ddolib.examples.smic.SMICAstarMain

public class SMICAstarMain extends Object
The Single Machine with Inventory Constraint (SMIC) with AsTar. The SMICAstarMain class provides the entry point for solving instances of the Single Machine with Inventory Constraint (SMIC) problem using the As star Search (A*) algorithm.

This main program:

  • Loads an instance of the SMIC problem from a file (by default data/SMIC/data10_2.txt);
  • Constructs an Model composed of the problem definition, a fast lower bound estimator, and a dominance checker to prune dominated states during search;
  • Invokes the Solvers.minimizeAstar(Model, java.util.function.BiConsumer) method to perform the optimization using A*;
  • Prints the best found solution and search statistics.

Usage:

   java SMICAstarMain [instanceFile]
 
If no instance file is provided as an argument, the program defaults to data/SMIC/data10_2.txt.

Example:

   java SMICAstarMain data/SMIC/data20_3.txt
 
See Also:
  • Constructor Details

    • SMICAstarMain

      public SMICAstarMain()
  • Method Details

    • main

      public static void main(String[] args) throws IOException
      Entry point of the SMIC A* solver. Initializes the problem instance, builds the A* model, and executes the optimization process.
      Parameters:
      args - command-line arguments; the first argument may specify the path to the SMIC instance file. If omitted, the default instance data/SMIC/data10_2.txt is used.
      Throws:
      IOException - if the instance file cannot be read.