CASH TRANSACTIONS, PAYMENTS, AND INTEREST RATE ADJUSTMENTS: ONE STEP                                

L.act
  wealth = wage + interest + savings
† offer: to buy CG to CGMarket               consumption = wealth*(1 - min(r*CAPITAL_LIFE, 1))
  offer: to sell L to LMarket                

CFirm.act
  offer: to sell C to CMarket                uses capitalPrice from previous step
  offer: to buy L to LMarket                 uses smoothed CFirm.balance

CGFirm.act
  income = revenue + interest                (uses savedRevenue and savedInterest)
  pay: CGFirm → B  (loan payment)            
  pay: B → CFirm  (new loan for machine)    
  offer: to sell CG to CGMarket
* offer: to buy C to CMarket                 desiredCapital = f(r)*(1-β)*income
                                                              but buy only if supplyOfLoans is adequate 
* offer: to buy L to LMarket                 wageBudget = remainder of income
       
LMarket.clear
  pay: CGFirm → L                            
  pay: CFirm → L                            
  save L wage
  pay: B → L  (collect interest from B)                 

CMarket.clear 
  save demandForLoans

CGMarket.clear
  pay: L → CGFirm                            
  save CGFirm revenue

dumpData.act
    
B.act
  pay: CGFirm ↔ B  (interest: CGFirm)        
  pay: CFirm ↔ B  (interest: CFirm)        
  pay: CFirm ↔ B  (interest: L)        
  save supplyOfLoans = total L balances - total outstanding loans (for use in CGFirm)adjust: r  (uses demandForLoans - supplyOfLoans) 
  save savedWage  (from accts' wage)
  save savedInterest  (from accts' interest)
  save savedRevenue  (from accts' revenue)

Economy.act, send of step
   updateAvgWage & smoothedAvgWage
   updateCPI & smoothedCPI
   updateInflation & smoothedInflation
   updateLoanIR & smoothedLoanIR
   Bank.updateSubAccounts: interest, revenue, payments
----------------------------------------------------------------------------------------------------
C = Capital
L = Labor
CG = ConsumerGood
B = Bank
r = interest rate
* = labor/capital split
† = consume/save split
‡ = interest rate adjustment

red = actions