Package org.ddolib.examples.layered.misp
Class MispGenerator
java.lang.Object
org.ddolib.examples.layered.misp.MispGenerator
Contains methods to generate instances of the MISP.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidgenerateRandom(int nbVars, String fileName, int connectedProba) Generates a random instance of the MISP.static voidgenerateRandom(int nbVars, String fileName, int connectedProba, long seed) Generates a random instance of the MISP.static voidProgram entry point.
-
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 graphfileName- the file to save the instanceconnectedProba- each pair of nodes has a probability of1 / connectedProbato 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 graphfileName- the file to save the instanceconnectedProba- each pair of nodes has a probability of1 / connectedProbato not be connected.- Throws:
IOException- if something goes wrong while writing the file
-
main
Program entry point. Generates a single random MISP instance of 500 nodes and saves it todata/MISP/500_nodes_3.dot.- Parameters:
args- command-line arguments (not used)- Throws:
IOException- if something goes wrong while writing the file
-