The pseudo code has become proper code

First attempt at a function to assignt the total fluxes to the
simulated populations