Building simulation network

Posted by Sergei Chedrin on
URL: http://quantlib.414.s1.nabble.com/Building-simulation-network-tp5253.html

I'm a new QuantLib user and need some clarification.
Both question are regarding building simulation network based on Observable/Observer paradigm.

1. In simulation application Observer::update() should be called when all (!) it's Observables have been re-calculated.
Usually there are more than 1 underlying element which should be calculated before derivative calculation.
Should developer implement synchronization in Observer::update() himself or can be used some QuantLib pattern?

2. This questions is regarding implementation of simulation systems with a lot of simulation elements.

Observable::notifyObservers() (looping all Observers) calls their Observer::update()
which calls (being Observable itself) Observable::notifyObservers() ...

Finally, this huge chain of calls comes from function Observer::update() of the first object initiated it.
This can be a cause of "StackOverflow" problem.

Thanks

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users