[virtualcommons-svn] SF.net SVN: virtualcommons:[291] irrigation/trunk
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2009-10-09 06:26:49
|
Revision: 291 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=291&view=rev Author: alllee Date: 2009-10-09 06:26:41 +0000 (Fri, 09 Oct 2009) Log Message: ----------- updated configuration files, fixing build / deployment process Modified Paths: -------------- irrigation/trunk/build.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round0.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round1.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round10.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round11.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round12.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round13.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round14.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round15.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round16.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round17.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round18.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round19.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round2.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round20.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round21.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round3.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round4.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round5.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round6.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round7.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round8.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round9.xml Added Paths: ----------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java Removed Paths: ------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitator.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitatorWindow.java Modified: irrigation/trunk/build.xml =================================================================== --- irrigation/trunk/build.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/build.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -67,7 +67,6 @@ <!-- default web & deployment properties --> <property name='web.dir' value='src/main/webapp'/> <property name='server.port' value='16001'/> - <property name='server.xml' value='server.xml'/> <property name='codebase.url' value='http://${server.address}/${ant.project.name}'/> <property name='client.class' value='edu.asu.commons.irrigation.client.IrrigationClient'/> <property name='facilitator.class' value='edu.asu.commons.irrigation.facilitator.Facilitator'/> @@ -145,7 +144,7 @@ </fileset> </copy> <!-- copy images --> - <copy todir='${deploy.dir}/images' overwrite='true'> + <copy todir='${deploy.dir}/images' overwrite='true' failonerror='false'> <fileset dir='${resources.dir}/images'/> </copy> <!-- @@ -248,10 +247,7 @@ <compilerarg value='-Xlint:unchecked'/> <classpath refid="project.classpath" /> </javac> - <copy todir='${build.dir}/data'> - <fileset dir='${resources.dir}/data'/> - </copy> - <copy todir='${build.dir}/images'> + <copy todir='${build.dir}/images' failonerror='false'> <fileset dir='${resources.dir}/images'/> </copy> </target> Copied: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java (from rev 290, irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitator.java) =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java (rev 0) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/Facilitator.java 2009-10-09 06:26:41 UTC (rev 291) @@ -0,0 +1,259 @@ +package edu.asu.commons.irrigation.facilitator; + +import java.awt.Dimension; +import java.net.InetSocketAddress; + +import javax.swing.JFrame; +import javax.swing.SwingUtilities; + +import edu.asu.commons.event.BeginExperimentRequest; +import edu.asu.commons.event.BeginRoundRequest; +import edu.asu.commons.event.ConfigurationEvent; +import edu.asu.commons.event.EndRoundRequest; +import edu.asu.commons.event.Event; +import edu.asu.commons.event.EventTypeChannel; +import edu.asu.commons.event.EventTypeProcessor; +import edu.asu.commons.event.FacilitatorRegistrationRequest; +import edu.asu.commons.irrigation.conf.RoundConfiguration; +import edu.asu.commons.irrigation.conf.ServerConfiguration; +import edu.asu.commons.irrigation.events.FacilitatorEndRoundEvent; +import edu.asu.commons.irrigation.events.ServerGameStateEvent; +import edu.asu.commons.irrigation.server.ServerDataModel; +import edu.asu.commons.net.ClientDispatcher; +import edu.asu.commons.net.DispatcherFactory; +import edu.asu.commons.net.Identifier; + +/** + * @author Sanket + * + */ +public class Facilitator { + + private final static Facilitator INSTANCE = new Facilitator(); + + private Identifier id; // @jve:decl-index=0: + + private ClientDispatcher dispatcher; + + private ServerConfiguration configuration; + + private ServerDataModel serverGameState; // @jve:decl-index=0: + + private FacilitatorWindow irrigationFacilitatorWindow; + + private boolean stopExperiment = false; + + private boolean experimentRunning = false; + + private final EventTypeChannel channel = new EventTypeChannel(); + + private Facilitator() { + this(new ServerConfiguration()); + } + + public Facilitator(ServerConfiguration configuration) { + dispatcher = DispatcherFactory.getInstance().createClientDispatcher(channel); + setConfiguration(configuration); + initializeEventProcessors(); + } + + @SuppressWarnings("unchecked") + private void initializeEventProcessors() { + channel.add(new EventTypeProcessor<ConfigurationEvent>(ConfigurationEvent.class) { + public void handle(ConfigurationEvent configurationEvent) { + setConfiguration((ServerConfiguration) configurationEvent.getConfiguration()); + } + }); + channel.add(new EventTypeProcessor<FacilitatorEndRoundEvent>(FacilitatorEndRoundEvent.class) { + public void handle(FacilitatorEndRoundEvent event) { +// serverGameState = null; + irrigationFacilitatorWindow.endRound(event); + configuration.nextRound(); + } + }); + } + + public static Facilitator getInstance(){ + return INSTANCE; + } + + public void setConfiguration(ServerConfiguration configuration) { + if (configuration == null) { + System.err.println("attempt to setConfiguration with null, ignoring"); + return; + } + else { + this.configuration = configuration; + } + } + + /** + * @param args + */ + + /* + * Connects facilitator to the server and registers with the server as a facilitator. + * + * If the connection was successful, configures the FacilitatorWindow to manage experiments, + * otherwise configures the FacilitatorWindow to replay experiments and view configuration + * for those experiments. + */ + public void connect() { + connect(configuration.getServerAddress()); + } + + public void connect(InetSocketAddress address) { + id = dispatcher.connect(address); + if (id != null) { + transmit(new FacilitatorRegistrationRequest(id)); + } + + } + + void createFacilitatorWindow(Dimension dimension) { + irrigationFacilitatorWindow = new FacilitatorWindow(dimension, this); + //if (id == null) { + // configure for unconnected functionality + // facilitatorWindow.configureForReplay(); + //} + } + + /* + * Sends requests to the server + */ + public void transmit(Event event) { + dispatcher.transmit(event); + } + + public static void main(String[] args) { + + Runnable createGuiRunnable = new Runnable(){ + public void run() { + // TODO Auto-generated method stub + Dimension dimension = new Dimension(500, 600); + Facilitator facilitator = Facilitator.getInstance(); + facilitator.connect(); + JFrame frame = new JFrame(); + frame.setTitle("Facilitator window: " + facilitator.id); + frame.setSize((int) dimension.getWidth(), (int) dimension.getHeight()); + facilitator.createFacilitatorWindow(dimension); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.getContentPane().add(facilitator.getFacilitatorWindow()); + frame.setVisible(true); + } + }; + SwingUtilities.invokeLater(createGuiRunnable); + } + + public void accept(Identifier id, Object event) { + // TODO Auto-generated method stub + if (event instanceof ConfigurationEvent) { + ConfigurationEvent configEvent = (ConfigurationEvent) event; + setConfiguration((ServerConfiguration)configEvent.getConfiguration()); + } + else if(event instanceof ServerGameStateEvent){ + ServerGameStateEvent serverGameStateEvent = (ServerGameStateEvent)event; + if (!stopExperiment) { + if (serverGameState == null) { + System.err.println("about to display game.."); + experimentRunning = true; + // FIXME: could use configuration from this event... serverGameStateEvent.getServerGameState().getConfiguration(); + serverGameState = serverGameStateEvent.getServerGameState(); + /** + * Here I need to display Game..this goes to the facilitator window. + */ + //facilitatorWindow.displayGame(); + } + else { + // synchronous updates + serverGameState = serverGameStateEvent.getServerGameState(); + } + } + //facilitatorWindow.updateWindow(serverGameStateEvent.getTimeLeft()); + } + else if (event instanceof FacilitatorEndRoundEvent){ + FacilitatorEndRoundEvent endRoundEvent = (FacilitatorEndRoundEvent)event; + serverGameState = null; + /** + * This method goes to facilitator widow. + */ + //facilitatorWindow.endRound(endRoundEvent); + } + + } + + /* + * Send a request to server to start an experiment + */ + void sendBeginExperimentRequest(){ + System.out.println("I am in sendBeginExperiment"); + transmit(new BeginExperimentRequest(id)); + //sendBeginRoundRequest(); + stopExperiment = false; + } + + /* + * Send a request to start a round + */ + public void sendBeginRoundRequest() { + transmit(new BeginRoundRequest(id)); + } + +// /* +// * Send a request to stop an experiment +// */ +// +// public void sendStopExperimentRequest() { +// transmit(new EndExperimentRequest(id)); +// endExperiment(); +// } + +// public void endExperiment() { +// configuration.resetExperimentRoundConfiguration(); +// serverGameState = null; +// stopExperiment = true; +// experimentRunning = false; +// //facilitatorWindow.updateMenuItems(); +// } + /* + * Send a request to stop a round + */ + + public void sendEndRoundRequest() { + transmit(new EndRoundRequest(id)); + } + /* + * Send a request to set the configuration object + */ + public void sendSetConfigRequest() { + dispatcher.transmit(new ConfigurationEvent(id, getConfiguration())); + } + + public FacilitatorWindow getFacilitatorWindow() { + return irrigationFacilitatorWindow; + } + + public Identifier getIdentifier(){ + return id; + } + + public ServerDataModel getServerGameState(){ + return serverGameState; + } + + public ServerConfiguration getConfiguration(){ + return configuration; + } + + public boolean isExperimentRunning(){ + return experimentRunning; + } + + public RoundConfiguration getCurrentRoundConfiguration() { + return configuration.getCurrentParameters(); + } + + public void setServerGameState(ServerDataModel serverGameState) { + this.serverGameState = serverGameState; + } +} Copied: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java (from rev 290, irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitatorWindow.java) =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java (rev 0) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java 2009-10-09 06:26:41 UTC (rev 291) @@ -0,0 +1,195 @@ +/** + * + */ +package edu.asu.commons.irrigation.facilitator; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.Rectangle; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.HashMap; +import java.util.Map; +import java.util.TreeSet; + +import javax.swing.BoxLayout; +import javax.swing.JButton; +import javax.swing.JPanel; +import javax.swing.JScrollPane; + +import edu.asu.commons.irrigation.events.BeginCommunicationRequest; +import edu.asu.commons.irrigation.events.DisplaySubmitTokenRequest; +import edu.asu.commons.irrigation.events.FacilitatorEndRoundEvent; +import edu.asu.commons.irrigation.events.InstructionEnableRequest; +import edu.asu.commons.irrigation.server.ClientData; +import edu.asu.commons.irrigation.server.GroupDataModel; +import edu.asu.commons.irrigation.server.ServerDataModel; +import edu.asu.commons.net.Identifier; +import edu.asu.commons.util.HtmlEditorPane; + +/** + * @author Sanket + * + */ +public class FacilitatorWindow extends JPanel { + + private Facilitator facilitator; + + private Dimension windowDimension; + + private static final long serialVersionUID = 1L; + + + private JButton startRoundButton = null; + + private JButton beginChatButton; + + private HtmlEditorPane editorPane; + private JScrollPane scrollPane; + + private JButton enableInstructionButton; + /** + * This is the default constructor + */ + + public FacilitatorWindow(Dimension dimension, Facilitator facilitator) { + windowDimension = dimension; + this.facilitator = facilitator; + initialize(); + } + + /* + public IrrigationFacilitatorWindow(){ + super(); + initialize(); + } + */ + + /** + * This method initializes this + * + * @return void + */ + private void initialize() { + setSize(windowDimension); + setLayout(new BorderLayout()); + JPanel buttonPanel = new JPanel(); + buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); + buttonPanel.add(getStartRoundButton()); + buttonPanel.add(getBeginChatButton()); + buttonPanel.add(getEnableInstructionButton()); + add(buttonPanel, BorderLayout.NORTH); + JPanel informationPanel = new JPanel(); + editorPane = new HtmlEditorPane(); + scrollPane = new JScrollPane(editorPane); + informationPanel.add(scrollPane); + add(informationPanel, BorderLayout.CENTER); + } + + private JButton getEnableInstructionButton() { + // TODO Auto-generated method stub + if (enableInstructionButton == null) { + enableInstructionButton = new JButton("Enable Instruction"); + enableInstructionButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + enableInstructionButton.setEnabled(false); + facilitator.transmit(new InstructionEnableRequest(facilitator.getIdentifier())); + } + }); + } + return enableInstructionButton; + } + + /** + * This method initializes Start_Facilitator_Button + * + * @return javax.swing.JButton + */ + + private JButton getBeginChatButton() { + if (beginChatButton == null) { + beginChatButton = new JButton("Begin Chat"); + beginChatButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent event) { + //At present default isChatEnabledBeforeRound() value isscreen false + if(facilitator.getCurrentRoundConfiguration().isChatEnabledBeforeRound()){ + facilitator.transmit(new BeginCommunicationRequest(facilitator.getIdentifier())); + } + else + facilitator.transmit(new DisplaySubmitTokenRequest(facilitator.getIdentifier())); + } + }); + } + return beginChatButton; + } + + public Facilitator getFacilitator(){ + return facilitator; + } + + /** + * This method initializes Stop + * + * @return javax.swing.JButton + */ + /** + * This method initializes Start_Round_Button + * + * @return javax.swing.JButton + */ + private JButton getStartRoundButton() { + if (startRoundButton == null) { + startRoundButton = new JButton(); + startRoundButton.setBounds(new Rectangle(180, 16, 136, 24)); + startRoundButton.setText("Start Round"); + startRoundButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() + facilitator.sendBeginRoundRequest(); + } + }); + } + return startRoundButton; + } + + /** + * This method initializes Stop_Round_Button1 + * + * @return javax.swing.JButton + */ + + + public void endRound(FacilitatorEndRoundEvent event) { + ServerDataModel model = event.getServerDataModel(); + StringBuilder builder = new StringBuilder(); + builder.append("<h3>Facilitator Debriefing:</h3>"); + builder.append("<table><thead><th>Participant</th><th>Current tokens</th><th>Current Income</th><th>Total Income</th></thead><tbody>"); + Map<Identifier, ClientData> clientDataMap = new HashMap<Identifier, ClientData>(); + for (GroupDataModel group: model.getAllGroupDataModels()) { + clientDataMap.putAll(group.getClientDataMap()); + } + TreeSet<Identifier> orderedSet = new TreeSet<Identifier>(clientDataMap.keySet()); + for (Identifier clientId : orderedSet) { + ClientData data = clientDataMap.get(clientId); + // FIXME: hack... inject the configuration into the client data so that getIncome() will return something appropriate. + // should just refactor getIncome or remove it from ClientData entirely. + builder.append(String.format( + "<tr><td>%s</td>" + + "<td align='center'>%d</td>" + + "<td align='center'>$%3.2f</td>" + + "<td align='center'>$%3.2f</td></tr>", + clientId.toString(), + data.getTotalTokensEarned(), + data.getTotalTokensEarned() * model.getCurrentConfiguration().getDollarsPerToken(), + data.getTotalTokens() * model.getCurrentConfiguration().getDollarsPerToken()+ facilitator.getConfiguration().getShowUpPayment())); + } + builder.append("</tbody></table><hr>"); + //FIXME: Could not understand how to evaluate .isLastRound(), hence using the + if (event.isLastRound()) { + builder.append("<h2><font color='blue'>The experiment is over. Please prepare payments.</font></h2>"); + } + editorPane.setText(builder.toString()); + repaint(); + } + +} // @jve:decl-index=0:visual-constraint="48,19" Deleted: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitator.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitator.java 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitator.java 2009-10-09 06:26:41 UTC (rev 291) @@ -1,259 +0,0 @@ -package edu.asu.commons.irrigation.facilitator; - -import java.awt.Dimension; -import java.net.InetSocketAddress; - -import javax.swing.JFrame; -import javax.swing.SwingUtilities; - -import edu.asu.commons.event.BeginExperimentRequest; -import edu.asu.commons.event.BeginRoundRequest; -import edu.asu.commons.event.ConfigurationEvent; -import edu.asu.commons.event.EndRoundRequest; -import edu.asu.commons.event.Event; -import edu.asu.commons.event.EventTypeChannel; -import edu.asu.commons.event.EventTypeProcessor; -import edu.asu.commons.event.FacilitatorRegistrationRequest; -import edu.asu.commons.irrigation.conf.RoundConfiguration; -import edu.asu.commons.irrigation.conf.ServerConfiguration; -import edu.asu.commons.irrigation.events.FacilitatorEndRoundEvent; -import edu.asu.commons.irrigation.events.ServerGameStateEvent; -import edu.asu.commons.irrigation.server.ServerDataModel; -import edu.asu.commons.net.ClientDispatcher; -import edu.asu.commons.net.DispatcherFactory; -import edu.asu.commons.net.Identifier; - -/** - * @author Sanket - * - */ -public class IrrigationFacilitator { - - private final static IrrigationFacilitator INSTANCE = new IrrigationFacilitator(); - - private Identifier id; // @jve:decl-index=0: - - private ClientDispatcher dispatcher; - - private ServerConfiguration configuration; - - private ServerDataModel serverGameState; // @jve:decl-index=0: - - private IrrigationFacilitatorWindow irrigationFacilitatorWindow; - - private boolean stopExperiment = false; - - private boolean experimentRunning = false; - - private final EventTypeChannel channel = new EventTypeChannel(); - - private IrrigationFacilitator() { - this(new ServerConfiguration()); - } - - public IrrigationFacilitator(ServerConfiguration configuration) { - dispatcher = DispatcherFactory.getInstance().createClientDispatcher(channel); - setConfiguration(configuration); - initializeEventProcessors(); - } - - @SuppressWarnings("unchecked") - private void initializeEventProcessors() { - channel.add(new EventTypeProcessor<ConfigurationEvent>(ConfigurationEvent.class) { - public void handle(ConfigurationEvent configurationEvent) { - setConfiguration((ServerConfiguration) configurationEvent.getConfiguration()); - } - }); - channel.add(new EventTypeProcessor<FacilitatorEndRoundEvent>(FacilitatorEndRoundEvent.class) { - public void handle(FacilitatorEndRoundEvent event) { -// serverGameState = null; - irrigationFacilitatorWindow.endRound(event); - configuration.nextRound(); - } - }); - } - - public static IrrigationFacilitator getInstance(){ - return INSTANCE; - } - - public void setConfiguration(ServerConfiguration configuration) { - if (configuration == null) { - System.err.println("attempt to setConfiguration with null, ignoring"); - return; - } - else { - this.configuration = configuration; - } - } - - /** - * @param args - */ - - /* - * Connects facilitator to the server and registers with the server as a facilitator. - * - * If the connection was successful, configures the FacilitatorWindow to manage experiments, - * otherwise configures the FacilitatorWindow to replay experiments and view configuration - * for those experiments. - */ - public void connect() { - connect(configuration.getServerAddress()); - } - - public void connect(InetSocketAddress address) { - id = dispatcher.connect(address); - if (id != null) { - transmit(new FacilitatorRegistrationRequest(id)); - } - - } - - void createFacilitatorWindow(Dimension dimension) { - irrigationFacilitatorWindow = new IrrigationFacilitatorWindow(dimension, this); - //if (id == null) { - // configure for unconnected functionality - // facilitatorWindow.configureForReplay(); - //} - } - - /* - * Sends requests to the server - */ - public void transmit(Event event) { - dispatcher.transmit(event); - } - - public static void main(String[] args) { - - Runnable createGuiRunnable = new Runnable(){ - public void run() { - // TODO Auto-generated method stub - Dimension dimension = new Dimension(500, 600); - IrrigationFacilitator facilitator = IrrigationFacilitator.getInstance(); - facilitator.connect(); - JFrame frame = new JFrame(); - frame.setTitle("Facilitator window: " + facilitator.id); - frame.setSize((int) dimension.getWidth(), (int) dimension.getHeight()); - facilitator.createFacilitatorWindow(dimension); - frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); - frame.getContentPane().add(facilitator.getFacilitatorWindow()); - frame.setVisible(true); - } - }; - SwingUtilities.invokeLater(createGuiRunnable); - } - - public void accept(Identifier id, Object event) { - // TODO Auto-generated method stub - if (event instanceof ConfigurationEvent) { - ConfigurationEvent configEvent = (ConfigurationEvent) event; - setConfiguration((ServerConfiguration)configEvent.getConfiguration()); - } - else if(event instanceof ServerGameStateEvent){ - ServerGameStateEvent serverGameStateEvent = (ServerGameStateEvent)event; - if (!stopExperiment) { - if (serverGameState == null) { - System.err.println("about to display game.."); - experimentRunning = true; - // FIXME: could use configuration from this event... serverGameStateEvent.getServerGameState().getConfiguration(); - serverGameState = serverGameStateEvent.getServerGameState(); - /** - * Here I need to display Game..this goes to the facilitator window. - */ - //facilitatorWindow.displayGame(); - } - else { - // synchronous updates - serverGameState = serverGameStateEvent.getServerGameState(); - } - } - //facilitatorWindow.updateWindow(serverGameStateEvent.getTimeLeft()); - } - else if (event instanceof FacilitatorEndRoundEvent){ - FacilitatorEndRoundEvent endRoundEvent = (FacilitatorEndRoundEvent)event; - serverGameState = null; - /** - * This method goes to facilitator widow. - */ - //facilitatorWindow.endRound(endRoundEvent); - } - - } - - /* - * Send a request to server to start an experiment - */ - void sendBeginExperimentRequest(){ - System.out.println("I am in sendBeginExperiment"); - transmit(new BeginExperimentRequest(id)); - //sendBeginRoundRequest(); - stopExperiment = false; - } - - /* - * Send a request to start a round - */ - public void sendBeginRoundRequest() { - transmit(new BeginRoundRequest(id)); - } - -// /* -// * Send a request to stop an experiment -// */ -// -// public void sendStopExperimentRequest() { -// transmit(new EndExperimentRequest(id)); -// endExperiment(); -// } - -// public void endExperiment() { -// configuration.resetExperimentRoundConfiguration(); -// serverGameState = null; -// stopExperiment = true; -// experimentRunning = false; -// //facilitatorWindow.updateMenuItems(); -// } - /* - * Send a request to stop a round - */ - - public void sendEndRoundRequest() { - transmit(new EndRoundRequest(id)); - } - /* - * Send a request to set the configuration object - */ - public void sendSetConfigRequest() { - dispatcher.transmit(new ConfigurationEvent(id, getConfiguration())); - } - - public IrrigationFacilitatorWindow getFacilitatorWindow() { - return irrigationFacilitatorWindow; - } - - public Identifier getIdentifier(){ - return id; - } - - public ServerDataModel getServerGameState(){ - return serverGameState; - } - - public ServerConfiguration getConfiguration(){ - return configuration; - } - - public boolean isExperimentRunning(){ - return experimentRunning; - } - - public RoundConfiguration getCurrentRoundConfiguration() { - return configuration.getCurrentParameters(); - } - - public void setServerGameState(ServerDataModel serverGameState) { - this.serverGameState = serverGameState; - } -} Deleted: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitatorWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitatorWindow.java 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/IrrigationFacilitatorWindow.java 2009-10-09 06:26:41 UTC (rev 291) @@ -1,195 +0,0 @@ -/** - * - */ -package edu.asu.commons.irrigation.facilitator; - -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.Rectangle; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.util.HashMap; -import java.util.Map; -import java.util.TreeSet; - -import javax.swing.BoxLayout; -import javax.swing.JButton; -import javax.swing.JPanel; -import javax.swing.JScrollPane; - -import edu.asu.commons.irrigation.events.BeginCommunicationRequest; -import edu.asu.commons.irrigation.events.DisplaySubmitTokenRequest; -import edu.asu.commons.irrigation.events.FacilitatorEndRoundEvent; -import edu.asu.commons.irrigation.events.InstructionEnableRequest; -import edu.asu.commons.irrigation.server.ClientData; -import edu.asu.commons.irrigation.server.GroupDataModel; -import edu.asu.commons.irrigation.server.ServerDataModel; -import edu.asu.commons.net.Identifier; -import edu.asu.commons.util.HtmlEditorPane; - -/** - * @author Sanket - * - */ -public class IrrigationFacilitatorWindow extends JPanel { - - private IrrigationFacilitator facilitator; - - private Dimension windowDimension; - - private static final long serialVersionUID = 1L; - - - private JButton startRoundButton = null; - - private JButton beginChatButton; - - private HtmlEditorPane editorPane; - private JScrollPane scrollPane; - - private JButton enableInstructionButton; - /** - * This is the default constructor - */ - - public IrrigationFacilitatorWindow(Dimension dimension, IrrigationFacilitator facilitator) { - windowDimension = dimension; - this.facilitator = facilitator; - initialize(); - } - - /* - public IrrigationFacilitatorWindow(){ - super(); - initialize(); - } - */ - - /** - * This method initializes this - * - * @return void - */ - private void initialize() { - setSize(windowDimension); - setLayout(new BorderLayout()); - JPanel buttonPanel = new JPanel(); - buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); - buttonPanel.add(getStartRoundButton()); - buttonPanel.add(getBeginChatButton()); - buttonPanel.add(getEnableInstructionButton()); - add(buttonPanel, BorderLayout.NORTH); - JPanel informationPanel = new JPanel(); - editorPane = new HtmlEditorPane(); - scrollPane = new JScrollPane(editorPane); - informationPanel.add(scrollPane); - add(informationPanel, BorderLayout.CENTER); - } - - private JButton getEnableInstructionButton() { - // TODO Auto-generated method stub - if (enableInstructionButton == null) { - enableInstructionButton = new JButton("Enable Instruction"); - enableInstructionButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - enableInstructionButton.setEnabled(false); - facilitator.transmit(new InstructionEnableRequest(facilitator.getIdentifier())); - } - }); - } - return enableInstructionButton; - } - - /** - * This method initializes Start_Facilitator_Button - * - * @return javax.swing.JButton - */ - - private JButton getBeginChatButton() { - if (beginChatButton == null) { - beginChatButton = new JButton("Begin Chat"); - beginChatButton.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent event) { - //At present default isChatEnabledBeforeRound() value isscreen false - if(facilitator.getCurrentRoundConfiguration().isChatEnabledBeforeRound()){ - facilitator.transmit(new BeginCommunicationRequest(facilitator.getIdentifier())); - } - else - facilitator.transmit(new DisplaySubmitTokenRequest(facilitator.getIdentifier())); - } - }); - } - return beginChatButton; - } - - public IrrigationFacilitator getFacilitator(){ - return facilitator; - } - - /** - * This method initializes Stop - * - * @return javax.swing.JButton - */ - /** - * This method initializes Start_Round_Button - * - * @return javax.swing.JButton - */ - private JButton getStartRoundButton() { - if (startRoundButton == null) { - startRoundButton = new JButton(); - startRoundButton.setBounds(new Rectangle(180, 16, 136, 24)); - startRoundButton.setText("Start Round"); - startRoundButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() - facilitator.sendBeginRoundRequest(); - } - }); - } - return startRoundButton; - } - - /** - * This method initializes Stop_Round_Button1 - * - * @return javax.swing.JButton - */ - - - public void endRound(FacilitatorEndRoundEvent event) { - ServerDataModel model = event.getServerDataModel(); - StringBuilder builder = new StringBuilder(); - builder.append("<h3>Facilitator Debriefing:</h3>"); - builder.append("<table><thead><th>Participant</th><th>Current tokens</th><th>Current Income</th><th>Total Income</th></thead><tbody>"); - Map<Identifier, ClientData> clientDataMap = new HashMap<Identifier, ClientData>(); - for (GroupDataModel group: model.getAllGroupDataModels()) { - clientDataMap.putAll(group.getClientDataMap()); - } - TreeSet<Identifier> orderedSet = new TreeSet<Identifier>(clientDataMap.keySet()); - for (Identifier clientId : orderedSet) { - ClientData data = clientDataMap.get(clientId); - // FIXME: hack... inject the configuration into the client data so that getIncome() will return something appropriate. - // should just refactor getIncome or remove it from ClientData entirely. - builder.append(String.format( - "<tr><td>%s</td>" + - "<td align='center'>%d</td>" + - "<td align='center'>$%3.2f</td>" + - "<td align='center'>$%3.2f</td></tr>", - clientId.toString(), - data.getTotalTokensEarned(), - data.getTotalTokensEarned() * model.getCurrentConfiguration().getDollarsPerToken(), - data.getTotalTokens() * model.getCurrentConfiguration().getDollarsPerToken()+ facilitator.getConfiguration().getShowUpPayment())); - } - builder.append("</tbody></table><hr>"); - //FIXME: Could not understand how to evaluate .isLastRound(), hence using the - if (event.isLastRound()) { - builder.append("<h2><font color='blue'>The experiment is over. Please prepare payments.</font></h2>"); - } - editorPane.setText(builder.toString()); - repaint(); - } - -} // @jve:decl-index=0:visual-constraint="48,19" Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -4,8 +4,8 @@ <comment>Irrigation XML-ized experiment round configuration</comment> <!--<entry key="hostname">localhost</entry>--> -<entry key="hostname">localhost</entry> -<entry key="port">16001</entry> +<entry key="hostname">@SERVER_ADDRESS@</entry> +<entry key="port">@PORT_NUMBER@</entry> <entry key="round0">round0.xml</entry> <entry key="round1">round1.xml</entry> <entry key="round2">round2.xml</entry> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round0.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round0.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round0.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,48 +1,22 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='max-canal-flow-capacity'>40</entry> <entry key='max-client-flow-capacity'>25</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> - <entry key="max-total-token-contribution">50</entry> - -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> <entry key="practice-round">true</entry> <entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - <entry key="instructions"> <![CDATA[ <p> -We will now start with two practice rounds. This practice round will not contribute to your earnings – -it is intended to acquaint you with the functioning of the exercise environment.<br> -If you have any questions feel free to raise your hand and to ask your question.<br> -<b>Do you have any questions so far?</b> +We will now start with two practice rounds. This practice round will not contribute +to your earnings. If you have any questions feel free to raise your hand and to ask +your question. +<br> +<b>Do you have any questions?</b> </p> - ]]> </entry> </properties> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round1.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round1.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round1.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,41 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key="max-total-token-contribution">50</entry> <entry key="practice-round">true</entry> -<entry key="clients-per-group">5</entry> -<entry key="second-practice-round">true</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> - -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Practice Round 2</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round10.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round10.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round10.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key="max-total-token-contribution">50</entry> <entry key="practice-round">false</entry> <entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 9 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round11.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round11.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round11.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key="max-total-token-contribution">50</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 10 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round12.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round12.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round12.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 11 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round13.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round13.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round13.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,40 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key="max-total-token-contribution">50</entry> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> - -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 12 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round14.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round14.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round14.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>85</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 13 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round15.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round15.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round15.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 14 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round16.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round16.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round16.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 15 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round17.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round17.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round17.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> - -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 16 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round18.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round18.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round18.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,9 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>85</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 17 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round19.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round19.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round19.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,39 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> +<comment>Irrigation experiment round configuration</comment> <entry key='infrastructure-degradation-factor'>10</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 18 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round2.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round2.xml 2009-10-08 22:10:47 UTC (rev 290) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round2.xml 2009-10-09 06:26:41 UTC (rev 291) @@ -1,41 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> -<comment>Costly Sanctioning XML-ized experiment round configuration</comment> -<entry key="round-time">100</entry> -<entry key="Bs">60</entry> -<entry key="Bt">40</entry> -<entry key="Btmax">50</entry> -<entry key="Token-Bandwidth-Mapping">2</entry> -<entry key="FilesDownload-Award-Conversion">2</entry> -<entry key="TBM-alpha">40</entry> -<entry key="TBM-a">30</entry> -<entry key="TBM-b">10</entry> -<entry key="max-total-token-contribution">50</entry> -<entry key="practice-round">false</entry> -<entry key="clients-per-group">5</entry> -<entry key="FAM-alpha">20</entry> -<entry key="FAM-a">5</entry> -<entry key="FAM-b">6</entry> +<comment>Irrigation experiment round configuration</comment> -<entry key='first-round'>true</entry> - -<entry key="board-width">14</entry> -<entry key="board-height">14</entry> - -<entry key="F1">100</entry> -<entry key="F2">100</entry> -<entry key="F3">100</entry> -<entry key="F4">100</entry> -<entry key="F5">100</entry> -<entry key="F6">100</entry> -<entry key="F7">100</entry> -<entry key="F8">100</entry> -<entry key="F9">100</entry> -<entry key="F10">100</entry> - - - <entry key="instructions"> <![CDATA[ <h3>Round 1 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/round20.xml ===========================... [truncated message content] |