Skip to content

Commit

Permalink
Connected simulation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Herzog committed Jan 16, 2025
1 parent ca306ea commit ff17b7e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion Simulator/src/main/java/net/calc/StartAnySimulator.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,16 @@ public String check(final CallcenterRunModel checkedRunModel) {
* @see CallcenterSimulatorInterface
*/
public CallcenterSimulatorInterface run() {
return run(true);
}

/**
* Startet die Simulation
* @param allowIncreaseDays Darf die Anzahl an simulierten Tagen erhöht werden? (Wenn dies in der Konfiguration eingestellt ist.)
* @return Interface über das auf den lokalen Simulator oder den Wrapper für die Netzwerksimulation zugegriffen werden kann
* @see CallcenterSimulatorInterface
*/
public CallcenterSimulatorInterface run(final boolean allowIncreaseDays) {
final SetupData setup=SetupData.getSetup();

CallcenterSimulatorInterface simulator;
Expand All @@ -166,7 +176,7 @@ public CallcenterSimulatorInterface run() {
simulator=new RemoteAndLocalComplexCallcenterSimulator(editModel,setup.getRealMaxThreadNumber(),networkParts,networkServers,networkPorts,networkPasswords);
} else {
int threadCount=Math.min(setup.getRealMaxThreadNumber(),Runtime.getRuntime().availableProcessors());
if (setup.increaseNumberOfDays) {
if (setup.increaseNumberOfDays && allowIncreaseDays) {
int days=runModel.editModel.days;
while (days%threadCount!=0) days++;
runModel.editModel.days=days;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public String initNextSimulation(File logFile) {
/* Simulation starten */
StartAnySimulator startAnySimulator=new StartAnySimulator(editModel);
s=startAnySimulator.check(); if (s!=null) return s;
simulator=startAnySimulator.run();
simulator=startAnySimulator.run(false);
simulator.start(false);

return null;
Expand Down
1 change: 1 addition & 0 deletions Simulator/src/main/java/ui/help/pages_de/Changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h1>Versionsgeschichte</h1>
<h2>6.1.234 (xx.x.2025)</h2>
<ul>
<li>Neue unterstützte Wahrscheinlichkeitsverteilungen: Negative hypergeometrische Verteilung, U-quadratische Verteilung, reziproke Verteilung, Kumaraswamy-Verteilung, Irwin-Hall-Verteilung, Sinus-Verteilung und Arcus Sinus-Verteilung</li>
<li>[Fix] Probleme bei der Verwendung der verbundenen Simulation, wenn die Anpassung der Anzahl der simulierten Tage an die Anzahl an verfübaren CPU-Kernen aktiviert war</li>
</ul>

<h2>6.0.233 (22.7.2024)</h2>
Expand Down
1 change: 1 addition & 0 deletions Simulator/src/main/java/ui/help/pages_en/Changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ <h1>Version history</h1>
<h2>6.1.234 (2025-0x-xx)</h2>
<ul>
<li>New supported distributions: Negative hypergeometric distribution, U-quadratic distribution, reciprocal distribution, Kumaraswamy distribution, Irwin-Hall distribution, sine distribution and arcsine distribution</li>
<li>[Fix] Problems using the connected simulation when the adjustment of the number of simulated days to the number of available CPU cores was activated</li>
</ul>

<h2>6.0.233 (2024-07-22)</h2>
Expand Down

0 comments on commit ff17b7e

Please sign in to comment.