def ontrial(self, model, simulation, trial, value, engine):
        '''
            called when we have some new data to play into the model.
            each call is an event

            value : float

                sample from model
            
        '''
        #print simulation, trial, value
        # evaluation the model step.
        self.r[simulation,trial] = self.r[simulation,trial-1] + self.k*(self.theta-self.r[simulation,trial-1])*self.dt + self.beta*sqrt(self.dt)*value;

            called when we have some new data to play into the model.
            each call is an event

            value : float

                sample from model
            
        
recipes/Python/578867_Monte_Carlo_Engine__Stochastic_Interest_Rate/recipe-578867.py