Class MispGenerator

java.lang.Object
org.ddolib.examples.misp.MispGenerator

public class MispGenerator extends Object
Contains methods to generate instances of the MISP.
  • Constructor Details

    • MispGenerator

      public MispGenerator()
  • Method Details

    • generateRandom

      public static void generateRandom(int nbVars, String fileName, int connectedProba, long seed) throws IOException
      Generates a random instance of the MISP.
      Parameters:
      nbVars - How many nodes in the graph.
      fileName - The file to save the instance.
      connectedProba - Each pair of nodes has a probability of 1 / connectedProba to not be connected.
      seed - The seed of the random number generator.
      Throws:
      IOException - If something goes wrong while writing the file
    • generateRandom

      public static void generateRandom(int nbVars, String fileName, int connectedProba) throws IOException
      Generates a random instance of the MISP.
      Parameters:
      nbVars - How many nodes in the graph.
      fileName - The file to save the instance.
      connectedProba - Each pair of nodes has a probability of 1 / connectedProba to not be connected.
      Throws:
      IOException - If something goes wrong while writing the file
    • main

      public static void main(String[] args) throws IOException
      Throws:
      IOException