title: Add a global to the value of the previous tick, every tick
body: <p>I am working on a project that requires me to divide subsidies. I got two breeds, industries and the port. Now, I would like that each tick adds the subsidy to the previous amount instead of just picking the value of that particular tick. I got this: </p>
  
  <pre><code>to go
      if file-at-end? [ stop ]
    file-open "oil price.csv"
    set oil-price csv:from-row file-read-line
    file-open "co2 price.csv"
    set co2-price csv:from-row file-read-line
    file-open "electricity price.csv"
    set electricity-price csv:from-row file-read-line
    ;; model update goes here
    distribute-subsidies
    ask industries [update-profit]
  if ticks &gt;= 32 [stop]
    tick
  end
  
  to distribute-subsidies
   ask industries [set subsidy-industry (15000000 - 150000 * subsidy-to-port) / 25]
   ask ports [set subsidy-port 150000 * subsidy-to-port]
  end
  </code></pre>
  
  <p>All help is welcome! Thanks in advance:)</p>
  
  <p>Max</p>