Skip to content

Commit f3be265

Browse files
committed
Fixed main.cpp errors and added final blocking value
1 parent 81fb098 commit f3be265

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3131
- Replaced the `ExactFit` algorithm with `BestFit`.
3232
- Enhanced algorithms
3333

34+
### Fixed
35+
- Fixed error in main.cpp always using FirstFit
36+
- Fixed error in main.cpp always using Fixed-Rate
3437

3538
## [1.1.1] - 2025-03-01
3639

src/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
148148
USE_ALLOC_FUNCTION(FirstFit, sim);
149149
break;
150150

151-
case 'E':
151+
case 'B':
152152
USE_ALLOC_FUNCTION(BestFit, sim);
153153
break;
154154

@@ -159,13 +159,17 @@ int main(int argc, char *argv[])
159159
break;
160160
}
161161

162-
USE_ALLOC_FUNCTION(FirstFit, sim);
163162
sim.setGoalConnections(goalConnections);
164163
sim.setConfidence(confidence);
165164
sim.setLambda(lambda);
166165
sim.setMu(mu);
167166
sim.init();
168167
sim.run();
169168

169+
// Print the results with flush
170+
// Set the precision to 6 decimal places
171+
std::cout.precision(4);
172+
std::cout << "final_blocking: " << sim.getBlockingProbability() << "\n" << std::flush;
173+
170174
return 0;
171175
}

0 commit comments

Comments
 (0)