-
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.
DeffuantVectorModel: Removed hardcoded dim
The user can now enter the dimensions for the DeffuantVectorModel. Additionally, ConfigParser also checks to make sure that the user-defined dim=1, if the basic Deffuant model is being used. We also added a test for the DeffuantVectorModel. Co-authored-by: Moritz Sallermann <[email protected]>
- Loading branch information
1 parent
8940c15
commit 514215c
Showing
11 changed files
with
109 additions
and
11 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
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
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
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 = false # 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 = 10 # If not set, max iterations is infinite | ||
|
||
[Deffuant] | ||
homophily_threshold = 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 = 3 # For the multi-dimensional binary vector Deffuant model, define the number of dimensions in each opinion vector | ||
|
||
[network] | ||
number_of_agents = 2 | ||
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