Chapter 1 Getting Started
This chapter will help you get up and running with the ASA ABM v2 simulation framework.
1.1 System Requirements
1.2 Installation
1.3 Quick Start Guide
1.3.2 Customized Simulation
To run a simulation with custom parameters:
# Define custom parameters
my_params <- list(
growth_rate = 0.05, # 5% growth per hiring cycle
hiring_frequency = 4, # Hire every 4 weeks
selection_criteria = "fit", # Select based on org fit
turnover_threshold = -5 # Leave if satisfaction < -5
)
# Run simulation
results <- run_asa_simulation(
n_steps = 520,
initial_size = 50,
params = my_params,
verbose = TRUE
)
1.3.3 Analyzing Results
The simulation returns a list containing:
# Access different components
results$final_organization # Final state of all agents
results$metrics # Time series of organizational metrics
results$parameters # Parameters used in simulation
# Basic analysis
library(ggplot2)
# Plot organization size over time
ggplot(results$metrics, aes(x = time, y = size)) +
geom_line() +
labs(title = "Organization Growth",
x = "Time Step",
y = "Number of Employees")
1.4 File Structure
Understanding the project structure:
asa_abm_v2/
├── core/ # Core modules
│ ├── organization.R # Organization functions
│ ├── agent.R # Agent/applicant functions
│ └── interactions.R # Interaction mechanisms
├── simulation/ # Simulation components
│ ├── engine.R # Main simulation loop
│ ├── hiring.R # Recruitment logic
│ └── turnover.R # Attrition logic
├── analysis/ # Analysis tools
├── tests/ # Unit tests
├── docs/ # Documentation
├── data/ # Sample data and outputs
└── run_simulation.R # Example script
1.6 Troubleshooting
1.6.1 Common Issues
Issue: “could not find function” error
Issue: Package not found
Issue: Memory errors with large simulations
1.6.2 Getting Help
- Check the FAQ section
- Review the API Reference
- Submit issues on GitHub
- Contact the development team