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

push epsilon

parent d7055b26
Branches
No related tags found
No related merge requests found
...@@ -43,7 +43,7 @@ public class Main { ...@@ -43,7 +43,7 @@ public class Main {
Scanner readFile = new Scanner(System.in); Scanner readFile = new Scanner(System.in);
System.out.println("Entrez le nom du fichier à tester, il doit se situer dans le dossier src."); System.out.println("Entrez le nom du fichier à tester, il doit se situer dans le dossier src.");
//String nameFile = readFile.nextLine(); //String nameFile = readFile.nextLine();
String nameFile = "inputNonAdmissible.txt"; String nameFile = "network1.txt";
//String nameFile = "inputNonAdmissible.txt"; //String nameFile = "inputNonAdmissible.txt";
File f = new File("src/" + nameFile); File f = new File("src/" + nameFile);
Scanner sc = new Scanner(f); Scanner sc = new Scanner(f);
......
...@@ -104,7 +104,7 @@ public class Simplex { ...@@ -104,7 +104,7 @@ public class Simplex {
if (solutionOptimale > 0 + EPSILON) { if (solutionOptimale > 0 + EPSILON) {
System.out.println("Il n'y a pas de solutions admissibles pour ce problème."); System.out.println("Il n'y a pas de solutions admissibles pour ce problème.");
} }
if (solutionOptimale == 0) { if (Math.abs(solutionOptimale) < EPSILON || solutionOptimale == 0) {
// Il y a une solution optimale // Il y a une solution optimale
// Il faut enlever les variables auxilaires // Il faut enlever les variables auxilaires
Matrix res = new Matrix(matEcart.getX(), matEcart.getY()); Matrix res = new Matrix(matEcart.getX(), matEcart.getY());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment