Comments (9)
Good catch @matthewsowders !
@pierrelecuyer: Do you know why it is coded this way? We can call init()
earlier, so the evlist
won't be emptied. However, the old eventList
will be emptied.
public void init (EventList evlist) {
if (evlist == null)
throw new NullPointerException();
init();
eventList = evlist;
Otherwise, we'll have to remove that sentence from the javadoc.
from ssj.
@matthewsowders : Could you describe/explain the reason you would need to initialize the simulator with a non-empty event list (instead of adding the events after initialization)?
We are trying to assess the need to allow init
to keep a non-empty event list, because the events can be added after the initialization. We could create a new method that would allow the user to replace the event list.
from ssj.
I would like to run simulations that will run for 12 hours or more. I would like to make the system fault tolerant so I'd like to be able to serialize the state of the simulator (time, event data and schedule) at certain events. I would store the intermediate state in some service like S3 and use SimpleWorkflowService to manage the long running process that way if the simulation fails 11 hours into a 12 hour simulation, I can take the most recent state and continue the simulation from that point. I've attached some sample code. Let me know if I'm trying to do this a dumb way.
from ssj.
from ssj.
from ssj.
pierrelecuyer@
It could be made as an extension point such that the client is responsible for passing in a serializer/deserializer (I used jackson, but other users might want java serialization or something else). Then again, it was easy to write so maybe it is best left out of the simulation package. Maybe it would be better as an extension package outside SSJ, something like SSJ-serialization. Do you think it will be useful to others?
from ssj.
from ssj.
I have corrected the javadoc: 2d82af5
It now states that the event list evlist
will be cleared. If the user wants to initialize with a non-empty list, then he can extend the class Simulator
and implement his initialization method.
There are many ways to manage serialization, and it is likely implementation dependent. It is best left for advanced user to extend the Simulator, which is not too difficult as shown by @matthewsowders.
from ssj.
Thanks to both of you for looking into this!
from ssj.
Related Issues (9)
- Evaluate the spline function using knots and control points at a given point in time HOT 5
- Parameters estimation for generalized Pareto distribution HOT 2
- Download links on the web page should point to the binaries HOT 5
- Add link to the PDF documentation in the User's Guide HOT 1
- Possible issue in umontreal.ssj.functionfit.BSpline HOT 9
- Bug in DEDerivativeGaussian
- Compilation broken on fresh install in Linux HOT 2
- Remove static Entry in SplayTree, RedblackTree, ... HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ssj.