Rough implementation, missing final dual adjustment step, and may have other bugs as well as it does not yet output a maximum weight matching
This commit is contained in:
@@ -650,6 +650,7 @@ the file of distinct cells may enable better simulated replication of this exper
|
||||
* Melhorn, K., Näher, St. [The LEDA Platform of Combinatorial and Geometric Computing.](https://people.mpi-inf.mpg.de/~mehlhorn/LEDAbook.html) Cambridge University Press. Chapter 7, Graph Algorithms; p. 132-162 (1999)
|
||||
* Fredman, M., Tarjan, R. ["Fibonacci heaps and their uses in improved network optimization algorithms."](https://www.cl.cam.ac.uk/teaching/1011/AlgorithII/1987-FredmanTar-fibonacci.pdf) J. ACM, 34(3):596–615 (1987))
|
||||
* Bertsekas, D., Castañon, D. ["A forward/reverse auction algorithm for asymmetric assignment problems"](https://www.mit.edu/~dimitrib/For_Rev_Asym_Auction.pdf) Computational Optimization and Applications 1, 277-297 (1992)
|
||||
* Dimitrios Michail, Joris Kinable, Barak Naveh, and John V. Sichi. 2020. JGraphT—A Java Library for Graph Data Structures and Algorithms. ACM Trans. Math. Softw. 46, 2, Article 16
|
||||
|
||||
## EXTERNAL LIBRARIES USED
|
||||
* [JGraphT](https://jgrapht.org) -- Graph theory data structures and algorithms
|
||||
|
||||
@@ -582,35 +582,35 @@ public class InteractiveInterface {
|
||||
boolean backToOptions = false;
|
||||
while(!backToOptions) {
|
||||
System.out.println("\n---------ALGORITHM OPTIONS----------");
|
||||
System.out.println("1) Use integer weight scaling algorithm by Duan and Su.");
|
||||
System.out.println("2) Use Hungarian algorithm with Fibonacci heap priority queue");
|
||||
System.out.println("3) Use Hungarian algorithm with pairing heap priority queue");
|
||||
System.out.println("4) Use auction algorithm");
|
||||
System.out.println("1) Use Hungarian algorithm with Fibonacci heap priority queue");
|
||||
System.out.println("2) Use Hungarian algorithm with pairing heap priority queue");
|
||||
System.out.println("3) Use auction algorithm");
|
||||
System.out.println("4) Use integer weight scaling algorithm by Duan and Su. (buggy, not yet fully implemented!)");
|
||||
System.out.println("0) Return to Options menu");
|
||||
try {
|
||||
input = sc.nextInt();
|
||||
switch (input) {
|
||||
case 1 -> {
|
||||
BiGpairSEQ.setIntegerWeightScalingAlgorithm();
|
||||
System.out.println("MWM algorithm set to integer weight scaling algorithm of Duan and Su");
|
||||
backToOptions = true;
|
||||
}
|
||||
case 2 -> {
|
||||
BiGpairSEQ.setHungarianAlgorithm();
|
||||
BiGpairSEQ.setFibonacciHeap();
|
||||
System.out.println("MWM algorithm set to Hungarian with Fibonacci heap");
|
||||
backToOptions = true;
|
||||
}
|
||||
case 3 -> {
|
||||
case 2 -> {
|
||||
BiGpairSEQ.setHungarianAlgorithm();
|
||||
BiGpairSEQ.setPairingHeap();
|
||||
System.out.println("MWM algorithm set to Hungarian with pairing heap");
|
||||
backToOptions = true;
|
||||
}
|
||||
case 4 -> {
|
||||
case 3 -> {
|
||||
BiGpairSEQ.setAuctionAlgorithm();
|
||||
System.out.println("MWM algorithm set to auction");
|
||||
}
|
||||
case 4 -> {
|
||||
BiGpairSEQ.setIntegerWeightScalingAlgorithm();
|
||||
System.out.println("MWM algorithm set to integer weight scaling algorithm of Duan and Su");
|
||||
backToOptions = true;
|
||||
}
|
||||
case 0 -> backToOptions = true;
|
||||
default -> System.out.println("Invalid input");
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -193,6 +193,9 @@ public class Simulator implements GraphModificationFunctions {
|
||||
//create a new MaximumIntegerWeightBipartiteAuctionMatching
|
||||
maxWeightMatching = new MaximumIntegerWeightBipartiteAuctionMatching<>(graph, alphas, betas);
|
||||
}
|
||||
case INTEGER_WEIGHT_SCALING -> {
|
||||
maxWeightMatching = new MaximumIntegerWeightBipartiteMatching<>(graph, alphas, betas, new BigDecimal(highThreshold));
|
||||
}
|
||||
default -> { //HUNGARIAN
|
||||
//use selected heap type for priority queue
|
||||
HeapType heap = BiGpairSEQ.getPriorityQueueHeapType();
|
||||
@@ -273,6 +276,9 @@ public class Simulator implements GraphModificationFunctions {
|
||||
case AUCTION -> {
|
||||
algoType = "Auction algorithm";
|
||||
}
|
||||
case INTEGER_WEIGHT_SCALING -> {
|
||||
algoType = "Integer weight scaling algorithm from Duan and Su (not yet perfectly implemented)";
|
||||
}
|
||||
default -> { //HUNGARIAN
|
||||
algoType = "Hungarian algorithm with heap: " + BiGpairSEQ.getPriorityQueueHeapType().name();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user