simdart 0.2.0 copy "simdart: ^0.2.0" to clipboard
simdart: ^0.2.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(includeTracks: true);

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

  SimResult result = await sim.run();

  result.tracks?.forEach((track) => print(track));
  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
0
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)
View/report issues

Topics

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

License

unknown (license)

Dependencies

collection, meta

More

Packages that depend on simdart