Skip to content
Snippets Groups Projects

Dev1

Open OUATTARA Sie requested to merge o24014442/branch-and-bound:dev1 into main
1 file
+ 0
2
Compare changes
  • Side-by-side
  • Inline
+ 0
2
@@ -20,7 +20,6 @@ public class Backpack {
@@ -20,7 +20,6 @@ public class Backpack {
public void solve() {
public void solve() {
bestSolution = new boolean[loots.size()];
bestSolution = new boolean[loots.size()];
currentSolution = new boolean[loots.size()];
currentSolution = new boolean[loots.size()];
sortByRatio();
solutionFractionnelle();
solutionFractionnelle();
explore_from(0);
explore_from(0);
}
}
@@ -38,7 +37,6 @@ public class Backpack {
@@ -38,7 +37,6 @@ public class Backpack {
public void solutionFractionnelle(){
public void solutionFractionnelle(){
this.sortByRatio();
this.sortByRatio();
for(Loot loot : loots){
for(Loot loot : loots){
if(sfWeight + loot.getWeight() <= this.capacity){
if(sfWeight + loot.getWeight() <= this.capacity){
// Si l'objet entier peut entrer dans le sac
// Si l'objet entier peut entrer dans le sac
Loading