Model setup |
||
Context: | load parameters | Parameters are loaded from the batch_parameters.xml file placed in the scenario folder |
Context: | create consumers create firms create banks create office for labor create office for statistics |
set consumer's identification number, age, student flag, initial level of education and productivity. set firm identification number, age and product absolute rank. set bank identification number. office for labor is created. set up for relative rank computation and data storage. |
Initial employment |
||
          Consumers: | sendInitialJobApplication() | Non students send a job application to a randomly chosen firms with probability 1-Context.probabilityToBeUnemployedAtTheBeginning. |
          Firm: | setInitialWorkers() | All the received job applications are accepted, the sum of workers' productivity is computed and the production is computed as a function of the sum of productivities. |
          Context: | remove firms with no workers | It may happen that a firm does not receive job applications. These firms are removed for the economy. |
Initial balance sheets | ||
          Consumers: | setupBankAccount() | Each consumer select randomly a number of banks equal to Context.numberOfBanksAConsumerCanBeCustumerOf and open a bank account in each of them. To set the amount of the bank account the code drawn a random integer from a uniform distribution U(Context.minConsumerInitialBankAccount,Context.maxConsumerInitialBankAccount). In case the figure is negative the amount is set to zero and the drawn number is assigned to the demandedCredit variable (it will managed when the bank account will be setup). Non negative number are assigner to the bank account amount. |
          Firms: | setupBankAccountInInitialization() | Each Firm setup its balance sheet ant thus determine the level of debt. Then, selects randomly a number of banks equal to Context.numberOfBanksAFirmCanBeCustumerOf and open a bank account in each of them. The amount of the bank account is set to zero (will be assigned in the next step when the bank balance sheet will be initialized), but the variable demandedCredit is set to the debt divided by the number of banks the firm is customer of. |
          Banks: | ComputeDemandedCredit() computeDeposits() setupBalance() computeBalanceVariables() |
sum of credit asked by firms and households sum of the bank accounts with positive amounts setup bank balance sheet and resize deposits deposits=sum of positive bank accounts; loans=sum of negative bank accounts |
check balance sheet consistency | ||
          Consumers: | computeWealth() | compute the sum of the bank accounts |
          Firms: | computeSumOfBankAccounts() | compute the sum of the bank accounts |
          Context | sum wealth of all consumers (A) sum bank accounts of all firms (B) sum the equity of all banks (C) |
check that A + B = -C |
Load agents |
||
OfficeForStatistics: | loadAgents() | fill OfficeForStatistics lists with collections of agents retrieved from the context. |
Back to home