-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deffuant: Move initialize_agents from constructor
We now call initialize_agents for the Deffuant model out of the constructor, so that we can pass it the dimensions for the DeffuantVector model Co-authored-by: Moritz Sallermann <[email protected]>
- Loading branch information
1 parent
0014712
commit 8940c15
Showing
5 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
[simulation] | ||
model = "Deffuant" | ||
# rng_seed = 120 # Leaving this empty will pick a random seed | ||
|
||
[io] | ||
# n_output_network = 20 # Write the network every 20 iterations | ||
n_output_agents = 1 # Write the opinions of agents after every iteration | ||
print_progress = true # Print the iteration time ; if not set, then does not prints | ||
output_initial = true # Print the initial opinions and network file from step 0. If not set, this is true by default. | ||
start_output = 1 # Start writing out opinions and/or network files from this iteration. If not set, this is 1. | ||
|
||
[model] | ||
max_iterations = 1000 # If not set, max iterations is infinite | ||
|
||
[Deffuant] | ||
homophily_threshold = 0.2 # d in the paper; agents interact if difference in opinion is less than this value | ||
mu = 0.5 # convergence parameter; similar to social interaction strength K (0,0.5] | ||
use_network = false # If true, will use a square lattice Will throw if sqrt(n_agents) is not an integer | ||
binary_vector = true # If true, this will be the multi-dimensional binary vector Deffuant model | ||
dim = 5 # For the multi-dimensional binary vector Deffuant model, define the number of dimensions in each opinion vector | ||
|
||
[network] | ||
number_of_agents = 1000 | ||
connections_per_agent = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters