Skip to content
Snippets Groups Projects
Commit ee9a627b authored by juliano.souzaluz's avatar juliano.souzaluz
Browse files

Update Main.java

parent b93f0dfe
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,8 @@ public class Main {
Scanner readFile = new Scanner(System.in);
System.out.println("Entrez le nom du fichier à tester, il doit se situer dans le dossier src.");
//String nameFile = readFile.nextLine();
String nameFile = "inputNonAdmissible.txt";
String nameFile = "network1.txt";
//String nameFile = "inputNonAdmissible.txt";
File f = new File("src/" + nameFile);
Scanner sc = new Scanner(f);
String[] elements;
......@@ -78,7 +79,7 @@ public class Main {
eq.printEq();
// Tableau initial
Simplex spx = new Simplex(eq.getMat().getX(), eq.getMat().getX() + eq.getMat().getY() + 1, line);
Simplex spx = new Simplex(eq.getMat().getX(), eq.getMat().getX() + eq.getMat().getY() + 1, line, contraintes);
spx.createSimplex(eq, contraintes);
spx.printSimplex(spx.getMatEcart(), "Tableau initial", 0);
......@@ -93,6 +94,8 @@ public class Main {
}
sc.close();
// Mesure du temps
long stop = System.nanoTime();
long duration = TimeUnit.MILLISECONDS.convert(stop - start, TimeUnit.NANOSECONDS);
System.out.println("Temps d'exécution: " + duration + " ms");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment