import java.util.*; import java.io.*; import java.text.*; /******************************************************************** * Formation.java (version 1.0) written by Mark Rich * February 16th - April 26, 1999 @ University of Wisconsin - Madison * Copyright Mark Rich 1999 * * Updated October 23, 1999 * * This program is an implementation of a theory of * Political Party formation based on the interaction * of Voters and Representatives. For more on this * theory developed by Professor Charles Franklin and * Mark Rich, please see http://www.cs.wisc.edu/~richm/psci999/ * * For best results, pipe the output into a separate file, i.e. * * java Formation > results.txt * * This file is then easily processed by Matlab, Stata, Excel, etc * for your number crunching pleasure. The screen will update where * the simulation is every 10 years. Output from System.out follows * the following 10 column format: * SESSION DISTRICT CENTER CANDIDATES LAZINESS VOTES CENTRALTIY - * ELECTIONTYPE NUMBEROFONES PASCALSCALING ********************************************************************/ public class Formation { static final int TERMLIMIT = 30; static final int NUMOFDISTRICTS = 15; static final int VOTERSPERDISTRICT = 501; static final int POLICIES = 5; static final int POSITIONS = 9; static final int NUMOFBILLS = 19; static final int TAGLENGTH = 40; static final int SESSIONS = 2000; public static void main (String args[]){ System.err.println("Simulation in Progress..."); // Create a Congress Congress theHouse = new Congress(POLICIES, POSITIONS, NUMOFBILLS, TAGLENGTH); // Establish the districts and place them in the Population Vector Vector Population = new Vector(); for (int i=0; i