{"id":17358685,"url":"https://github.com/babak2/haamos","last_synced_at":"2025-04-15T00:11:01.417Z","repository":{"id":172295944,"uuid":"649017533","full_name":"babak2/HAAMoS","owner":"babak2","description":"Hybrid Aggregated Agent‐based Microsimulation of Segregation","archived":false,"fork":false,"pushed_at":"2023-11-10T12:30:34.000Z","size":14242,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T12:11:09.935Z","etag":null,"topics":["agent-based-computational-demography","agent-based-microsimulation","agent-based-modeling","agent-based-simulation","artificial-society","complex-systems","ehtnic-mosaic-pattern-simulator","geographically-referenced-social-simulation","housing-vacancy-effects","hybrid-modeling","java","multi-scaled-modeling","neighborhood-effects","population-dynamics","residential-segregation","segregation-measures","social-simulation","sociospatial-segregation-model","spatial-modeling","urban-modelling"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/babak2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-03T14:11:39.000Z","updated_at":"2024-01-13T22:58:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1de391e-9bcb-45fd-bb20-69d7b605bc1c","html_url":"https://github.com/babak2/HAAMoS","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"e2668246d007bdb1d3bbe45be47e3ab73742548e"},"previous_names":["babak2/haamos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FHAAMoS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FHAAMoS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FHAAMoS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babak2%2FHAAMoS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babak2","download_url":"https://codeload.github.com/babak2/HAAMoS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248981270,"owners_count":21193147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-based-computational-demography","agent-based-microsimulation","agent-based-modeling","agent-based-simulation","artificial-society","complex-systems","ehtnic-mosaic-pattern-simulator","geographically-referenced-social-simulation","housing-vacancy-effects","hybrid-modeling","java","multi-scaled-modeling","neighborhood-effects","population-dynamics","residential-segregation","segregation-measures","social-simulation","sociospatial-segregation-model","spatial-modeling","urban-modelling"],"created_at":"2024-10-15T19:06:31.721Z","updated_at":"2025-04-15T00:11:01.397Z","avatar_url":"https://github.com/babak2.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hybrid Aggregated Agent‐based Microsimulation of Segregation (HAAMoS)\n\nThis is the code for the HAAMoS (Hybrid Aggregated Agent‐based Microsimulation of Segregation) model.\n\nHAAMoS is a data-driven, multifactor, multiscale, multi-measure agent-based microsimulation model for investigating various scenarios related to the effects of population mobility, housing vacancy, individual preferences \u0026 behaviours, and economic factors on ethnic residential segregation.\n\n![HAAMoS Hybrid Model](./Images/HAAMoS.png)\n\nThe scenarios are applied to the multi-ethnic population of the Auckland metropolitan area, encompassing four significant ethnic groups. Population mobility, driven by empirical data, is generated from geographical census-based area units. However, the majority of analyses are concentrated within the five most densely populated territorial authorities of the central Auckland region.\n\nWhile the Auckland region serves as a case study to investigate residential segregation dynamics and ethnic mosaic patterns, the model's versatility allows its application to any urban area. To adapt the model to a different urban area, one would need the corresponding shapefile, GAL file, and other relevant empirical data.\n\nOne notable feature of this hybrid approach, which combines agent-based modelling (ABM) and Microsimulation (MSM) methodologies, is its ability to operate in both realistic, census-GIS-based environments and artificial grid-based settings.\n\nThe model can calculate the following segregation measures:\n\n- Entropy-based Information Theory Index (H)\n- Interaction Index (I.I\u003csub\u003exy\u003c/sub\u003e)\n- Isolation Index (I.I\u003csub\u003exx\u003c/sub\u003e)\n- Local Moran's I (LISA/ LMI)\n- Global Moran's I (GMI)\n- Location Quotient (LQ)\n- Plurality Index (PI)\n\nThe model can be used within the limited range of functionalities described in:  \n\n**_Using a Hybrid Model for Investigating Residential Segregation: An Empirical and Simulation-based Study_**\n\nand \n\n**_An agent-based microsimulation framework for investigating residential segregation using census data_**\n\nPlease note that the HAAMoS model was not initially developed with public usage in mind. Some concepts and features have been inherited and maintained from the initial prototypes (described in the thesis), and there might be instances where certain aspects are not fully functional within the HAAMoS model.\n\n## Model Requirements\n\nTo install and run the HAAMoS model, you need to install the following programs on your computer. \n\nYou can install Java before installing Eclipse. \n\nThe model was tested on the Windows operating system, but it should also work on other platforms such as Mac OS and Linux, as long as you download and install the compatible versions of the following programs. Additionally, you may need to adjust the paths to specific files in batch mode according to the syntax requirements of your operating system. Please note that the compatibility and installation instructions may vary depending on your specific operating system and software versions. It's recommended to refer to the documentation or guidelines provided with each program for detailed installation and configuration instructions.\n\n1)\tJava SDK 1.5 or higher\n2)\tEclipse 3.3 or higher\n3)\tRepastJ version 3.1\n4)  JFreeChart (used 1.0.13.jar) and JCommon (used 1.0.16.jar)\n\n## Setting up Repast in Eclipse\n\nTo import a Repast project into Eclipse, follow these instructions:\n\n1.\tOpen Eclipse\n2.\tClick File -\u003e import \n3.\tSelect General -\u003e Existing Projects into Workspace\n4.\tClick Next\n5.\tClick Browse (in front of the Select root directory radio button) \n6.\tSelect the root directory of the Repast folder\n7.\tSelect Copy projects into the workspace \n8.\tClick Finish\n\n## Setting up HAAMoS in Eclipse\n\nTo import the HAAMoS project into Eclipse, follow these instructions:\n\n1.\tOpen Eclipse (if not already)\n2.\tClick File -\u003e import \n3.\tSelect General -\u003e Existing Projects into Workspace\n4.\tClick Next\n5.\tClick Browse (in front of the Select root directory radio button) \n6.\tSelect the root directory of the HAAMoS folder\n7.\tSelect Copy projects into the workspace \n8.\tClick Finish\n\n## To run the HAAMoS model in Eclipse\n\nTo run the model follow these steps:\n\n- Initial Launch:\n\n    - If the launch configuration does not exist, select the HAAMoSModel.java file from the listing.\n    - Right-click on the file and choose \"Run As \u003e Java Application\" from the pop-up menu.\n    - This will create a launch configuration item, allowing you to directly use the run button or menu in the future.\n\n- Launch Configuration:\n\n    - Beside the run button in the Eclipse toolbar (green arrow resembling a VCR play button), locate a black arrow pointing down.\n    - Click on the black arrow and select the launch configuration \"1 HAAMoSModel.\"\n\n- Model Execution:\n\n    - Once the HAAMoS model is launched, you can utilize the model toolbar for execution.\n    - The model toolbar includes control buttons such as 'Load model', 'Multi-runs start','Start', 'Step', 'Initialize', 'Stop', 'Pause', 'Setup', and 'Exit'.\n    - Notably, the multi-runs function enables batch runs by loading a prewritten parameter file.\n\n\nAdditional Configuration (Batch Mode):\n\n- Batch Mode Setting:\n    - If running the model in batch mode, ensure that the BatchMode parameter in the Const class is set to \"true.\"\n    - If not running in batch mode, set it to \"false\" (BatchMode = false).\n\n- Shapefile Configuration:\n    - In batch mode, correctly set the shapefile name and its path using the BatchModeFilenamePath parameter.\n\n- Environment Settings:\n    - If using an artificial environment (e.g., Schelling or Fossett shapefile), set the DefaultRadiusSizeOfGroupPopIndicator parameter to 0.009f.\n    - For a more realistic mode, set it to 0.004 for better display results.\n\n- Immigration Configuration:\n    - When immigration is used, set the FlowInImm parameter to a value greater than 0 in both batch and normal modes.\n\n- Census-based Immigration:\n    - Set the CensusBasedFlowInImmigration parameter to either \"true\" or \"false\" based on your preference.\n    - If set to \"true,\" the model will utilize census values and functions with census vacancy rates.\n    - If set to \"false,\" you can specify your value using the FlowInImm parameter.\n\nMake sure to adjust these parameters in the Const class of the HAAMoS model to suit your desired settings and then execute the model accordingly.\n\n## To increase the heap size for running simulations in Eclipse\n\n\n- Right-click on the HAAMoSModel.java file in the Eclipse Package Explorer to open the pop-up menu.\n\n- From the pop-up menu, select \"Run As\" and then choose the \"Open Run Dialog...\" option.\n\n![Open Run Dialog](./Images/open-run-dialog.png)\n\n- This will open the Run Configurations dialog box.\n\n- In the Run Configurations dialog box, locate the \"VM arguments\" section.\n\n- In the VM arguments field, add the following argument to increase the maximum heap size:\n    -Xmx\u003cmaximum heap size\u003e\n\n- For example, to set the maximum heap size to 500 Megabytes, use -Xmx500M.\n\n![Heap size increase in VM Arguments](./Images/vm-argument.png)\n\n- After setting the desired maximum heap size, click the \"Apply\" button to save the changes.\n\n- Click the \"Run\" button to launch the simulation with the increased heap size.\n\nBy increasing the heap size, you allocate more memory to the Java runtime, which can help prevent Java \"Out Of Memory Error\" messages during the execution of scenarios.\n\n\n## License\n\nThe HAAMoS model is licensed under the GNU GENERAL PUBLIC LICENSE. See LICENSE for more information.\n\n\n## Author \n\nBabak Mahdavi Ardestani\n\nbabak.m.ardestani@gmail.com\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabak2%2Fhaamos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabak2%2Fhaamos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabak2%2Fhaamos/lists"}