function rxgp = save_rxngrp_data(rxgp, times_rxns_executed, stoch_algor);

num_rxns = length(rxgp.rxn);
for j = 1:num_rxns
    rxgp.rxn{j}.ai_prev = rxgp.rxn{j}.ai;
    if stoch_algor == 1
        rxgp.rxn{j}.time_prev = rxgp.rxn{j}.time;
    end
end
rxgp.times_rxns_executed = rxgp.times_rxns_executed + times_rxns_executed;

