Skip to content

Commit 2e07ada

Browse files
committed
use reset_rounds parameter in both cases during init
1 parent cecdc38 commit 2e07ada

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

actsim.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,13 @@ void ActSim::runInit ()
205205
}
206206

207207
/* -- initialize blocks -- */
208+
209+
config_set_default_int ("sim.reset_rounds", 100);
210+
208211
if (!g->getlang() || !g->getlang()->getinit()) {
209212
if (fragmented_set) {
210213
int count = 0;
211214
int max_count = 0;
212-
config_set_default_int ("sim.reset_rounds", 100);
213215
max_count = config_get_int ("sim.reset_rounds");
214216
while (SimDES::matchPendingEvent (_match_hseprs) && count < max_count) {
215217
count++;
@@ -274,6 +276,7 @@ void ActSim::runInit ()
274276
more_steps = 1;
275277

276278
int count = 0;
279+
int max_rounds = config_get_int ("sim.reset_rounds");
277280
do {
278281
if (SimDES::AdvanceTime (100) != NULL) {
279282
warning ("breakpoint?");
@@ -282,8 +285,8 @@ void ActSim::runInit ()
282285
if (!SimDES::matchPendingEvent (_match_hseprs)) {
283286
break;
284287
}
285-
} while (count < 100);
286-
if (count == 100) {
288+
} while (count < max_rounds);
289+
if (count == max_rounds) {
287290
warning ("Pending production rule events during reset phase?");
288291
}
289292
}

0 commit comments

Comments
 (0)