Skip to content

Commit f4e261d

Browse files
committed
Formatting.
1 parent 1db504e commit f4e261d

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

lib/src/internal/event_action.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class EventAction extends TimeAction implements EventContext {
2525
final String? _eventName;
2626
String get eventName => _eventName ?? hashCode.toString();
2727

28-
2928
/// The event to be executed.
3029
final Event event;
3130

@@ -57,8 +56,6 @@ class EventAction extends TimeAction implements EventContext {
5756
void execute() {
5857
final Function()? resume = _resume;
5958

60-
61-
6259
if (resume != null) {
6360
if (_sim.includeTracks) {
6461
SimDartHelper.addSimulationTrack(

lib/src/internal/sim_configuration_interface.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import 'package:meta/meta.dart';
22
import 'package:simdart/src/execution_priority.dart';
33
import 'package:simdart/src/start_time_handling.dart';
44

5-
65
@internal
76
abstract interface class SimConfigurationInterface {
87
/// Specifies how the simulation handles start times in the past.
@@ -24,7 +23,4 @@ abstract interface class SimConfigurationInterface {
2423
///
2524
/// Default: `false`
2625
bool get includeTracks;
27-
28-
29-
3026
}

lib/src/internal/sim_result_interface.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:meta/meta.dart';
33
/// Represents the simulation result.
44
@internal
55
abstract interface class SimResultInterface {
6-
76
/// The time, in simulated time units, when the simulation started.
87
/// This is the moment at which the first event is scheduled to be processed.
98
///

lib/src/internal/time_loop.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@ import 'package:simdart/src/start_time_handling.dart';
1313

1414
/// Represents the temporal loop in the algorithm, managing the execution of actions at specified times.
1515
@internal
16-
class TimeLoop implements SimConfigurationInterface,NowInterface,SimResultInterface {
16+
class TimeLoop
17+
implements SimConfigurationInterface, NowInterface, SimResultInterface {
1718
TimeLoop(
1819
{required int? now,
1920
required this.beforeRun,
20-
required this.includeTracks,
21+
required this.includeTracks,
2122
required this.executionPriority,
2223
required this.startTimeHandling}) {
2324
_now = now ?? 0;
@@ -35,7 +36,7 @@ class TimeLoop implements SimConfigurationInterface,NowInterface,SimResultInterf
3536
final Function beforeRun;
3637

3738
@override
38-
final bool includeTracks;
39+
final bool includeTracks;
3940

4041
/// Queue that holds the [TimeAction] instances to be executed at their respective times.
4142
final PriorityQueue<TimeAction> _actions = PriorityQueue<TimeAction>(
@@ -98,7 +99,7 @@ class TimeLoop implements SimConfigurationInterface,NowInterface,SimResultInterf
9899
return _buildResult();
99100
}
100101

101-
SimResult _buildResult(){
102+
SimResult _buildResult() {
102103
return SimResult(startTime: startTime, duration: duration, tracks: _tracks);
103104
}
104105

@@ -120,7 +121,7 @@ class TimeLoop implements SimConfigurationInterface,NowInterface,SimResultInterf
120121
_actions.add(action);
121122
}
122123

123-
void addTrack(SimulationTrack track){
124+
void addTrack(SimulationTrack track) {
124125
_tracks ??= [];
125126
_tracks!.add(track);
126127
}

lib/src/simdart.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ import 'package:simdart/src/simulation_track.dart';
2020
import 'package:simdart/src/start_time_handling.dart';
2121

2222
/// Represents a discrete-event simulation engine.
23-
class SimDart implements SimConfigurationInterface, EventSchedulerInterface,NowInterface {
23+
class SimDart
24+
implements
25+
SimConfigurationInterface,
26+
EventSchedulerInterface,
27+
NowInterface {
2428
/// Creates a simulation instance.
2529
///
2630
/// - [now]: The starting time of the simulation. Defaults to `0` if null.
@@ -43,10 +47,10 @@ class SimDart implements SimConfigurationInterface, EventSchedulerInterface,NowI
4347
{StartTimeHandling startTimeHandling = StartTimeHandling.throwErrorIfPast,
4448
int? now,
4549
this.secondarySortByName = false,
46-
this.includeTracks=false,
50+
this.includeTracks = false,
4751
ExecutionPriority executionPriority = ExecutionPriority.high,
4852
int? seed})
49-
: random = Random(seed) {
53+
: random = Random(seed) {
5054
_loop = TimeLoop(
5155
now: now,
5256
includeTracks: includeTracks,
@@ -204,7 +208,6 @@ class SimDart implements SimConfigurationInterface, EventSchedulerInterface,NowI
204208
@override
205209
int get now => _loop.now;
206210

207-
208211
@override
209212
StartTimeHandling get startTimeHandling => _loop.startTimeHandling;
210213
}

0 commit comments

Comments
 (0)