Class SocietySimulation

java.lang.Object
org.episteme.social.sociology.SocietySimulation
All Implemented Interfaces:
Serializable

public class SocietySimulation extends Object implements Serializable
A high-level simulator for sociological processes within a society. Integrates social networks, opinion dynamics, and economic factors. This class provides a framework for running agent-based simulations (ABS) where persons interact, exchange opinions, and evolve socially. Modernized to use Real for internal continuous values and provide double for output.
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
See Also:
  • Constructor Details

    • SocietySimulation

      public SocietySimulation(Society society)
      Creates a new simulation for the given society. Starts with a default social network and neutral opinions.
      Parameters:
      society - the society to simulate
    • SocietySimulation

      public SocietySimulation(Society society, SocietySimulation.Config config)
      Creates a simulation with specific configuration.
      Parameters:
      society - the society to simulate
      config - simulation parameters
  • Method Details

    • advance

      public void advance()
      Advances the simulation by one time step.
    • holdElection

      public List<String> holdElection(String title, List<String> candidates, VotingMethod method)
      Simulates an election based on the current opinions of the society members. Each person votes for candidates based on ideological distance to their current opinion.
      Parameters:
      title - the election title
      candidates - list of candidate names
      method - the voting method to use
      Returns:
      the list of winners
    • getCurrentStep

      public long getCurrentStep()
    • getGlobalStability

      public double getGlobalStability()
    • getNetwork

      public SocialNetwork getNetwork()
    • getOpinions

      public Map<Person,Real> getOpinions()
    • toString

      public String toString()
      Overrides:
      toString in class Object