added prototype (undebugged) for calculating agent inventories over time
fixed syntax bugs