public void performEvent(SimulationEvent reaction, int times) {
        String initState = reaction.getInitialState().getStateName();
        String finalState= reaction.getFinalState().getStateName();
        
        if ( (initState.equals(states[0].getStateName())) &&
             (finalState.equals(states[1].getStateName())) ) {
            // S to I
            infectSome(times);
            
        } else if ( (initState.equals(states[1].getStateName())) &&
                    (finalState.equals(states[2].getStateName()))  ) {
            // I to R
            recoverSome(times);
           
        } else {
            log.error("BasicSIR - unperformable event "+initState+" to "+finalState);
        }
    }