btelles / simjs-updated

A general-purpose Discrete Event Simulation library written entirely in JavaScript
http://www.simjs.com
MIT License
35 stars 10 forks source link

Simulator doesn't supply timestamp argument when calling finalize() #3

Open johnyesberg opened 5 years ago

johnyesberg commented 5 years ago

The classes Queue, Facility, TimeStamp, and Population have default finalize methods which expect a timestamp argument. Queue, Facility, and TimeStamp finalize methods all use argCheck to confirm that the argument is present. When the simulator finishes and calls finalize(), it calls finalize on all entities, but doesn't pass the timestamp argument.

I can override the finalize() method to avoid argCheck errors.