-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Control class added (GestionSolution) and changed packages
- Loading branch information
Showing
11 changed files
with
58 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
/Problem.class | ||
/SolutionFractionnaire.class | ||
/SolutionGloutonne.class | ||
/GestionSolution.class | ||
/model/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import java.util.HashMap; | ||
|
||
import model.Problem; | ||
import model.Solution; | ||
|
||
/** | ||
* GestionSolution récupère des entitées solutions à un problème et lance des calculs | ||
* de vérification, réparation et optimisation de laslution | ||
* @author Morane Otilia | ||
* | ||
*/ | ||
public class GestionSolution { | ||
protected Problem pb; | ||
|
||
private HashMap<Double, Solution> optim= new HashMap<Double,Solution>(); | ||
/*Repertoire des solutions non-realisables*/ | ||
private HashMap<Double, Solution> optimRealisable= new HashMap<Double,Solution>(); | ||
/*Repertoire des solutions realisables*/ | ||
|
||
|
||
/** | ||
* | ||
* @param sol | ||
*/ | ||
public void verifRamSol(Solution sol){ | ||
boolean isSol = pb.verifRamSol(sol); | ||
/** | ||
* Pendant la vérification, création d'un repertoire de solutions réalisable et non réalisable | ||
* avec leur résultat en tant que clé | ||
*/ | ||
if(isSol){ | ||
optimRealisable.put(sol.getSum(), sol); | ||
}else{ | ||
optim.put(sol.getSum(), sol); | ||
} | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/SolutionFractionnaire.java → src/model/SolutionFractionnaire.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
src/SolutionGloutonne.java → src/model/SolutionGloutonne.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
package model; | ||
|
||
|
||
public class SolutionGloutonne extends Solution{ | ||
|
||
|