- Add time
spending-modelto agent.js decision:- update behavior.js with
decide_2method - agent should stop working when he used all the time
- add traits that make an agent decide whether he uses all his credit up or if he uses it during the month
- update behavior.js with
- Add
time-spendingto task.js- remove
update_value()method - remove
time_coins
- remove
π
-
Clone the model using the download button up there
βοΈ -
copy the path to your clipboard
-
open terminal on your computer π» (you can find the terminal in utilities folder π of your mac)
-
if you have
gitalready installed than skip to point iv, else download git here -
in the terminal type
$ cd pathTo/theDirectory # first we choose in which directory we want to save our model # it also possible to just type "cd" and drag and drop the folder # where you want the model to be saved onto the terminal $ git clone https://github.com/commoningtoys/Iris_Model.git # the url may change in the future therefore copy it # from the "clone or download" window on the github page
-
-
after that you need to download all the branches π
$ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/all-capitalist remotes/origin/all-curious remotes/origin/all-geniesser remotes/origin/all-perfectionist remotes/origin/master remotes/origin/minimum-wage remotes/origin/old-model # we need to create local branches that track also the remote branches # to do this we create new local branches with the name matching the remote branches # this is done by using the "git checkout" command followed by the branch name $ git checkout all-capitalist Branch 'all-capitalist' set up to track remote branch 'all-capitalist' from 'origin'. Switched to a new branch 'all-capitalist' # we need to do this for all the branches -
open the model with your favorite code editor
-
depending on the editor (VS Code and Atom have built in server) you may need to install MAMP
- if using MAMP make sure that the root folder is linked to the folder were your model is. To do this go to MAMP β‘οΈ preferences β‘οΈ web server and drag and drop the folder where the model is to the document root
-
open the browser and if using MAMP go to
localhost:8888, if using VS Code or Atom run the built in server. -
Now the model should be running on your browser BRAVO! ππ
-
to switch between the various settings of the model you will need to switch between different branches π. In the terminal use the followings commands
$ git checkout branch-name # available branches: # minimum-wage | this branch sets a minimum wage the agents # all-capitalist | a model with only capitalist agents # all-perfectionist | a model with only perfectionist agents # all-curious | a model with only curious agents # all-geniesser | a model with only geniesser agents # to see which branches are on your machine $ git branch all-capitalist all-curious all-geniesser all-perfectionist * master # the * tells you on which branch you are currently on minimum-wage old-model
-
refresh your browser to see the new model running