Class MispGenerator

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

public class MispGenerator extends Object
Contains methods to generate instances of the MISP.
  • 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
      Program entry point. Generates a single random MISP instance of 500 nodes and saves it to data/MISP/500_nodes_3.dot.
      Parameters:
      args - command-line arguments (not used)
      Throws:
      IOException - if something goes wrong while writing the file