>There is something loosely similar to what you need in the ODE packages. >This kind of algorithms also need some information to be provided back to >users during the algorithm run. For ODE solvers, it is at the end of each >integration step.
>We have set this with a StepHandler interface. If the user wants to get this >information, he implements this interface and provide an instance to the ODE >solver by calling addStepHandler() before >starting the integration. During >the integration, the handleStep() method of his instance will be automatically >called at each step. >This is not intended to be a general facility. It is devoted to the case of >ODE and is in fact a very important part of ODE. >So there is something existing in commons-math. Perhaps you could design a >similar set of features for optimization with a IterationHandler interface ? >In the case of ODE, we found a general enough >interface that could be used >for any type of solver (i.e. if the user switches from a Dormand-Prince 8(5,3) >solver to a Gragg-Bulirsch-Stoer, he would not change his step handler >implementation). I'm >not sure this would be as general with optimizers but it >may be worth trying to go this way. What I had in mind was quite similar, a callback interface and a function very similar to addStepHandler() in the ODE case. My "StepHandler" interface was rejected because it was specific to CMA-ES. By the way, looking at the trunk it seems in ODE the thing was renamed to "EventHandler". The question now is: Is such an event framework useful in general for optimization or is it specific for CMA-ES? Is there a generic "EventState" for optimization as it is for ODE? Should we proceed with the review of the current implementation without the event handling in place or should we defer it until the event discussion Is finished? The current state is: There is a patch prepared which at the moment is reviewed by Nikolaus. Currently there is a code filter in place, so no event related code would be part of the patch but nevertheless it is available for Nikolaus and me to verify and test the algo. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org