Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.
/ SocialSystems.jl Public archive

Models of humans' social interaction with Statistical Physics, Bayesian Methods and Information Theory

License

Notifications You must be signed in to change notification settings

lssimoes/SocialSystems.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Systems - Statistical Mechanics

Simple modelling of some types of social systems using Statistical Mechanis and MCMC Simulations.

Install the package running:

julia> Pkg.clone("https://github.com/kaslusimoes/SocialSystems.jl.git")

A simple example

We define a BasicSociety and perform MCMC until equilibration around an issue. After that, we can verify the magnetization of the society is stabilized.

julia> using SocialSystems, Plots

julia> N   = 100
julia> ρ   = 0.2
julia> ε   = 0.1

julia> soc     = BasicSociety(n, ρ, ε)
julia> iter, x = metropolis!(soc, β=15.)

julia> nsteps = 100
julia> mi = zeros(nsteps)
julia> for i in 1:nsteps
            metropolisStep!(soc, x, 15.);
            mi[i] = magnetization(soc, x)        
       end
       
julia> plot(1:nsteps, mi, title = "Magnetization after thermoequilibration")

magnetization-example

About

Models of humans' social interaction with Statistical Physics, Bayesian Methods and Information Theory

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages