simdart 0.3.0 copy "simdart: ^0.3.0" to clipboard
simdart: ^0.3.0 copied to clipboard

A discrete event simulation package for Dart, designed for modeling and analyzing processes and systems.

example/example.dart

import 'package:simdart/simdart.dart';

void main() async {
  final SimDart sim = SimDart(observer: ConsoleEventObserver());

  sim.process(event: _eventA, name: 'A');

  SimResult result = await sim.run();

  print('startTime: ${result.startTime}');
  print('duration: ${result.duration}');
}

Future<void> _eventA(SimContext context) async {
  await context.wait(2);
  context.process(event: _eventB, delay: 2, name: 'B');
}

Future<void> _eventB(SimContext context) async {}
1
likes
160
points
31
downloads

Publisher

verified publishercaduandrade.net

Weekly Downloads

A discrete event simulation package for Dart, designed for modeling and analyzing processes and systems.

Repository (GitHub)

Topics

#system-analysis #event-driven #simulation #discrete-event-simulation

Documentation

API reference

License

MIT (license)

Dependencies

collection, meta

More

Packages that depend on simdart