Skip to content

Commit 5ed755f

Browse files
committed
refactoring
1 parent baa58e8 commit 5ed755f

File tree

3 files changed

+5
-389
lines changed

3 files changed

+5
-389
lines changed

devsimpy/DEVSKernel/BrokerDEVS/DEVSStreaming/SimStrategyMqttMS4Me.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ def _simulate_for_ms4me(self, T=1e8):
498498
while self.ts.Get() < T and not self._simulator.end_flag:
499499
iteration += 1
500500

501-
if tmin == float("inf"):
501+
if tmin == INFINITY:
502502
logger.info("No more events - simulation complete")
503503
break
504504
if tmin > T:
@@ -660,7 +660,7 @@ def _simulate_for_ms4me(self, T=1e8):
660660
for model in self._atomic_models:
661661
if model not in td_int and model not in td_ext:
662662
all_next_times.append(model.timeNext)
663-
tmin = min(all_next_times) if all_next_times else float("inf")
663+
tmin = min(all_next_times) if all_next_times else INFINITY
664664

665665
# Update progress
666666
cpu_time = time.time() - t_start

devsimpy/DEVSKernel/BrokerDEVS/simulation_config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def _get_default_port(broker_type: str) -> int:
217217

218218

219219
def auto_configure_simulation(
220-
standard: str = "ms4me",
220+
standard: str = "devs-streaming",
221221
broker: Optional[str] = None,
222222
host: Optional[str] = None,
223223
port: Optional[int] = None,
@@ -227,7 +227,7 @@ def auto_configure_simulation(
227227
Auto-configure simulation with sensible defaults.
228228
229229
Args:
230-
standard: Message standard to use (default: ms4me)
230+
standard: Message standard to use (default: devs-streaming)
231231
broker: Broker type (kafka, mqtt, rabbitmq)
232232
host: Broker host
233233
port: Broker port
@@ -245,7 +245,7 @@ def auto_configure_simulation(
245245
246246
# Fully manual
247247
config = auto_configure_simulation(
248-
standard='ms4me',
248+
standard='devs-streaming',
249249
broker='mqtt',
250250
host='broker.example.com',
251251
port=1883

0 commit comments

Comments
 (0)