I'm wondering if any there is any interest in modifying the enhsim code to include a filter. The necessity of simulating 10k hours just to get a dps value - even for a highly non-linear system - pains my inner-engineer-dweeb greatly.
A process which I used several years ago in college is called a Kalman filter. Some examples can be found here:
Kalman Filtering and here:
Kalman filter - Wikipedia, the free encyclopedia
Basically, what it does is filters out noise either in measurement or system dynamics to rapidly hone in on an actual state. If the math is beyond you, take a look at the graphics from the first link. It is tracking a simulated object being hit with random, unknown accelerations of up to 0.5ft/s^2. It's then taking measurements of the object's position with a relatively HUGE uncertainty of +/- 10ft. Despite uncertainties in both measurement and dynamics, it hones in on the actual position and velocity within 7 seconds.
Looking through the algorithms is leading me to believe it could be implemented fairly simply. The "dynamics" of the system are very similar to the moving object in the sample code. Current position could be translated to current total damage, and velocity to dps. The dps could be seen as being subjected to a random, high magnitude "acceleration" - the RNG gods in action on the swings, bolts, and shocks. This is no different than the example code subjected the simulated object to.
The only catch to this is I don't think a simple Kalman filter can deal with the non-linearities which occur when flurry, heroism, speed pots, etc. turn on and off. A way around this would be to slightly change the way the dps is calculated. If you run a sim with, for example, all buffs (flurry, heroism, trinket procs, etc.) for a minute or two until the filter hones in on the actual values, and then repeat that for each linear combination of buff settings (e.g. flurry is active for this run, but heroism and all other proc buffs are off) you can get dps values for each state. If you then run the standard sim for maybe an hour or two to find out what percentage of the time each state is active, it's then just a case of multiplying the rates times the fractions to get a combined dps value, with a computation time of over 1000 times less.
Would trying to implement something like this be of interest? Assuming it works, it wouldn't be overly hard (it just takes some matrix algebra - the simulation the guy coded in the attached link is less than 100 lines in Matlab), but it would take some time. I'm willing to chip in some effort, but although I'm pretty good with Matlab or pseudocode, my C++ skills leave much to be desired.