Skip to content

Polytech-AdrienCastex/2D-Cutting-Stock-Problem-with-Setup-Cost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 

Repository files navigation

2D-Cutting-Stock-Problem-with-Setup-Cost

Math problem

Information

Language Java [8]
IDE NetBeans [8]
Modular Yes



Fast code information

Basic use (taboo method)

Pattern definition :

PatternKind pk = new PatternKind(40, 60);
pk.addImageKind(24, 30, 246);  // add image { w = 24 ; h = 30 ; demand = 246  }
pk.addImageKind(13, 56, 562);  // add image { w = 13 ; h = 56 ; demand = 562  }
pk.addImageKind(14, 22, 1000); // add image { w = 14 ; h = 22 ; demand = 1000 }
pk.addImageKind(9, 23, 3498);  // add image { w = 9  ; h = 23 ; demand = 3498 }

Call :

INextSolutionGenerator generator = new TabooMethod(new INeighborOperator[]
{
    new Addition(),
    new Subtraction()
}, pk, new CutInterfacer(pk), 20); // Define the algorithm to use, here : taboo method

ProblemParameters pp = new ProblemParameters(4, 1, 10); // Define the parameters of the problem solver
FinalSolution fs = FinalSolution.findSolution(5000, 50, pp, pk, generator); // Compute

System.out.println(fs); // Print the final solution



Available algorithms

Summary/Links

Name Class name
Minimum local reacher LocalMinimumReacher »
Taboo/Tabu method TabooMethod »

Minimum local reacher

```java INextSolutionGenerator generator = new LocalMinimumReacher( new INeighborOperator[] { new Addition(), new Subtraction() }, // List of operators to define the neighborhood pk, // Pattern kind new CutInterfacer(pk) // Patern placement algorithm ); ```

Taboo method

```java INextSolutionGenerator generator = new TabooMethod( new INeighborOperator[] { new Addition(), new Subtraction() }, // List of operators to define the neighborhood pk, // Pattern kind new CutInterfacer(pk), // Patern placement algorithm 20 // Number of taboo operations ); ```



References

About

Math problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages