virtualcommons-svn Mailing List for Virtual Commons Experiment Software (Page 53)
Status: Beta
Brought to you by:
alllee
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(21) |
Aug
(31) |
Sep
(6) |
Oct
(15) |
Nov
(2) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(4) |
Feb
(6) |
Mar
(12) |
Apr
(52) |
May
(14) |
Jun
(19) |
Jul
(81) |
Aug
(115) |
Sep
(36) |
Oct
(88) |
Nov
(46) |
Dec
(58) |
2010 |
Jan
(52) |
Feb
(55) |
Mar
(48) |
Apr
(15) |
May
(5) |
Jun
(38) |
Jul
(27) |
Aug
(24) |
Sep
(28) |
Oct
(1) |
Nov
(2) |
Dec
(29) |
2011 |
Jan
(87) |
Feb
(39) |
Mar
(63) |
Apr
(42) |
May
(26) |
Jun
(53) |
Jul
(23) |
Aug
(43) |
Sep
(37) |
Oct
(25) |
Nov
(4) |
Dec
(7) |
2012 |
Jan
(73) |
Feb
(79) |
Mar
(62) |
Apr
(28) |
May
(12) |
Jun
(2) |
Jul
(9) |
Aug
(1) |
Sep
(8) |
Oct
|
Nov
(3) |
Dec
(3) |
2013 |
Jan
(8) |
Feb
(16) |
Mar
(38) |
Apr
(74) |
May
(62) |
Jun
(15) |
Jul
(49) |
Aug
(19) |
Sep
(9) |
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Allen L. (JIRA) <jef...@as...> - 2010-02-03 02:38:49
|
[ http://opensource.asu.edu/jira/browse/COMMONS-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee resolved COMMONS-16. ------------------------------ Resolution: Fixed Fixed in r451, added a label to the submit tokens panel to display these error messages. > investment screen invalid input makes current infrastructure efficiency label disappear > --------------------------------------------------------------------------------------- > > Key: COMMONS-16 > URL: http://opensource.asu.edu/jira/browse/COMMONS-16 > Project: The Virtual Commons > Issue Type: Bug > Components: irrigation > Affects Versions: irrigation pretest fall 2009 > Reporter: Allen Lee > Assignee: Allen Lee > Priority: Minor > > Invalid input (anything other than 0-10) displays an error message label but makes the "current infrastructure efficiency" label disappear. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-03 02:38:48
|
[ http://opensource.asu.edu/jira/browse/COMMONS-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee resolved COMMONS-17. ------------------------------ Resolution: Fixed Fixed in r451. > add info to debriefing label > ---------------------------- > > Key: COMMONS-17 > URL: http://opensource.asu.edu/jira/browse/COMMONS-17 > Project: The Virtual Commons > Issue Type: Improvement > Components: irrigation > Reporter: Allen Lee > Assignee: Allen Lee > > Add "Results from round X : " to the "You are at position Y" label in the debriefing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-02-03 00:41:34
|
Revision: 452 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=452&view=rev Author: alllee Date: 2010-02-03 00:41:21 +0000 (Wed, 03 Feb 2010) Log Message: ----------- fixing http://opensource.asu.edu/jira/browse/COMMONS-15 - still needs more testing. Modified Paths: -------------- csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java Modified: csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java 2010-02-03 00:29:53 UTC (rev 451) +++ csidex/trunk/src/main/java/edu/asu/commons/conf/ConfigurationAssistant.java 2010-02-03 00:41:21 UTC (rev 452) @@ -28,8 +28,8 @@ private final Properties properties; - private final Configuration freemarkerConfiguration; - private final StringTemplateLoader templateLoader; + private transient Configuration freemarkerConfiguration; + private transient StringTemplateLoader templateLoader; public ConfigurationAssistant() { this(new Properties()); Modified: csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java 2010-02-03 00:29:53 UTC (rev 451) +++ csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java 2010-02-03 00:41:21 UTC (rev 452) @@ -126,10 +126,10 @@ StringTokenizer tokenizer = new StringTokenizer(remoteHostname, "."); String stationId = tokenizer.nextToken(); - int startIndex = stationId.lastIndexOf("-"); + int startIndex = stationId.lastIndexOf('-'); String station = stationId.substring(startIndex + 1, stationId.length()); try { - stationNumber = Math.abs(Integer.valueOf(station)); + stationNumber = Math.abs(Integer.parseInt(station)); stationed = true; return stationNumber; } @@ -144,7 +144,13 @@ return stationNumber.intValue(); } String remoteHost = remoteSocketAddress.toString(); - String lastIPDigits = remoteHost.substring(remoteHost.lastIndexOf(".") + 1, remoteHost.length()); + /* + System.err.println("remote host name: "+ getRemoteHostName()); + System.err.println("remote socket address: " + remoteSocketAddress); + System.err.println("local host name: " + getLocalHostName()); + System.err.println("local host address: " + localSocketAddress); + */ + String lastIPDigits = remoteHost.substring(remoteHost.lastIndexOf('.') + 1, remoteHost.lastIndexOf(':')); try { stationNumber = Math.abs(Integer.parseInt(lastIPDigits)); stationed = true; Modified: csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java =================================================================== --- csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java 2010-02-03 00:29:53 UTC (rev 451) +++ csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java 2010-02-03 00:41:21 UTC (rev 452) @@ -33,7 +33,7 @@ @Test public void testTemplate() { - ServerConfiguration serverConfiguration = new ServerConfiguration(); + //ServerConfiguration serverConfiguration = new ServerConfiguration(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2010-02-03 00:29:59
|
Revision: 451 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=451&view=rev Author: alllee Date: 2010-02-03 00:29:53 +0000 (Wed, 03 Feb 2010) Log Message: ----------- fixed wording and added label for token text submission error labels Modified Paths: -------------- irrigation/trunk/ivy.xml irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java Modified: irrigation/trunk/ivy.xml =================================================================== --- irrigation/trunk/ivy.xml 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/ivy.xml 2010-02-03 00:29:53 UTC (rev 451) @@ -8,5 +8,6 @@ <dependency org="edu.asu.commons" name="csidex" rev="0.2-SNAPSHOT"/> <dependency org="jfree" name="jfreechart" rev="1.0.13"/> <dependency org="jfree" name="jcommon" rev="1.0.16"/> + <dependency org="org.freemarker" name="freemarker" rev="2.3.16"/> </dependencies> </ivy-module> Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-02-03 00:29:53 UTC (rev 451) @@ -106,7 +106,7 @@ graphics2D.setColor(Color.BLUE); graphics2D.fillRect(gate[i].getOpeningsX(), gate[i].getOpeningsY(),gate[i].getOpeningsWidth(), gate[i].getOpeningsHeight()); - graphics2D.setColor(Color.YELLOW); + graphics2D.setColor(Gate.DEFAULT_COLOR); graphics2D.drawLine(gate[i].getx1(),gate[i].gety1(),gate[i].getx2(),gate[i].gety2()); } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java 2010-02-03 00:29:53 UTC (rev 451) @@ -21,6 +21,7 @@ import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JEditorPane; +import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; @@ -94,6 +95,8 @@ private Map<Integer, String> quizPageResponses = new HashMap<Integer, String>(); + private JLabel investedTokensLabel; + public ExperimentGameWindow(IrrigationClient client) { this.client = client; this.clientDataModel = client.getClientDataModel(); @@ -134,6 +137,7 @@ if (submitTokenPanel == null) { submitTokenPanel = new JPanel(); submitTokenPanel.setLayout(new BorderLayout()); + submitTokenPanel.add(getInvestedTokensLabel(), BorderLayout.PAGE_START); submitTokenPanel.add(getInvestedTokensTextField(), BorderLayout.CENTER); JButton submitTokensButton = new JButton("Invest"); submitTokensButton.addActionListener(new ActionListener() { @@ -141,7 +145,7 @@ submitInvestedTokens(); } }); - submitTokenPanel.add(submitTokensButton, BorderLayout.SOUTH); + submitTokenPanel.add(submitTokensButton, BorderLayout.PAGE_END); return submitTokenPanel; } return submitTokenPanel; @@ -240,6 +244,13 @@ private ServerConfiguration getServerConfiguration() { return clientDataModel.getServerConfiguration(); } + + private JLabel getInvestedTokensLabel() { + if (investedTokensLabel == null) { + investedTokensLabel = new JLabel(); + } + return investedTokensLabel; + } private JTextField getInvestedTokensTextField() { if (investedTokensTextField == null) { @@ -258,26 +269,19 @@ private void submitInvestedTokens() { try { int token = Integer.parseInt(investedTokensTextField.getText()); - // validating token range + // validate token range if (token >= 0 && token <= 10) { client.transmitInvestedTokensEvent(token); + investedTokensLabel.setText(""); setInstructions("Please wait while the server computes your total flow capacity based on your group's total token contribution investment."); addCenterComponent(getInstructionsPanel()); } else { - investedTokensTextField.setText(""); - instructionsBuilder.delete(0, instructionsBuilder.length()); - instructionsBuilder.append("<h3>Please enter your tokens within the range 0 - 10</h3>"); - instructionsBuilder.append(getServerConfiguration().getInvestmentInstructions()); - tokenInstructionsEditorPane.setText(instructionsBuilder.toString()); + investedTokensLabel.setText("Please enter a number between 0 and 10"); } } catch(NumberFormatException e){ - investedTokensTextField.setText(""); - instructionsBuilder.delete(0, instructionsBuilder.length()); - instructionsBuilder.append("<h3>You only have between 0 and 10 to invest. Please choose a number between 0 and 10 and try again.</h3>"); - instructionsBuilder.append(getServerConfiguration().getInvestmentInstructions()); - tokenInstructionsEditorPane.setText(instructionsBuilder.toString()); + investedTokensLabel.setText("Please enter a number between 0 and 10"); } } @@ -294,7 +298,7 @@ private HtmlEditorPane createInstructionsEditorPane() { HtmlEditorPane htmlEditorPane = new HtmlEditorPane(); htmlEditorPane.setEditable(false); - htmlEditorPane.setFont(new Font("sansserif", Font.TRUETYPE_FONT, 16)); + htmlEditorPane.setFont(new Font("LucidaSansRegular", Font.TRUETYPE_FONT, 16)); htmlEditorPane.setBackground(Color.WHITE); return htmlEditorPane; @@ -343,15 +347,16 @@ * @param event */ private void addDebriefingText(EndRoundEvent event) { + double showUpPayment = clientDataModel.getServerConfiguration().getShowUpPayment(); + RoundConfiguration roundConfiguration = clientDataModel.getRoundConfiguration(); instructionsBuilder.delete(0, instructionsBuilder.length()); - instructionsBuilder.append("<b>You are at position " + clientDataModel.getPriorityString()); + instructionsBuilder.append("<b>Results from the previous round</b>"); instructionsBuilder.append( "<table border='3' cellpadding='5'><thead><th>Position</th><th>Initial token endowment</th><th>Tokens invested</th><th>Tokens not invested</th>" + "<th>Tokens earned from growing crops</th><th>Total tokens earned during this round</th>" + "<th>Dollars earned during this round</th><th>Total dollars earned (including show-up bonus)</th></thead>" + "<tbody>"); - double showUpBonus = clientDataModel.getServerConfiguration().getShowUpPayment(); - RoundConfiguration roundConfiguration = clientDataModel.getRoundConfiguration(); + for(ClientData clientData : clientDataModel.getClientDataSortedByPriority()) { String backgroundColor = clientData.getPriority() == clientDataModel.getPriority() ? "#FFFFCC" : "CCCCCC"; instructionsBuilder.append( @@ -364,14 +369,14 @@ clientData.getTokensEarnedFromWaterCollected(), clientData.getAllTokensEarnedThisRound(), clientData.getTotalDollarsEarnedThisRound(), - clientData.getTotalDollarsEarned() + showUpBonus + clientData.getTotalDollarsEarned() + showUpPayment )); } ClientData clientData = clientDataModel.getClientData(); instructionsBuilder.append("</tbody></table><hr/>"); - instructionsBuilder.append(String.format("<h3>You received $%3.2f this past round. Your total earnings are $%3.2f, including the $%3.2f show up bonus.</h3>", - clientData.getTotalDollarsEarnedThisRound(), clientData.getTotalDollarsEarned()+showUpBonus, showUpBonus)); + instructionsBuilder.append(String.format("<h3>You (position %s) received $%3.2f this past round. Your total earnings are $%3.2f, including the $%3.2f show up bonus.</h3>", + clientData.getPriorityString(), clientData.getTotalDollarsEarnedThisRound(), clientData.getTotalDollarsEarned()+showUpPayment, showUpPayment)); //append the added practice round instructions if (roundConfiguration.isPracticeRound()) { @@ -564,18 +569,25 @@ if (! roundConfiguration.isFirstRound()) { instructionsBuilder.append(roundConfiguration.getInstructions()); instructionsBuilder.append("<hr/>"); - int irrigationCapacity = clientDataModel.getGroupDataModel().getIrrigationCapacity(); -// int clientCapacity = roundConfiguration.getMaximumClientFlowCapacity(); if (roundConfiguration.shouldResetInfrastructureEfficiency()) { - instructionsBuilder.append("The irrigation infrastructure efficiency is currently 75% (water delivery capacity of 35 cfps)."); + int initialInfrastructureEfficiency = roundConfiguration.getInitialInfrastructureEfficiency(); + instructionsBuilder.append( + String.format("The irrigation infrastructure efficiency has been reset to %d%% with a corresponding water delivery capacity of %d cfps.", + initialInfrastructureEfficiency, + clientDataModel.getGroupDataModel().calculateIrrigationCapacity(initialInfrastructureEfficiency))); + } else { + int initialInfrastructureEfficiency = clientDataModel.getGroupDataModel().getInfrastructureEfficiency(); + int degradationFactor = roundConfiguration.getInfrastructureDegradationFactor(); + int actualInfrastructureEfficiency = initialInfrastructureEfficiency - degradationFactor; instructionsBuilder.append( - String.format("<p>The <b>irrigation infrastructure efficiency is %d%% (water delivery capacity of %d cfps)</b> but will <b>decline by %d%%</b> during this round." + + String.format("<p>The irrigation infrastructure efficiency carried over from the previous round is %d%% but has declined by %d%% and is now %d%% (%d cfps) at the start of this round. " + "The <b>available water supply is %d cfps</b>.</p><br/><hr/>", - clientDataModel.getGroupDataModel().getInfrastructureEfficiency(), - irrigationCapacity, - roundConfiguration.getInfrastructureDegradationFactor(), + initialInfrastructureEfficiency, + degradationFactor, + actualInfrastructureEfficiency, + clientDataModel.getGroupDataModel().calculateIrrigationCapacity(actualInfrastructureEfficiency), roundConfiguration.getWaterSupplyCapacity() )); } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/Gate.java 2010-02-03 00:29:53 UTC (rev 451) @@ -1,11 +1,15 @@ package edu.asu.commons.irrigation.client; +import java.awt.Color; + /** * FIXME: Refactor this class. * * @author Sanket */ public class Gate { + + public final static Color DEFAULT_COLOR = Color.black; private boolean gateOpen = false; Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/RoundConfiguration.java 2010-02-03 00:29:53 UTC (rev 451) @@ -113,7 +113,7 @@ public String getPracticeRoundPaymentInstructions() { return getProperty("practice-round-payment-instructions", - "This is a practice round so the earnings mentioned are only for illustrative purposes and <b>will not count towards your actual earnings</b>."); + "This was a practice round so the earnings mentioned are only for illustrative purposes and <b>do not count towards your actual earnings</b>."); } public int getClientsPerGroup() { Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java 2010-02-03 00:29:53 UTC (rev 451) @@ -55,7 +55,7 @@ } @Override - protected RoundConfiguration createConfiguration(String roundConfigurationFile) { + protected RoundConfiguration createRoundConfiguration(String roundConfigurationFile) { return new RoundConfiguration(roundConfigurationFile); } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java 2010-02-02 20:49:58 UTC (rev 450) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java 2010-02-03 00:29:53 UTC (rev 451) @@ -45,7 +45,7 @@ * * Main entry point for the irrigation experiment server. * - * @author Sanket Joshi, <a href='All...@as...'>Allen Lee</a> + * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Revision$ */ public class IrrigationServer extends AbstractExperiment<ServerConfiguration> { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 23:22:00
|
[ http://opensource.asu.edu/jira/browse/COMMONS-15?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-15 started by Allen Lee. > ip address changes in COOR 5519 > ------------------------------- > > Key: COMMONS-15 > URL: http://opensource.asu.edu/jira/browse/COMMONS-15 > Project: The Virtual Commons > Issue Type: Bug > Components: csidex, irrigation > Affects Versions: irrigation pretest fall 2009, irrigation spring 2010 > Environment: COOR 5519 windows boxes > Reporter: Allen Lee > Assignee: Allen Lee > Priority: Blocker > > The static IP scheme in COOR 5519 has been changed by UTO; IPs are now being allocated by DHCP so we can't get the station # from the static IP address. We might still be able to grab it from the hostname, e.g., 1757-SPSS-17 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 22:13:59
|
[ http://opensource.asu.edu/jira/browse/COMMONS-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-16 started by Allen Lee. > investment screen invalid input makes current infrastructure efficiency label disappear > --------------------------------------------------------------------------------------- > > Key: COMMONS-16 > URL: http://opensource.asu.edu/jira/browse/COMMONS-16 > Project: The Virtual Commons > Issue Type: Bug > Components: irrigation > Affects Versions: irrigation pretest fall 2009 > Reporter: Allen Lee > Assignee: Allen Lee > Priority: Minor > > Invalid input (anything other than 0-10) displays an error message label but makes the "current infrastructure efficiency" label disappear. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 22:07:00
|
[ http://opensource.asu.edu/jira/browse/COMMONS-17?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on COMMONS-17 started by Allen Lee. > add info to debriefing label > ---------------------------- > > Key: COMMONS-17 > URL: http://opensource.asu.edu/jira/browse/COMMONS-17 > Project: The Virtual Commons > Issue Type: Improvement > Components: irrigation > Reporter: Allen Lee > Assignee: Allen Lee > > Add "Results from round X : " to the "You are at position Y" label in the debriefing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 21:00:59
|
[ http://opensource.asu.edu/jira/browse/COMMONS-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10041#action_10041 ] Allen Lee commented on COMMONS-17: ---------------------------------- The irrigation infrastructure efficiency carried over from Round X is Y% but has declined by Z% and is now XYZZY% at the start of this round. This corresponds to a water delivery capacity of A cfps. > add info to debriefing label > ---------------------------- > > Key: COMMONS-17 > URL: http://opensource.asu.edu/jira/browse/COMMONS-17 > Project: The Virtual Commons > Issue Type: Improvement > Components: irrigation > Reporter: Allen Lee > Assignee: Allen Lee > > Add "Results from round X : " to the "You are at position Y" label in the debriefing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-02-02 20:50:05
|
Revision: 450 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=450&view=rev Author: alllee Date: 2010-02-02 20:49:58 +0000 (Tue, 02 Feb 2010) Log Message: ----------- patching SocketIdentifier for new IP scheme used by COOR 5519 where the station identifier is part of the hostname instead of the IP address. Modified Paths: -------------- csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java csidex/trunk/src/main/java/edu/asu/commons/util/Duration.java csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java Modified: csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java 2010-02-02 20:47:51 UTC (rev 449) +++ csidex/trunk/src/main/java/edu/asu/commons/net/SocketIdentifier.java 2010-02-02 20:49:58 UTC (rev 450) @@ -122,17 +122,35 @@ if (stationNumber != null) { return stationNumber.intValue(); } - StringTokenizer tokenizer = new StringTokenizer(remoteSocketAddress.toString(), "."); - String hostname = tokenizer.nextToken(); + String remoteHostname = remoteSocketAddress.getHostName(); + StringTokenizer tokenizer = new StringTokenizer(remoteHostname, "."); + String stationId = tokenizer.nextToken(); - int startIndex = hostname.length() - 2; - String station = hostname.substring(startIndex, startIndex+2); + int startIndex = stationId.lastIndexOf("-"); + String station = stationId.substring(startIndex + 1, stationId.length()); try { stationNumber = Math.abs(Integer.valueOf(station)); stationed = true; return stationNumber; } catch (NumberFormatException e) { + // try get station from ip + return getStationFromIP(); + } + } + + private int getStationFromIP() { + if (stationNumber != null) { + return stationNumber.intValue(); + } + String remoteHost = remoteSocketAddress.toString(); + String lastIPDigits = remoteHost.substring(remoteHost.lastIndexOf(".") + 1, remoteHost.length()); + try { + stationNumber = Math.abs(Integer.parseInt(lastIPDigits)); + stationed = true; + return stationNumber; + } + catch (NumberFormatException e) { stationed = false; return id; } Modified: csidex/trunk/src/main/java/edu/asu/commons/util/Duration.java =================================================================== --- csidex/trunk/src/main/java/edu/asu/commons/util/Duration.java 2010-02-02 20:47:51 UTC (rev 449) +++ csidex/trunk/src/main/java/edu/asu/commons/util/Duration.java 2010-02-02 20:49:58 UTC (rev 450) @@ -59,11 +59,13 @@ } public static long toMillis(int seconds) { +// return TimeUnit.MILLISECONDS.convert(seconds, TimeUnit.SECONDS); return seconds * 1000L; } public static int toSeconds(long milliseconds) { - return (int) (milliseconds / 1000); +// return TimeUnit.SECONDS.convert(milliseconds, TimeUnit.MILLISECONDS); + return (int) (milliseconds / 1000L); } public long getDelta() { Modified: csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java =================================================================== --- csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java 2010-02-02 20:47:51 UTC (rev 449) +++ csidex/trunk/src/test/java/edu/asu/commons/conf/ConfigurationTest.java 2010-02-02 20:49:58 UTC (rev 450) @@ -1,9 +1,16 @@ package edu.asu.commons.conf; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; + import org.junit.Before; import org.junit.Test; +import edu.asu.commons.util.Duration; +import static org.junit.Assert.*; public class ConfigurationTest { @@ -15,9 +22,338 @@ } @Test + public void testConfigurationAssistant() { + assertEquals(0.0d, assistant.getDoubleProperty("foo", 0.0d), 0.0d); + } + + @Test public void testDefaultConfigurationDirectory() { + + } + + @Test + public void testTemplate() { + ServerConfiguration serverConfiguration = new ServerConfiguration(); + + } + + public static class ServerConfiguration + extends ExperimentConfiguration.Base<RoundConfiguration> { + + private static final long serialVersionUID = 7867208205942476733L; + + private final static String CONFIGURATION_FILE_NAME = "irrigation.xml"; + + private final static String DEFAULT_LOG_FILE_DESTINATION = "irrigation.log"; + + public ServerConfiguration() { + super(); + } + + public ServerConfiguration(String configurationDirectory) { + super(configurationDirectory); + } + + public String getLogFileDestination() { + return assistant.getStringProperty("log", DEFAULT_LOG_FILE_DESTINATION); + } + + public String getPersistenceDirectory() { + return assistant.getStringProperty("save-dir", "data"); + } + + public boolean shouldUpdateFacilitator() { + return assistant.getBooleanProperty("update-facilitator"); + } + + @Override + protected RoundConfiguration createRoundConfiguration(String roundConfigurationFile) { + return new RoundConfiguration(roundConfigurationFile); + } + + @Override + protected String getServerConfigurationFilename() { + return CONFIGURATION_FILE_NAME; + } + + private final static String[] PRIORITY_STRINGS = { "A", "B", "C", "D", "E" }; + + public String toPriorityString(int clientPriority) { + // bounds check + if (clientPriority >= 0 && clientPriority < PRIORITY_STRINGS.length) { + return PRIORITY_STRINGS[clientPriority]; + } + return "Position not found"; + } + + public boolean isUndisruptedFlowRequired(){ + return assistant.getBooleanProperty("undisrupted-flow-required", false); + } + + public String getUndisruptedFlowInstructions() { + return assistant.getProperty("undisrupted-flow-instructions", ""); + } + + public double getShowUpPayment() { + return assistant.getDoubleProperty("showup-payment", 5.0d); + } + + public String getInitialInstructions() { + String initialInstructions = assistant.getProperty("initial-instructions", ""); + if (initialInstructions.contains("%d")) { + return String.format(initialInstructions, getChatDuration()); + } + return initialInstructions; + } + + public String getWelcomeInstructions() { + return assistant.getProperty("welcome-instructions"); + } + + public Map<String, String> getQuizAnswers() { + Properties properties = assistant.getProperties(); + Map<String, String> answers = new HashMap<String, String>(); + for (int i = 1; properties.containsKey("q" + i); i++) { + String key = "q" + i; + String answer = properties.getProperty(key); + answers.put(key, answer); + String quizExplanationKey = "explanation" + i; + String quizExplanation = properties.getProperty(quizExplanationKey); + answers.put(quizExplanationKey, quizExplanation); + String descriptiveAnswerKey = "a" + i; + answers.put(descriptiveAnswerKey, properties.getProperty(descriptiveAnswerKey)); + } + return answers; + } + + public String getQuizQuestion(int pageNumber) { + return assistant.getProperty("general-instructionsq" + pageNumber); + } + + public String getQuizPage(int pageNumber) { + return assistant.getProperty("quiz-page"+pageNumber); + } + + public String getWaterCollectedToTokensTable() { + return assistant.getProperty("water-collected-to-tokens-table"); + } + + public String getFinalInstructions() { + return assistant.getProperty("final-instructions", "<b>The experiment is now over. Thanks for participating!</b>"); + } + + public String getInvestmentInstructions() { + return assistant.getProperty("investment-instructions"); + } + + public int getNumberOfQuizPages() { + return assistant.getIntProperty("question-pages", 2); + } + + public int getChatDuration() { + return assistant.getIntProperty("chat-duration", 60); + } + + public String getChatInstructions() { + String chatInstructions = assistant.getProperty("chat-instructions", ""); + if (chatInstructions.contains("%d")) { + return String.format(chatInstructions, getChatDuration()); + } + return chatInstructions; + } + + public String getGameScreenshotInstructions() { + return assistant.getProperty("game-screenshot-instructions"); + } + + } + public static class RoundConfiguration extends ExperimentRoundParameters.Base<ServerConfiguration> { + + private static final long serialVersionUID = -5053624886508752562L; + + private static final float DEFAULT_DOLLARS_PER_TOKEN = .05f; + + public static int getTokensEarned(int waterCollected) { + if (waterCollected < 150) { + return 0; + } + else if (waterCollected < 200) { + return 1; + } + else if (waterCollected < 250) { + return 4; + } + else if (waterCollected < 300) { + return 10; + } + else if (waterCollected < 350) { + return 15; + } + else if (waterCollected < 400) { + return 18; + } + else if (waterCollected < 500) { + return 19; + } + else if (waterCollected < 550) { + return 20; + } + else if (waterCollected < 650) { + return 19; + } + else if (waterCollected < 700) { + return 18; + } + else if (waterCollected < 750) { + return 15; + } + else if (waterCollected < 800) { + return 10; + } + else if (waterCollected < 850) { + return 4; + } + else if (waterCollected < 900) { + return 1; + } + else { + return 0; + } + } + + public RoundConfiguration(String resource) { + super(resource); + } + + public int getMaximumClientFlowCapacity() { + return getIntProperty("max-client-flow-capacity", 25); + } + + public int getInitialInfrastructureEfficiency() { + return getIntProperty("initial-infrastructure-efficiency", 75); + } + + public int getInfrastructureDegradationFactor() { + return getIntProperty("infrastructure-degradation-factor", 25); + } + + public int getWaterSupplyCapacity() { + return getIntProperty("max-canal-flow-capacity", 30); + } + + public int getMaximumTokenInvestment() { + return getIntProperty("max-token-investment", 10); + } + + /** + * returns maximum number of tokens that could have been contributed + * @return + */ + public int getMaximumTotalInvestedTokens() { + return getMaximumTokenInvestment() * getClientsPerGroup(); + } + + public int getMaximumInfrastructureEfficiency() { + return getIntProperty("max-infrastructure-efficiency", 100); + } + + public boolean isPracticeRound() { + return getBooleanProperty("practice-round"); + } + + public String getPracticeRoundPaymentInstructions() { + return getProperty("practice-round-payment-instructions", + "This is a practice round so the earnings mentioned are only for illustrative purposes and <b>will not count towards your actual earnings</b>."); + } + + public int getClientsPerGroup() { + return getIntProperty("clients-per-group", 5); + } + + /** + * Returns the dollars/token exchange rate. $1 = 1, 50 cents = $.50, 1 penny per token = .01, etc. + * + * FIXME: this should be a ServerConfiguration parameter unless we change it so + * the client keeps track of total dollars earned per round instead of total tokens earned per round. + * + * @return + */ + public double getDollarsPerToken() { + return getDoubleProperty("dollars-per-token", DEFAULT_DOLLARS_PER_TOKEN); + } + + /** + * for debugging purposes + */ + public void report() { + getProperties().list(System.err); + } + + public boolean shouldResetInfrastructureEfficiency() { + return isFirstRound() || getBooleanProperty("reset-infrastructure-efficiency", false); + } + + public String getInstructions() { + return getStringProperty("instructions", + "<b>No instructions available for this round.</b>"); + } + + public boolean shouldDisplayGroupTokens() { + return getBooleanProperty("display-group-tokens"); + } + + public boolean isQuizEnabled() { + return getBooleanProperty("quiz"); + } + + public String getQuizPage() { + return getStringProperty("quiz-page"); + } + + public Map<String, String> getQuizAnswers() { + if (isQuizEnabled()) { + Properties properties = getProperties(); + Map<String, String> answers = new HashMap<String, String>(); + for (int i = 1; properties.containsKey("q" + i); i++) { + String key = "q" + i; + String answer = properties.getProperty(key); + answers.put(key, answer); + } + return answers; + } + return Collections.emptyMap(); + } + + /** + * Returns true if the current round should have a communication session for + * getChatDuration() seconds before the round begins. + * + * @return + */ + public boolean isChatEnabledBeforeRound() { + return getBooleanProperty("chat-enabled-before-round", true); + } + + + /** + * Returns the duration of the round in seconds. Set to default of 50 seconds per round. + */ + @Override + public Duration getRoundDuration() { + return Duration.create(getRoundDurationInSeconds()); + } + + public int getRoundDurationInSeconds() { + return getIntProperty("round-duration", 50); + } + + public boolean shouldRandomizeGroup() { + return getBooleanProperty("randomize-groups", false); + } + } - + + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2010-02-02 20:48:02
|
Revision: 449 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=449&view=rev Author: alllee Date: 2010-02-02 20:47:51 +0000 (Tue, 02 Feb 2010) Log Message: ----------- changing gate color Modified Paths: -------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-02-02 20:16:26 UTC (rev 448) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/CanalPanel.java 2010-02-02 20:47:51 UTC (rev 449) @@ -106,7 +106,7 @@ graphics2D.setColor(Color.BLUE); graphics2D.fillRect(gate[i].getOpeningsX(), gate[i].getOpeningsY(),gate[i].getOpeningsWidth(), gate[i].getOpeningsHeight()); - graphics2D.setColor(Color.BLACK); + graphics2D.setColor(Color.YELLOW); graphics2D.drawLine(gate[i].getx1(),gate[i].gety1(),gate[i].getx2(),gate[i].gety2()); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 20:47:03
|
add info to debriefing label ---------------------------- Key: COMMONS-17 URL: http://opensource.asu.edu/jira/browse/COMMONS-17 Project: The Virtual Commons Issue Type: Improvement Components: irrigation Reporter: Allen Lee Assignee: Allen Lee Add "Results from round X : " to the "You are at position Y" label in the debriefing. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-02-02 20:16:32
|
Revision: 448 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=448&view=rev Author: alllee Date: 2010-02-02 20:16:26 +0000 (Tue, 02 Feb 2010) Log Message: ----------- resetting infrastructure efficiency to 75 Modified Paths: -------------- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml 2010-02-02 06:17:55 UTC (rev 447) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml 2010-02-02 20:16:26 UTC (rev 448) @@ -2,6 +2,9 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> + +<entry key='initial-infrastructure-efficiency'>75</entry> +<entry key='reset-infrastructure-efficiency'>true</entry> <entry key='infrastructure-degradation-factor'>20</entry> <entry key="instructions"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 19:47:01
|
investment screen invalid input makes current infrastructure efficiency label disappear --------------------------------------------------------------------------------------- Key: COMMONS-16 URL: http://opensource.asu.edu/jira/browse/COMMONS-16 Project: The Virtual Commons Issue Type: Bug Components: irrigation Affects Versions: irrigation pretest fall 2009 Reporter: Allen Lee Assignee: Allen Lee Priority: Minor Invalid input (anything other than 0-10) displays an error message label but makes the "current infrastructure efficiency" label disappear. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 19:45:01
|
ip address changes in COOR 5519 ------------------------------- Key: COMMONS-15 URL: http://opensource.asu.edu/jira/browse/COMMONS-15 Project: The Virtual Commons Issue Type: Bug Components: csidex, irrigation Affects Versions: irrigation pretest fall 2009, irrigation spring 2010 Environment: COOR 5519 windows boxes Reporter: Allen Lee Assignee: Allen Lee Priority: Blocker The static IP scheme in COOR 5519 has been changed by UTO; IPs are now being allocated by DHCP so we can't get the station # from the static IP address. We might still be able to grab it from the hostname, e.g., 1757-SPSS-17 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-02-02 06:18:04
|
Revision: 447 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=447&view=rev Author: alllee Date: 2010-02-02 06:17:55 +0000 (Tue, 02 Feb 2010) Log Message: ----------- rest of the treatments, still need to fix references Modified Paths: -------------- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round10.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round11.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round12.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round13.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round14.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round15.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round16.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round7.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round8.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t4/round9.xml Added Paths: ----------- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/irrigation.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round0.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round1.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round10.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round11.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round12.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round13.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round14.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round15.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round16.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round17.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round18.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round19.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round2.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round20.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round21.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round3.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round4.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round5.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round6.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round7.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round8.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round9.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/irrigation.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round0.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round1.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round10.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round11.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round12.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round13.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round14.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round15.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round16.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round17.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round18.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round19.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round2.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round20.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round21.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round3.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round4.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round5.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round6.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round7.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round8.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/round9.xml Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/irrigation.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/irrigation.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,739 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment server configuration</comment> +<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> +<entry key="round3">round3.xml</entry> +<entry key="round4">round4.xml</entry> +<entry key="round5">round5.xml</entry> +<entry key="round6">round6.xml</entry> +<entry key="round7">round7.xml</entry> +<entry key="round8">round8.xml</entry> +<entry key="round9">round9.xml</entry> +<entry key="round10">round10.xml</entry> +<entry key="round11">round11.xml</entry> +<entry key="round12">round12.xml</entry> +<entry key="round13">round13.xml</entry> +<entry key="round14">round14.xml</entry> +<entry key="round15">round15.xml</entry> +<entry key="round16">round16.xml</entry> +<entry key="round17">round17.xml</entry> +<entry key="round18">round18.xml</entry> +<entry key="round19">round19.xml</entry> +<entry key="round20">round20.xml</entry> +<entry key="round21">round21.xml</entry> + +<entry key="wait-for-participants">true</entry> +<entry key="number-of-rounds">22</entry> + +<entry key="undisrupted-flow-required">true</entry> + +<entry key="q1">4</entry> +<entry key="q2">identity</entry> +<entry key="q3">49</entry> +<entry key="q4">76</entry> +<entry key="q5">20</entry> +<entry key="q6">5</entry> +<entry key="q7">25</entry> +<entry key="q8">7</entry> +<entry key="q9">19</entry> +<entry key="q10">1.50</entry> + +<entry key='final-instructions'> +<![CDATA[ +<p> +The experiment is almost over. We have a brief survey for you to fill out while the +facilitator prepares your payments. When the facilitator has finished preparing +payments and you have all completed your surveys your computer number will be +called. You can then go next door to receive your payment. For privacy reasons we +must pay you one at a time. +</p> +<p> +Thanks for participating! +</p> +]]> +</entry> + + +<entry key="initial-instructions"> +<![CDATA[ +<h3>Welcome</h3> +<p> +Please be patient while the experimental environment is set up. +<b>Please do not close this window or open any other programs.</b> +</p> +]]> +</entry> + + +<entry key="facilitator-instructions"> +<![CDATA[ +<h3>Facilitator Instructions</h3> +<p> +Welcome to the facilitator interface. This interface allows you to control +the experiment. You may only modify configuration parameters <b>before</b> +you start the experiment by selecting the Configuration menu. When all the +participants are ready to begin the experiment, you can start the experiment +by selecting Experiment -> Start. After a round has been completed you +will be able to view the statistics for all of the participants. You can +begin the next round by selecting Round -> Start. +</p> +]]> +</entry> + + + +<entry key="general-instructions0"> +<![CDATA[ +<center><h3>Welcome to the experiment. Please do not close this window or open any +other applications.</h3></center> +]]> +</entry> + +<entry key="general-instructions1"> +<![CDATA[ +<h3>General Instructions</h3> +<p>Welcome. You have already earned 5 dollars by showing up for this exercise. +You can earn more, up to an extra 25 dollars, by participating in the exercise +which will last for about one hour. You will participate in this exercise as a +part of a group. Each group has five participants. Your group has been formed +by randomly assigning you to FOUR other participants in the room. The amount +of money you earn will depend on the decisions made by you and the rest of the +group. That is, your earnings will depend on your decisions as well as the +other members of your group. +</p> +<p> +This exercise mimics decisions people make in irrigation systems. In each round you +will receive 10 tokens which you can choose to keep or invest in the irrigation +infrastructure (for example canals and water diversion structures). Depending on the +state of repair of the irrigation infrastructure, it will be capable of directing +water to your field when you use your water diversion structure (called an +irrigation gate). Depending on the amount of water you can get to your field, you +can grow crops. Depending on the number of crops you grow you earn tokens. Each +token is worth 5 cents and you will be paid cash in private at the end of the +experiment based on the number of tokens you earned. +</p> +<p> +The experiment consists of a number of rounds. In each round you will first make a +decision as to how much to invest in the irrigation infrastructure. Without periodic +investment, the irrigation infrastructure will break down over time. Based on the +combined contributions of all 5 participants in your group in each round, as +explained below, your group can maintain the performance of the irrigation +infrastructure. The condition of the irrigation infrastructure determines +its capacity to deliver water which you can use to grow crops. +</p> +]]> +</entry> + +<entry key="general-instructionsq1"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +How many OTHER people in the room will be in your group?<br> +<input type="radio" name="q1" value="0">0<br> +<input type="radio" name="q1" value="1">1<br> +<input type="radio" name="q1" value="4">4<br> +<input type="radio" name="q1" value="Everybody">Everybody<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + +<entry key="general-instructions2"> +<![CDATA[ +<h3>Chat</h3> +<p>Before each round you will have a chat period of 40 seconds where you can send +text messages to the other participants. You may discuss any aspect of the exercise +with two important exceptions: +</p> +<ol> +<li>You are <b>not allowed</b> to promise the other participants +side-payments or threaten them with any consequence after the experiment is +finished. +</li> +<li>You are <b>not allowed to reveal your real identity</b>.</li> +</ol> +<p> +We will be monitoring the chat traffic. If we detect any violation of these rules, +we will have to remove <b>all members of the group where the violation occurred</b> +from the experiment. That group will have to wait until the entire experiment is +finished to receive their payment. +</p> +<p> +You will see a text box appear on your screen when a chat period starts. The amount +of time left in the chat period will be shown at the <b>top left of the screen</b>.<br> +</p> +]]> +</entry> + +<entry key="general-instructionsq2"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +Which of the following topics are you <b>not allowed</b> to discuss in chat?<br> +<input type="radio" name="q2" value="weather">the weather<br> +<input type="radio" name="q2" value="identity">your real identity<br> +<input type="radio" name="q2" value="experiment">the experiment<br> +<input type="radio" name="q2" value="earnings">what you will do with the money you earn from this experiment<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + +<entry key="general-instructions3"> +<![CDATA[ +<h3>Creating Irrigation Infrastructure</h3> +<p> +After the chat period ends you and each other participant will be given 10 tokens. +You must then decide what to do with these tokens. You may decide to invest in the +irrigation infrastructure or to keep the tokens. If you keep the tokens you will +earn at a minimum 10 tokens X 5 cents = $0.50 for each round. If you do this every +round after twenty rounds you will end up with at least $10 (plus any crops that you +may be able to grow as we will discuss later). Your total earnings for +participating in the experiment would then be at least $10 plus your show-up payment +of $5, for a grand total of at least $15. +</p> +<p> +On the other hand, if you invest some of your tokens in the irrigation +infrastructure, you may be able to earn more than this amount by growing crops. If +the irrigation infrastructure is operating at near maximum capacity you can earn +close to $1.50 each round. Thus if you grow crops you can roughly triple your +earnings compared to doing nothing. The actual earnings depend on the decisions you +and the other participants in your group make in terms of investment and when to +grow crops. +</p> +<p> +In each round the condition of the irrigation system declines such that its water +delivery efficiency drops by 25%. Investment is necessary to keep the irrigation +infrastructure from deteriorating. If you decide to invest in irrigation +infrastructure you must decide on the amount to invest out of your initial 10 +tokens. Keep in mind that the irrigation infrastructure must exceed a certain level +before you can grow crops. The tokens invested by all participants in your group +are added together and will total up to an amount 0 and 50 tokens. Each token +invested increases the irrigation infrastructure efficiency by one percentage point, +up to a <b>maximum of 100%</b>. This means that if the irrigation infrastructure +efficiency is at 80% it would not make sense for your group to invest a total of 50 +tokens, as any investment beyond 20 tokens would be wasted. In the table below you +can see the water delivery capacity measured in water units per second as a function +of the condition of the irrigation infrastructure. When the infrastructure is at +100% efficiency, 40 cubic feet of water per second (cfps) will be available. When the +irrigation infrastructure efficiency falls below 45%, there is no capacity left for +transporting water and thus there is no water available for anyone. +</p> +<p> +Your initial irrigation infrastructure will start at 75% efficiency but <b>will +carry over from round to round</b>. As an example, let's say that no one in a +group invests any tokens in the first round. The irrigation infrastructure +efficiency will be set at 75% for that first round. The table below lists the water +delivery in cubic feet per second (cfps) corresponding to the irrigation infrastructure +efficiency. If you look at the second to last row you can see that at 75% +efficiency the irrigation infrastructure will deliver 35 cfps. So in the first +round the group will have 35 cfps of water available to them. +</p> +<p> +Recall that each round the irrigation infrastructure efficiency deteriorates by 25%, +so at the start of the second round the infrastructure efficiency decreases to 50%. +At this point all five members of the group decide to invest 7 tokens each. This +increases the infrastructure efficiency by 35%, resulting in a total infrastructure +efficiency of 85%. If you look at the table again you can see that an +infrastructure efficiency of 85% will deliver 40 cfps. +</p> +<p> +The actual amount of water that is available for the group depends on the amount of +water available. Your group might have created an irrigation infrastructure with a +capacity of 40 cfps, but due to lack of rainfall only 30 cfps is available. On the +other hand, if the infrastructure capacity allows 30 cfps and 40 cfps of water is available +to the system, only 30 cfps can be delivered. +</p> + +<p> +To recap, at the beginning of each round you will be informed of the current +irrigation infrastructure efficiency. You will then decide how many tokens (between +0 and 10) to invest in the irrigation infrastructure. After everybody has made +their decision, you will be notified of the condition of the irrigation +infrastructure and the corresponding water delivery capacity. +</p> + +<b>Table 1:</b> The water delivery capacity as a function of the irrigation +infrastructure condition +<table border="1" cellspacing="2" cellpadding="2"> +<thead> +<th>Infrastructure efficiency (percent)</th> +<th>Water delivery (cubic feet per second)</th> +</thead> +<tr> +<td>≤ 45</td><td>0</td> +</tr> +<tr> +<td>46-51</td><td>5</td> +</tr> +<tr> +<td>52-55</td><td>10</td> +</tr> +<tr> +<td>56-58</td><td>15</td> +</tr> +<tr> +<td>59-61</td><td>20</td> +</tr> +<tr> +<td>62-65</td><td>25</td> +</tr> +<tr> +<td>66-70</td><td>30</td> +</tr> +<tr> +<td>71-80</td><td>35</td> +</tr> +<tr> +<td>81-100</td><td>40</td> +</tr> +</table> + +]]> +</entry> + +<entry key="general-instructionsq3"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following questions:<br> +<form> +Question 1:<br> +Given an existing infrastructure efficiency of 20%, if the five participants invest +a <b>total of 29 additional tokens</b>, what is the new irrigation infrastructure +efficiency? +(<small><b>Note: only enter a number, you don't need to add the % sign</b></small>)<br> +<input type="text" name="q3" value = ""> +<br><br> + +Question 2:<br> +Given an existing infrastructure efficiency of 50%, if <b>two participants invest 10 tokens each</b> +while the <b>three other participants invest 2 tokens each</b>, what is the new +irrigation infrastructure efficiency? +(<b>Note: only enter a number, you don't need to add the % sign</b>)<br> +<input type="text" name="q4" value = ""> +<br><br> +<input type="submit" name="submit" value="Submit"><br> +<br> +</form> +]]> +</entry> + +<entry key="general-instructions4"> +<![CDATA[ +<h3>Growing crops</h3> +<p>There are <b>five</b> participants in each group, each of which is randomly assigned to +one of the five positions, A, B, C, D or E. Below is a screenshot of the +graphical interface representation of the irrigation system. Water comes from +the box to the left and the five players are located from upstream (leftmost) +to downstream (rightmost) accordingly. To illustrate, assume you are in +position C. The black lines represent "gates" that you open and close by +clicking on the large button on the lower left corner of the screen. +Each round consists of 50 seconds and the amount of time left in the +experiment is indicated by a bar at the top of the screen. +</p> +<img src="http://dev.commons.asu.edu/irrigation/images/game-interface-screenshot.jpg"> +<br><br> +<p> +You can irrigate your field during the round by opening your gate. Your +earnings depend on the amount of water you can draw onto your fields and will +be explained in more detail on the next page. The speed at which you can grow +a crop depends on the amount of water available to you <b>at the time that you +open your gate</b>. The maximum flow capacity of the main canal shared by A, +B, C, D, and E is forty cubic feet per second. +</p> +<p> +The maximum amount of water that can flow through your gate when it is opened +is 25 cubic feet per second. If other people are using the canal, the water +flow available to you might be less, and it may take longer to get water to +your field since you are also limited by the amount of water that is flowing +through the shared canal. +</p> +]]> +</entry> + +<entry key="general-instructionsq4"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +Question 3:<br> +<form> +What is the minimum time to deliver 500 cubic feet of water to your field when +your maximum water flow capacity is available? +<br> +<input type="radio" name="q5" value="12.5">12.5 seconds<br> +<input type="radio" name="q5" value="20">20 seconds<br> +<input type="radio" name="q5" value="25">25 seconds<br> +<input type="radio" name="q5" value="50">50 seconds<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + + +<entry key="general-instructions5"> +<![CDATA[ +<h3>Positions A,B,C,D and E</h3> +<p> +The animation above illustrates how water flows to each player when their gates are +opened and closed. When a player opens their gate, the black line will rotate to a +vertical position, allowing water (represented by white dots) to flow to them. Note +that the water available downstream of a player with an open port is reduced, +illustrated by a narrowing of the canal. +</p> +<p> +Access to water depends on your position as shown in the window. Water originates +in the box at the upper left part of the screen and travels to the right. Thus, +participant A will have first access to the available water. Water not used by +participant A is then available to be used by participant B. Water not used by +participants A and B is then available for C. Water not used by participants A, B +and C is available for D. Finally, water not used by participants A, B, C and D is +available for E. +</p> +<p> +You can only get water to your field if you have water available to your position. +Suppose that the total irrigation capacity available is 40 cfps and 40 cfps of water +is available. If player A opens their gate they will consume 25 cfps of water and 15 +cfps is left for B. Suppose on the other hand, A does not open the gate, then a +total of 40 cfps is left for B, allowing B to extract water at the maximum rate of +25 cfps. +</p> +<p> +As another example, suppose that the canal system has been allowed to deteriorate +so that the total irrigation capacity available is 20 cfps. While player A’s gate is +open, no water is available for B. If A is NOT using water, 20 cfps is available for +B. +</p> +]]> +</entry> + +<entry key="general-instructionsq5"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +Suppose the irrigation efficiency is between 71 and 80% so that the canal flow +capacity is 30 cfps. If A opens their gate and diverts water at 25 cfps what is the +available water flow for B? +<br> +<input type="radio" name="q6" value="30">30 cfps<br> +<input type="radio" name="q6" value="25">25 cfps<br> +<input type="radio" name="q6" value="15">15 cfps<br> +<input type="radio" name="q6" value="5">5 cfps<br> +<br><br> +If the canal flow capacity available is 25 cfps and A,B,C and D are not using water, +what is the available water for E? +<br> +<input type="radio" name="q7" value="40">40 cfps<br> +<input type="radio" name="q7" value="25">25 cfps<br> +<input type="radio" name="q7" value="15">15 cfps<br> +<input type="radio" name="q7" value="0">0 cfps<br> + +<input type="submit" name="submit" value="Submit"> +<br><br> +</form> +]]> +</entry> + +<entry key="general-instructions6"> +<![CDATA[ +<h3>How to grow crops</h3> +<p> +To start growing crops, click on the yellow button labeled "open gate". +This will open your irrigation gate and allow water to flow to your field if it is +available. The text on the button will change to "close gate" - if +you would like to close the gate and stop extracting water from the canal, just +click on the yellow button again. Your gate will close and the text on the button +will change back to "open gate". +</p> +<p> +The amount of water units (cubic feet) your field has received is shown on the +screen, as well as the resulting amount of tokens earned from growing a crop. +The number of tokens earned in each round depends on how much water you have +diverted to your field. If you receive less than 150 cubic feet (cf) the crop has +not received enough water to grow a crop and you will thus not receive any tokens. +The maximum earnings are received when between 500 cf and 549 cf are diverted to +your field. If more than 549 cf water is diverted to your field, this will +negatively affect the growth of the crop (i.e. overwatering) and less tokens will be +earned. In the table below you can see the amount of tokens earned for amount of +water applied to your field. +</p> +<b>Table 2</b>: Earnings resulting from the amount of water applied to your field. + +<table border="1" cellspacing="2" cellpadding="2"> +<thead> +<th>Water units received (cubic feet)</th> +<th>Tokens earned</th> +</thead> +<tr> +<td>< 150</td><td>0</td> +</tr> +<tr> +<td>150-199</td><td>1</td> +</tr> +<tr> +<td>200-249</td><td>4</td> +</tr> +<tr> +<td>250-299</td><td>10</td> +</tr> +<tr> +<td>300-349</td><td>15</td> +</tr> +<tr> +<td>350-399</td><td>18</td> +</tr> +<tr> +<td>400-499</td><td>19</td> +</tr> +<tr> +<td>500-549</td><td>20</td> +</tr> +<tr> +<td>550-649</td><td>19</td> +</tr> +<tr> +<td>650-699</td><td>18</td> +</tr> +<tr> +<td>700-749</td><td>15</td> +</tr> +<tr> +<td>750-799</td><td>10</td> +</tr> +<tr> +<td>800-849</td><td>4</td> +</tr> +<tr> +<td>850-899</td><td>1</td> +</tr> +<tr> +<td>> 899</td><td>0</td> +</tr> +</table> + +Your earnings at the end of the round depend on your investment and the number of +tokens received for the crop. For example, suppose you invest 6 out of the 10 +tokens you are endowed with at the start of the round and you receive 333 cubic feet +of water. Your total earnings will be the amount of tokens leftover from your +initial endowment (10 - 6) plus the tokens you earned from your crop (15 tokens for +333 cubic feet of water, see Table 2). The total number of tokens earned is 19 +($0.85 since each token is $0.05). + +]]> +</entry> + +<entry key='water-collected-to-tokens-table'> +<![CDATA[ +<table border="1" cellspacing="2" cellpadding="2"> +<thead> +<th>Water applied to your field</th> +<th>Tokens earned</th> +</thead> +<tr> +<td>< 150</td><td>0</td> +</tr> +<tr> +<td>150-199</td><td>1</td> +</tr> +<tr> +<td>200-249</td><td>4</td> +</tr> +<tr> +<td>250-299</td><td>10</td> +</tr> +<tr> +<td>300-349</td><td>15</td> +</tr> +<tr> +<td>350-399</td><td>18</td> +</tr> +<tr> +<td>400-499</td><td>19</td> +</tr> +<tr> +<td>500-549</td><td>20</td> +</tr> +<tr> +<td>550-649</td><td>19</td> +</tr> +<tr> +<td>650-699</td><td>18</td> +</tr> +<tr> +<td>700-749</td><td>15</td> +</tr> +<tr> +<td>750-799</td><td>10</td> +</tr> +<tr> +<td>800-849</td><td>4</td> +</tr> +<tr> +<td>850-899</td><td>1</td> +</tr> +<tr> +<td>> 899</td><td>0</td> +</tr> +</table> +]]> +</entry> + + +<entry key="general-instructionsq6"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +If you invest 7 of the 10 tokens you started with, and you put 202 cf of water +on your field, what is the <b>total number of tokens</b> you will have earned +for that round? +<br> +<input type="radio" name="q8" value="3">3<br> +<input type="radio" name="q8" value="5">5<br> +<input type="radio" name="q8" value="7">7<br> +<input type="radio" name="q8" value="13">13<br> +<br><br> +If you invest all 10 tokens you start with, and you put 555 cf of water on your +field, what is the total number of tokens your will have earned for that round? +<br> +<input type="radio" name="q9" value="10">10<br> +<input type="radio" name="q9" value="19">19<br> +<input type="radio" name="q9" value="20">20<br> +<input type="radio" name="q9" value="29">29<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + +<entry key="general-instructions7"> +<![CDATA[ +<h3>Scores</h3> +<p> +The total number of tokens collected during a round is shown on the screen with the +message: +<br><br> +Total tokens earned this round: 0 +<br><br> +This the total of tokens not invested in irrigation structure plus additional +tokens earned by growing a crop. +<br> +You will also see the scores of the other participants summarized on the screen. +Finally, you will see the water flow capacity of each player at any given moment, as +illustrated in the figure below. + +]]> +</entry> + + +<entry key="general-instructionsq7"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +Each token is worth 5 cents, thus if you collected 30 tokens in a round you earned: +<br> +<input type="radio" name="q10" value=".15">$0.15<br> +<input type="radio" name="q10" value=".50">$0.50<br> +<input type="radio" name="q10" value="1.50">$1.50<br> +<input type="radio" name="q10" value="2.50">$2.50<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +<br><br> +</form> +]]> +</entry> + +<entry key="general-instructions8"> +<![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. +</p> +<p> +You will first chat via text with other participants in your group and then +decide how much you wish to invest in irrigation infrastructure maintenance. +After all investment decisions have been made you will begin the actual round +and make real-time decisions on when to open your gates and irrigate your +fields. +</p> +<p> +If you have any questions feel free to raise your hand and to ask your question. +<b>Do you have any questions so far?</b> +</p> +]]> +</entry> + +<entry key="undisrupted-flow-instructions"> +<![CDATA[ +<p> +If the flow of water is disrupted while your gate is open your crop growing progress +will be halted. +</p> +]]> +</entry> + + +<entry key="investment-instructions"> +<![CDATA[ +<h3>Invest tokens in the irrigation infrastructure</h3> +<p> +You have been endowed with 10 tokens to invest. You must make a decision about +how much you wish to invest [0,10] in the irrigation infrastructure. You can +see the relationship between total investment and irrigation infrastructure in +the table below. After you have entered the number of tokens you'd like to +invest, hit the enter key or click the submit button to confirm your +investment. When everybody has made their decision, the total investment will +be calculated and the overall irrigation infrastructure will be displayed. +Each token you invest corresponds to one percent of infrastructure efficiency, +so if you invest 10 tokens you are contributing 10% to the overall +infrastructure efficiency. +</p> +<table border="1" cellspacing="2" cellpadding="2"> +<thead> +<th>Total Infrastructure Efficiency (percent)</th> +<th>Water delivery (cubic feet per second)</th> +</thead> +<tr> +<td> ≤ 45</td><td>0</td> +</tr> +<tr> +<td>46-51</td><td>5</td> +</tr> +<tr> +<td>52-55</td><td>10</td> +</tr> +<tr> +<td>56-58</td><td>15</td> +</tr> +<tr> +<td>59-61</td><td>20</td> +</tr> +<tr> +<td>62-65</td><td>25</td> +</tr> +<tr> +<td>66-70</td><td>30</td> +</tr> +<tr> +<td>71-80</td><td>35</td> +</tr> +<tr> +<td>81-100</td><td>40</td> +</tr> +</table> +]]> +</entry> + +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round0.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round0.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round0.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="practice-round">true</entry> +<entry key='reset-infrastructure-efficiency'>true</entry> +<entry key='initial-infrastructure-efficiency'>50</entry> + + +<entry key="instructions"> +<![CDATA[ +<p> +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> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round1.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round1.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round1.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key="practice-round">true</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Practice Round 2</h3> +<p> +This is the second practice round of the experiment. If you have any questions +after participating in the first round, please ask them now. +</p> +]]> +</entry> +</properties> + Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round10.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round10.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round10.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 9 Instructions</h3> +<p> +This round is the same as the previous round. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round11.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round11.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round11.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 10 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round12.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round12.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round12.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>20</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 11 Instructions</h3> +<p> +In the past rounds the infrastructure efficiency declined from one round to +the next at a constant amount of 25%. In the following rounds the <b>average +decline</b> of the infrastructure efficiency will remain the same, but the +<b>actual amount</b> of decline can vary from round to round. This means that +in some rounds the decline will be larger than 25% and some rounds the decline +will be smaller than 25%. Before each round begins you will continue to make a +decision on how much to invest in the irrigation infrastructure. After all of +your investment contributions have been submitted the resulting level of +infrastructure efficiency will be displayed and then the round will begin. If +you have any questions, please ask them now. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round13.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round13.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round13.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key='infrastructure-degradation-factor'>30</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 12 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round14.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round14.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round14.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key='infrastructure-degradation-factor'>25</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 13 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round15.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round15.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round15.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>20</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 14 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round16.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round16.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round16.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>35</entry> + + +<entry key="instructions"> +<![CDATA[ +<h3>Round 15 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round17.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round17.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round17.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>20</entry> +<entry key="instructions"> +<![CDATA[ +<h3>Round 16 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round18.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round18.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round18.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>15</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 17 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round19.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round19.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round19.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>30</entry> + + +<entry key="instructions"> +<![CDATA[ +<h3>Round 18 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round2.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round2.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round2.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key='reset-infrastructure-efficiency'>true</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 1 Instructions</h3> +<p> +This is the first actual round of the experiment. Before this round begins +you will have the opportunity to text chat with the other participants in your +group, then decide on your level of investment in the irrigation +infrastructure. After the total irrigation infrastructure investment has been +determined you will begin the experiment and make decisions on when to open +your irrigation gates and grow crops. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round20.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round20.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round20.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key='infrastructure-degradation-factor'>30</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 19 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round21.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round21.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round21.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key='infrastructure-degradation-factor'>25</entry> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 20 Instructions</h3> +<p> +This is the final round. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round3.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round3.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round3.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 2 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round4.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round4.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round4.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 3 Instructions</h3> +<p> +This round is the same as the previous round. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round5.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round5.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round5.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 4 Instructions</h3> +<p> +This round is the same as the previous round. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round6.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round6.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round6.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 5 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round7.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round7.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round7.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 6 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round8.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round8.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round8.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 7 Instructions</h3> +<p> +This round is the same as the previous round. +</p> +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round9.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round9.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t2/round9.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment round configuration</comment> + +<entry key="instructions"> +<![CDATA[ +<h3>Round 8 Instructions</h3> +<p> +This round is the same as the previous round. +</p> + +]]> +</entry> +</properties> Added: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/irrigation.xml (rev 0) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t3/irrigation.xml 2010-02-02 06:17:55 UTC (rev 447) @@ -0,0 +1,739 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> +<properties> +<comment>Irrigation experiment server configuration</comment> +<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> +<entry key="round3">round3.xml</entry> +<entry key="round4">round4.xml</entry> +<entry key="round5">round5.xml</entry> +<entry key="round6">round6.xml</entry> +<entry key="round7">round7.xml</entry> +<entry key="round8">round8.xml</entry> +<entry key="round9">round9.xml</entry> +<entry key="round10">round10.xml</entry> +<entry key="round11">round11.xml</entry> +<entry key="round12">round12.xml</entry> +<entry key="round13">round13.xml</entry> +<entry key="round14">round14.xml</entry> +<entry key="round15">round15.xml</entry> +<entry key="round16">round16.xml</entry> +<entry key="round17">round17.xml</entry> +<entry key="round18">round18.xml</entry> +<entry key="round19">round19.xml</entry> +<entry key="round20">round20.xml</entry> +<entry key="round21">round21.xml</entry> + +<entry key="wait-for-participants">true</entry> +<entry key="number-of-rounds">22</entry> + +<entry key="undisrupted-flow-required">true</entry> + +<entry key="q1">4</entry> +<entry key="q2">identity</entry> +<entry key="q3">49</entry> +<entry key="q4">76</entry> +<entry key="q5">20</entry> +<entry key="q6">5</entry> +<entry key="q7">25</entry> +<entry key="q8">7</entry> +<entry key="q9">19</entry> +<entry key="q10">1.50</entry> + +<entry key='final-instructions'> +<![CDATA[ +<p> +The experiment is almost over. We have a brief survey for you to fill out while the +facilitator prepares your payments. When the facilitator has finished preparing +payments and you have all completed your surveys your computer number will be +called. You can then go next door to receive your payment. For privacy reasons we +must pay you one at a time. +</p> +<p> +Thanks for participating! +</p> +]]> +</entry> + + +<entry key="initial-instructions"> +<![CDATA[ +<h3>Welcome</h3> +<p> +Please be patient while the experimental environment is set up. +<b>Please do not close this window or open any other programs.</b> +</p> +]]> +</entry> + + +<entry key="facilitator-instructions"> +<![CDATA[ +<h3>Facilitator Instructions</h3> +<p> +Welcome to the facilitator interface. This interface allows you to control +the experiment. You may only modify configuration parameters <b>before</b> +you start the experiment by selecting the Configuration menu. When all the +participants are ready to begin the experiment, you can start the experiment +by selecting Experiment -> Start. After a round has been completed you +will be able to view the statistics for all of the participants. You can +begin the next round by selecting Round -> Start. +</p> +]]> +</entry> + + + +<entry key="general-instructions0"> +<![CDATA[ +<center><h3>Welcome to the experiment. Please do not close this window or open any +other applications.</h3></center> +]]> +</entry> + +<entry key="general-instructions1"> +<![CDATA[ +<h3>General Instructions</h3> +<p>Welcome. You have already earned 5 dollars by showing up for this exercise. +You can earn more, up to an extra 25 dollars, by participating in the exercise +which will last for about one hour. You will participate in this exercise as a +part of a group. Each group has five participants. Your group has been formed +by randomly assigning you to FOUR other participants in the room. The amount +of money you earn will depend on the decisions made by you and the rest of the +group. That is, your earnings will depend on your decisions as well as the +other members of your group. +</p> +<p> +This exercise mimics decisions people make in irrigation systems. In each round you +will receive 10 tokens which you can choose to keep or invest in the irrigation +infrastructure (for example canals and water diversion structures). Depending on the +state of repair of the irrigation infrastructure, it will be capable of directing +water to your field when you use your water diversion structure (called an +irrigation gate). Depending on the amount of water you can get to your field, you +can grow crops. Depending on the number of crops you grow you earn tokens. Each +token is worth 5 cents and you will be paid cash in private at the end of the +experiment based on the number of tokens you earned. +</p> +<p> +The experiment consists of a number of rounds. In each round you will first make a +decision as to how much to invest in the irrigation infrastructure. Without periodic +investment, the irrigation infrastructure will break down over time. Based on the +combined contributions of all 5 participants in your group in each round, as +explained below, your group can maintain the performance of the irrigation +infrastructure. The condition of the irrigation infrastructure determines +its capacity to deliver water which you can use to grow crops. +</p> +]]> +</entry> + +<entry key="general-instructionsq1"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +How many OTHER people in the room will be in your group?<br> +<input type="radio" name="q1" value="0">0<br> +<input type="radio" name="q1" value="1">1<br> +<input type="radio" name="q1" value="4">4<br> +<input type="radio" name="q1" value="Everybody">Everybody<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + +<entry key="general-instructions2"> +<![CDATA[ +<h3>Chat</h3> +<p>Before each round you will have a chat period of 40 seconds where you can send +text messages to the other participants. You may discuss any aspect of the exercise +with two important exceptions: +</p> +<ol> +<li>You are <b>not allowed</b> to promise the other participants +side-payments or threaten them with any consequence after the experiment is +finished. +</li> +<li>You are <b>not allowed to reveal your real identity</b>.</li> +</ol> +<p> +We will be monitoring the chat traffic. If we detect any violation of these rules, +we will have to remove <b>all members of the group where the violation occurred</b> +from the experiment. That group will have to wait until the entire experiment is +finished to receive their payment. +</p> +<p> +You will see a text box appear on your screen when a chat period starts. The amount +of time left in the chat period will be shown at the <b>top left of the screen</b>.<br> +</p> +]]> +</entry> + +<entry key="general-instructionsq2"> +<![CDATA[ +<br><br> +To continue to the next page, please answer the following question:<br> +<form> +Which of the following topics are you <b>not allowed</b> to discuss in chat?<br> +<input type="radio" name="q2" value="weather">the weather<br> +<input type="radio" name="q2" value="identity">your real identity<br> +<input type="radio" name="q2" value="experiment">the experiment<br> +<input type="radio" name="q2" value="earnings">what you will do with the money you earn from this experiment<br> +<br><br> +<input type="submit" name="submit" value="Submit"> +</form> +]]> +</entry> + +<entry key="general-instructions3"> +<![CDATA[ +<h3>Creating Irrigation Infrastructure</h3> +<p> +After the chat period ends you and each other participant will be given 10 tokens. +You must then decide what to do with these tokens. You may decide to invest in the +irrigation infrastructure or to keep the tokens. If you keep the tokens you will +earn at a minimum 10 tokens X 5 cents = $0.50 for each round. If you do this every +round after twenty rounds you will end up with at least $10 (plus any crops that you +may be able to grow as we will discuss later). Your total earnings for +participating in the experiment would then be at least $10 plus your show-up payment +of $5, for a grand total of at least $15. +</p> +<p> +On the other hand, if you invest some of your tokens in the irrigation +infrastructure, you may be able to earn more than this amount by growing crops. If +the irrigation infrastructure is operating at near maximum capacity you can earn +close to $1.50 each round. Thus if you grow crops you can roughly triple your +earnings compared to doing nothing. The actual earnings depend on the decisions you +and the other participants in your group make in terms of investment and when to +grow crops. +</p> +<p> +In each round the condition of the irrigation system declines such that its water +delivery efficiency drops by 25%. Investment is necessary to keep the irrigation +infrastructure from deteriorating. If you decide to invest in irrigation +infrastructure you must decide on the amount to invest out of your initial 10 +tokens. Keep in mind that the irrigation infrastructure must exceed a certain level +before you can grow crops. The tokens invested by all participants in your group +are added together and will total up to an amount 0 and 50 tokens. Each token +invested increases the irrigation infrastructure efficiency by one percentage point, +up to a <b>maximum of 100%</b>. This means that if the irrigation infrastructure +efficiency is at 80% it would not make sense for your group to invest a total of 50 +tokens, as any investment beyond 20 tokens would be wasted. In the table below you +can see the water delivery capacity measured in water units per second as a function +of the condition of the irrigation infrastructure. When the infrastructure is at +100% efficiency, 40 cubic feet of water per second (cfps) will be available. When the +irrigation infrastructure efficiency falls below 45%, there is no capacity left for +transporting water and thus there is no water available for anyone. ... [truncated message content] |
From: Allen L. (JIRA) <jef...@as...> - 2010-02-02 05:40:02
|
[ http://opensource.asu.edu/jira/browse/COMMONS-12?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee resolved COMMONS-12. ------------------------------ Resolution: Fixed Patched carllab.asu.edu. Should refactor to Struts 2 at some point (or something else entirely.. maybe scala / liftweb or grails?) > prepare online recruitment for irrigation experiments > ----------------------------------------------------- > > Key: COMMONS-12 > URL: http://opensource.asu.edu/jira/browse/COMMONS-12 > Project: The Virtual Commons > Issue Type: Task > Components: infrastructure > Affects Versions: irrigation pretest fall 2009, irrigation spring 2010 > Reporter: Allen Lee > Assignee: Allen Lee > Fix For: irrigation pretest fall 2009 > > > Customize orsee or patch the carllab.asu.edu software to handle a new batch of recruits for the spring irrigation experiments (need to be done before Marty leaves on sabbatical). -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <al...@us...> - 2010-02-02 04:56:11
|
Revision: 446 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=446&view=rev Author: alllee Date: 2010-02-02 04:56:04 +0000 (Tue, 02 Feb 2010) Log Message: ----------- updated irrigation instructions Modified Paths: -------------- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml 2010-02-02 04:38:51 UTC (rev 445) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml 2010-02-02 04:56:04 UTC (rev 446) @@ -30,19 +30,40 @@ <entry key="wait-for-participants">true</entry> <entry key="number-of-rounds">22</entry> -<entry key="undisrupted-flow-required">true</entry> +<entry key="q1">49</entry> +<entry key="a1">49%</entry> +<entry key="explanation1">An existing infrastructure efficiency of 20% + 29 tokens invested = 49% infrastructure efficiency.</entry> +<entry key="q2">5</entry> +<entry key="a2">5 cubic feet per second</entry> +<entry key="explanation2"> +<![CDATA[ +An existing infrastructure efficiency of 35% + 15 tokens invested = 50% infrastructure efficiency for the current round. +An infrastructure efficiency of 50% corresponds to a water delivery capacity +of 5 cubic feet per second. +]]> +</entry> +<entry key="q3">5</entry> +<entry key='a3'>5 cubic feet per second</entry> +<entry key="explanation3">Since there is only 30 cubic feet per second of water +available, the irrigation infrastructure capacity of 35 cubic feet per +second will not be fully used. When A opens their gate, they take 25 of the +30 cubic feet per second out of the canal, leaving 5 cubic feet per second for +B. +</entry> +<entry key="q4">25</entry> +<entry key="a4">25 cubic feet per second</entry> +<entry key="explanation4">If A has 25 cfps available and does not take any +water, the same amount is available for the people downstream. Since B, C and +D do not take water, 25 cfps is available for E.</entry> +<entry key="q5">7</entry> +<entry key="a5">7 tokens</entry> +<entry key="explanation5">If you invest 7 out of 10 tokens, you keep 3 tokens for yourself. If you apply 202 cubic feet of water to your field you will earn 4 tokens. 3 + 4 = 7 tokens </entry> +<entry key="q6">19</entry> +<entry key="a6">19 tokens</entry> +<entry key="explanation6">If you invest all 10 tokens, you keep 0 tokens from +your initial endowment. If you apply 555 cubic feet of water to your field +you will earn 19 tokens. 0 + 19 = 19 tokens.</entry> -<entry key="q1">4</entry> -<entry key="q2">identity</entry> -<entry key="q3">49</entry> -<entry key="q4">76</entry> -<entry key="q5">20</entry> -<entry key="q6">5</entry> -<entry key="q7">25</entry> -<entry key="q8">7</entry> -<entry key="q9">19</entry> -<entry key="q10">1.50</entry> - <entry key='final-instructions'> <![CDATA[ <p> @@ -58,100 +79,37 @@ ]]> </entry> - +<!-- FIXME: lots of parameterizable fields here. should make instructions +template-language-pluggable +--> <entry key="initial-instructions"> <![CDATA[ -<h3>Welcome</h3> <p> -Please be patient while the experimental environment is set up. -<b>Please do not close this window or open any other programs.</b> +You have already earned 5 dollars by showing up for this exercise. You can earn +more, up to an extra 25 dollars. You will participate in this exercise as a part of +a group of five participants. Your group has been formed by randomly assigning you +to FOUR other participants in the room. </p> -]]> -</entry> - - -<entry key="facilitator-instructions"> -<![CDATA[ -<h3>Facilitator Instructions</h3> <p> -Welcome to the facilitator interface. This interface allows you to control -the experiment. You may only modify configuration parameters <b>before</b> -you start the experiment by selecting the Configuration menu. When all the -participants are ready to begin the experiment, you can start the experiment -by selecting Experiment -> Start. After a round has been completed you -will be able to view the statistics for all of the participants. You can -begin the next round by selecting Round -> Start. +The amount of money you earn will depend on the decisions made by you and the other +members of your group. This exercise mimics decisions people make in irrigation +systems. In each round you will receive 10 tokens which you can invest in the +irrigation infrastructure. Based on the <b>water delivery capacity</b> of the +irrigation infrastructure and the availability of water you will be able to +grow crops. Tokens earned in a round is the sum of tokens not invested plus +tokens earned by growing crops. Each token is worth 5 cents. In each round you +will first decide how much to invest in the irrigation infrastructure. Based +on the combined contributions of all 5 participants in your group in each +round, your group can maintain the capacity of the irrigation infrastructure +for growing crops. </p> -]]> -</entry> - - -<entry key="general-instructions0"> -<![CDATA[ -<center><h3>Welcome to the experiment. Please do not close this window or open any -other applications.</h3></center> -]]> -</entry> - -<entry key="general-instructions1"> -<![CDATA[ -<h3>General Instructions</h3> -<p>Welcome. You have already earned 5 dollars by showing up for this exercise. -You can earn more, up to an extra 25 dollars, by participating in the exercise -which will last for about one hour. You will participate in this exercise as a -part of a group. Each group has five participants. Your group has been formed -by randomly assigning you to FOUR other participants in the room. The amount -of money you earn will depend on the decisions made by you and the rest of the -group. That is, your earnings will depend on your decisions as well as the -other members of your group. -</p> <p> -This exercise mimics decisions people make in irrigation systems. In each round you -will receive 10 tokens which you can choose to keep or invest in the irrigation -infrastructure (for example canals and water diversion structures). Depending on the -state of repair of the irrigation infrastructure, it will be capable of directing -water to your field when you use your water diversion structure (called an -irrigation gate). Depending on the amount of water you can get to your field, you -can grow crops. Depending on the number of crops you grow you earn tokens. Each -token is worth 5 cents and you will be paid cash in private at the end of the -experiment based on the number of tokens you earned. +We will now start a practice round to help illustrate the experiment. Before each +round in this experiment you will have a chat period of %d seconds where you can +send text messages to the other participants. You may discuss any aspect of the +exercise with two important exceptions: </p> -<p> -The experiment consists of a number of rounds. In each round you will first make a -decision as to how much to invest in the irrigation infrastructure. Without periodic -investment, the irrigation infrastructure will break down over time. Based on the -combined contributions of all 5 participants in your group in each round, as -explained below, your group can maintain the performance of the irrigation -infrastructure. The condition of the irrigation infrastructure determines -its capacity to deliver water which you can use to grow crops. -</p> -]]> -</entry> - -<entry key="general-instructionsq1"> -<![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> -<form> -How many OTHER people in the room will be in your group?<br> -<input type="radio" name="q1" value="0">0<br> -<input type="radio" name="q1" value="1">1<br> -<input type="radio" name="q1" value="4">4<br> -<input type="radio" name="q1" value="Everybody">Everybody<br> -<br><br> -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> - -<entry key="general-instructions2"> -<![CDATA[ -<h3>Chat</h3> -<p>Before each round you will have a chat period of 40 seconds where you can send -text messages to the other participants. You may discuss any aspect of the exercise -with two important exceptions: -</p> <ol> <li>You are <b>not allowed</b> to promise the other participants side-payments or threaten them with any consequence after the experiment is @@ -163,375 +121,116 @@ We will be monitoring the chat traffic. If we detect any violation of these rules, we will have to remove <b>all members of the group where the violation occurred</b> from the experiment. That group will have to wait until the entire experiment is -finished to receive their payment. +finished to receive payment. </p> -<p> -You will see a text box appear on your screen when a chat period starts. The amount -of time left in the chat period will be shown at the <b>top left of the screen</b>.<br> -</p> ]]> </entry> -<entry key="general-instructionsq2"> +<entry key='game-screenshot-instructions'> <![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> -<form> -Which of the following topics are you <b>not allowed</b> to discuss in chat?<br> -<input type="radio" name="q2" value="weather">the weather<br> -<input type="radio" name="q2" value="identity">your real identity<br> -<input type="radio" name="q2" value="experiment">the experiment<br> -<input type="radio" name="q2" value="earnings">what you will do with the money you earn from this experiment<br> -<br><br> -<input type="submit" name="submit" value="Submit"> -</form> +<img src="http://dev.commons.asu.edu/irrigation/images/game-interface-screenshot.jpg"> ]]> </entry> -<entry key="general-instructions3"> + +<entry key="facilitator-instructions"> <![CDATA[ -<h3>Creating Irrigation Infrastructure</h3> +<h3>Facilitator Instructions</h3> <p> -After the chat period ends you and each other participant will be given 10 tokens. -You must then decide what to do with these tokens. You may decide to invest in the -irrigation infrastructure or to keep the tokens. If you keep the tokens you will -earn at a minimum 10 tokens X 5 cents = $0.50 for each round. If you do this every -round after twenty rounds you will end up with at least $10 (plus any crops that you -may be able to grow as we will discuss later). Your total earnings for -participating in the experiment would then be at least $10 plus your show-up payment -of $5, for a grand total of at least $15. +Welcome to the facilitator interface. This interface allows you to control +the experiment. You may only modify configuration parameters <b>before</b> +you start the experiment by selecting the Configuration menu. When all the +participants are ready to begin the experiment, you can start the experiment +by selecting Experiment -> Start. After a round has been completed you +will be able to view the statistics for all of the participants. You can +begin the next round by selecting Round -> Start. </p> -<p> -On the other hand, if you invest some of your tokens in the irrigation -infrastructure, you may be able to earn more than this amount by growing crops. If -the irrigation infrastructure is operating at near maximum capacity you can earn -close to $1.50 each round. Thus if you grow crops you can roughly triple your -earnings compared to doing nothing. The actual earnings depend on the decisions you -and the other participants in your group make in terms of investment and when to -grow crops. -</p> -<p> -In each round the condition of the irrigation system declines such that its water -delivery efficiency drops by 25%. Investment is necessary to keep the irrigation -infrastructure from deteriorating. If you decide to invest in irrigation -infrastructure you must decide on the amount to invest out of your initial 10 -tokens. Keep in mind that the irrigation infrastructure must exceed a certain level -before you can grow crops. The tokens invested by all participants in your group -are added together and will total up to an amount 0 and 50 tokens. Each token -invested increases the irrigation infrastructure efficiency by one percentage point, -up to a <b>maximum of 100%</b>. This means that if the irrigation infrastructure -efficiency is at 80% it would not make sense for your group to invest a total of 50 -tokens, as any investment beyond 20 tokens would be wasted. In the table below you -can see the water delivery capacity measured in water units per second as a function -of the condition of the irrigation infrastructure. When the infrastructure is at -100% efficiency, 40 cubic feet of water per second (cfps) will be available. When the -irrigation infrastructure efficiency falls below 45%, there is no capacity left for -transporting water and thus there is no water available for anyone. -</p> -<p> -Your initial irrigation infrastructure will start at 75% efficiency but <b>will -carry over from round to round</b>. As an example, let's say that no one in a -group invests any tokens in the first round. The irrigation infrastructure -efficiency will be set at 75% for that first round. The table below lists the water -delivery in cubic feet per second (cfps) corresponding to the irrigation infrastructure -efficiency. If you look at the second to last row you can see that at 75% -efficiency the irrigation infrastructure will deliver 35 cfps. So in the first -round the group will have 35 cfps of water available to them. -</p> -<p> -Recall that each round the irrigation infrastructure efficiency deteriorates by 25%, -so at the start of the second round the infrastructure efficiency decreases to 50%. -At this point all five members of the group decide to invest 7 tokens each. This -increases the infrastructure efficiency by 35%, resulting in a total infrastructure -efficiency of 85%. If you look at the table again you can see that an -infrastructure efficiency of 85% will deliver 40 cfps. -</p> -<p> -The actual amount of water that is available for the group depends on the amount of -water available. Your group might have created an irrigation infrastructure with a -capacity of 40 cfps, but due to lack of rainfall only 30 cfps is available. On the -other hand, if the infrastructure capacity allows 30 cfps and 40 cfps of water is available -to the system, only 30 cfps can be delivered. -</p> +]]> +</entry> -<p> -To recap, at the beginning of each round you will be informed of the current -irrigation infrastructure efficiency. You will then decide how many tokens (between -0 and 10) to invest in the irrigation infrastructure. After everybody has made -their decision, you will be notified of the condition of the irrigation -infrastructure and the corresponding water delivery capacity. -</p> -<b>Table 1:</b> The water delivery capacity as a function of the irrigation -infrastructure condition -<table border="1" cellspacing="2" cellpadding="2"> -<thead> -<th>Infrastructure efficiency (percent)</th> -<th>Water delivery (cubic feet per second)</th> -</thead> -<tr> -<td>≤ 45</td><td>0</td> -</tr> -<tr> -<td>46-51</td><td>5</td> -</tr> -<tr> -<td>52-55</td><td>10</td> -</tr> -<tr> -<td>56-58</td><td>15</td> -</tr> -<tr> -<td>59-61</td><td>20</td> -</tr> -<tr> -<td>62-65</td><td>25</td> -</tr> -<tr> -<td>66-70</td><td>30</td> -</tr> -<tr> -<td>71-80</td><td>35</td> -</tr> -<tr> -<td>81-100</td><td>40</td> -</tr> -</table> +<entry key="welcome-instructions"> +<![CDATA[ +<center><h3>Welcome to the experiment. Please do not close this window or open any +other applications.</h3></center> ]]> </entry> -<entry key="general-instructionsq3"> + +<entry key="quiz-page1"> <![CDATA[ -<br><br> -To continue to the next page, please answer the following questions:<br> +<p> +The first two questions deal with irrigation infrastructure investment. +<b>Please refer to Table 1 of your handout</b>. +</p> + <form> Question 1:<br> Given an existing infrastructure efficiency of 20%, if the five participants invest a <b>total of 29 additional tokens</b>, what is the new irrigation infrastructure -efficiency? -(<small><b>Note: only enter a number, you don't need to add the % sign</b></small>)<br> -<input type="text" name="q3" value = ""> +efficiency?<br> +<input type="text" name="q1" value = "">% <br><br> Question 2:<br> -Given an existing infrastructure efficiency of 50%, if <b>two participants invest 10 tokens each</b> -while the <b>three other participants invest 2 tokens each</b>, what is the new -irrigation infrastructure efficiency? -(<b>Note: only enter a number, you don't need to add the % sign</b>)<br> -<input type="text" name="q4" value = ""> -<br><br> -<input type="submit" name="submit" value="Submit"><br> -<br> -</form> -]]> -</entry> +Suppose the infrastructure efficiency in the last round was 60%. For the current +round, the efficiency will decline by an amount of 25% for a resulting +infrastructure efficiency of 35%. If the members of your group invest a total of 15 +tokens, what will be your group's resulting water delivery capacity?<br> -<entry key="general-instructions4"> -<![CDATA[ -<h3>Growing crops</h3> -<p>There are <b>five</b> participants in each group, each of which is randomly assigned to -one of the five positions, A, B, C, D or E. Below is a screenshot of the -graphical interface representation of the irrigation system. Water comes from -the box to the left and the five players are located from upstream (leftmost) -to downstream (rightmost) accordingly. To illustrate, assume you are in -position C. The black lines represent "gates" that you open and close by -clicking on the large button on the lower left corner of the screen. -Each round consists of 50 seconds and the amount of time left in the -experiment is indicated by a bar at the top of the screen. -</p> -<img src="http://dev.commons.asu.edu/irrigation/images/game-interface-screenshot.jpg"> +<input type="text" name="q2" value = ""> cubic feet per second <br><br> -<p> -You can irrigate your field during the round by opening your gate. Your -earnings depend on the amount of water you can draw onto your fields and will -be explained in more detail on the next page. The speed at which you can grow -a crop depends on the amount of water available to you <b>at the time that you -open your gate</b>. The maximum flow capacity of the main canal shared by A, -B, C, D, and E is forty cubic feet per second. -</p> -<p> -The maximum amount of water that can flow through your gate when it is opened -is 25 cubic feet per second. If other people are using the canal, the water -flow available to you might be less, and it may take longer to get water to -your field since you are also limited by the amount of water that is flowing -through the shared canal. -</p> -]]> -</entry> -<entry key="general-instructionsq4"> -<![CDATA[ +<b>The next two questions deal with the capacity of the irrigation system in relation +to the actual amount of water available.</b> <br><br> -To continue to the next page, please answer the following question:<br> Question 3:<br> -<form> -What is the minimum time to deliver 500 cubic feet of water to your field when -your maximum water flow capacity is available? +If the irrigation efficiency is between 71 and 80%, the water delivery capacity of +the irrigation system is 35 cubic feet per second. Suppose the water supply +available to your group is 30 cubic feet per second and A opens their gate, +diverting water at 25 cubic feet per second. What is the available water flow for +B? <br> -<input type="radio" name="q5" value="12.5">12.5 seconds<br> -<input type="radio" name="q5" value="20">20 seconds<br> -<input type="radio" name="q5" value="25">25 seconds<br> -<input type="radio" name="q5" value="50">50 seconds<br> +<input type='text' name='q3' value=''> cubic feet per second <br><br> -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> +Question 4: +If the available water delivery capacity is 25 cubic feet per second and A, B, C, +and D are not using water, how much cubic feet of water per second is available for +E?<br> +<input type='text' name='q4' value=''> cubic feet per second +<br><br> +<input type="submit" name="submit" value="Submit"><br> +<br> -<entry key="general-instructions5"> -<![CDATA[ -<h3>Positions A,B,C,D and E</h3> -<p> -The animation above illustrates how water flows to each player when their gates are -opened and closed. When a player opens their gate, the black line will rotate to a -vertical position, allowing water (represented by white dots) to flow to them. Note -that the water available downstream of a player with an open port is reduced, -illustrated by a narrowing of the canal. -</p> -<p> -Access to water depends on your position as shown in the window. Water originates -in the box at the upper left part of the screen and travels to the right. Thus, -participant A will have first access to the available water. Water not used by -participant A is then available to be used by participant B. Water not used by -participants A and B is then available for C. Water not used by participants A, B -and C is available for D. Finally, water not used by participants A, B, C and D is -available for E. -</p> -<p> -You can only get water to your field if you have water available to your position. -Suppose that the total irrigation capacity available is 40 cfps and 40 cfps of water -is available. If player A opens their gate they will consume 25 cfps of water and 15 -cfps is left for B. Suppose on the other hand, A does not open the gate, then a -total of 40 cfps is left for B, allowing B to extract water at the maximum rate of -25 cfps. -</p> -<p> -As another example, suppose that the canal system has been allowed to deteriorate -so that the total irrigation capacity available is 20 cfps. While player A’s gate is -open, no water is available for B. If A is NOT using water, 20 cfps is available for -B. -</p> ]]> </entry> -<entry key="general-instructionsq5"> +<entry key="quiz-page2"> <![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> +<p> +The final two questions cover the number of tokens you can earn in within a round. +<b>Please refer to table 2 of your handout</b>. +</p> <form> -Suppose the irrigation efficiency is between 71 and 80% so that the canal flow -capacity is 30 cfps. If A opens their gate and diverts water at 25 cfps what is the -available water flow for B? -<br> -<input type="radio" name="q6" value="30">30 cfps<br> -<input type="radio" name="q6" value="25">25 cfps<br> -<input type="radio" name="q6" value="15">15 cfps<br> -<input type="radio" name="q6" value="5">5 cfps<br> +Question 5:<br> +If you invest 7 of the 10 tokens you start with and you apply 202 cubic feet of +water to your fields, what is the total number of tokens you will have earned at the +end of the round?<br> +<input type="text" name="q5" value="">tokens <br><br> -If the canal flow capacity available is 25 cfps and A,B,C and D are not using water, -what is the available water for E? -<br> -<input type="radio" name="q7" value="40">40 cfps<br> -<input type="radio" name="q7" value="25">25 cfps<br> -<input type="radio" name="q7" value="15">15 cfps<br> -<input type="radio" name="q7" value="0">0 cfps<br> - -<input type="submit" name="submit" value="Submit"> +Question 6:<br> +If you invest all 10 tokens you start with and you apply 555 cubic feet of water to +your fields, what is the total number of tokens you will have earned at the end of +the round?<br> +<input type="text" name="q6" value="">tokens <br><br> +<input type="submit" name="submit" value="Submit"> </form> ]]> </entry> -<entry key="general-instructions6"> -<![CDATA[ -<h3>How to grow crops</h3> -<p> -To start growing crops, click on the yellow button labeled "open gate". -This will open your irrigation gate and allow water to flow to your field if it is -available. The text on the button will change to "close gate" - if -you would like to close the gate and stop extracting water from the canal, just -click on the yellow button again. Your gate will close and the text on the button -will change back to "open gate". -</p> -<p> -The amount of water units (cubic feet) your field has received is shown on the -screen, as well as the resulting amount of tokens earned from growing a crop. -The number of tokens earned in each round depends on how much water you have -diverted to your field. If you receive less than 150 cubic feet (cf) the crop has -not received enough water to grow a crop and you will thus not receive any tokens. -The maximum earnings are received when between 500 cf and 549 cf are diverted to -your field. If more than 549 cf water is diverted to your field, this will -negatively affect the growth of the crop (i.e. overwatering) and less tokens will be -earned. In the table below you can see the amount of tokens earned for amount of -water applied to your field. -</p> -<b>Table 2</b>: Earnings resulting from the amount of water applied to your field. - -<table border="1" cellspacing="2" cellpadding="2"> -<thead> -<th>Water units received (cubic feet)</th> -<th>Tokens earned</th> -</thead> -<tr> -<td>< 150</td><td>0</td> -</tr> -<tr> -<td>150-199</td><td>1</td> -</tr> -<tr> -<td>200-249</td><td>4</td> -</tr> -<tr> -<td>250-299</td><td>10</td> -</tr> -<tr> -<td>300-349</td><td>15</td> -</tr> -<tr> -<td>350-399</td><td>18</td> -</tr> -<tr> -<td>400-499</td><td>19</td> -</tr> -<tr> -<td>500-549</td><td>20</td> -</tr> -<tr> -<td>550-649</td><td>19</td> -</tr> -<tr> -<td>650-699</td><td>18</td> -</tr> -<tr> -<td>700-749</td><td>15</td> -</tr> -<tr> -<td>750-799</td><td>10</td> -</tr> -<tr> -<td>800-849</td><td>4</td> -</tr> -<tr> -<td>850-899</td><td>1</td> -</tr> -<tr> -<td>> 899</td><td>0</td> -</tr> -</table> - -Your earnings at the end of the round depend on your investment and the number of -tokens received for the crop. For example, suppose you invest 6 out of the 10 -tokens you are endowed with at the start of the round and you receive 333 cubic feet -of water. Your total earnings will be the amount of tokens leftover from your -initial endowment (10 - 6) plus the tokens you earned from your crop (15 tokens for -333 cubic feet of water, see Table 2). The total number of tokens earned is 19 -($0.85 since each token is $0.05). - -]]> -</entry> - <entry key='water-collected-to-tokens-table'> <![CDATA[ <table border="1" cellspacing="2" cellpadding="2"> @@ -588,106 +287,35 @@ ]]> </entry> - -<entry key="general-instructionsq6"> +<entry key='chat-instructions'> <![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> -<form> -If you invest 7 of the 10 tokens you started with, and you put 202 cf of water -on your field, what is the <b>total number of tokens</b> you will have earned -for that round? -<br> -<input type="radio" name="q8" value="3">3<br> -<input type="radio" name="q8" value="5">5<br> -<input type="radio" name="q8" value="7">7<br> -<input type="radio" name="q8" value="13">13<br> -<br><br> -If you invest all 10 tokens you start with, and you put 555 cf of water on your -field, what is the total number of tokens your will have earned for that round? -<br> -<input type="radio" name="q9" value="10">10<br> -<input type="radio" name="q9" value="19">19<br> -<input type="radio" name="q9" value="20">20<br> -<input type="radio" name="q9" value="29">29<br> -<br><br> -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> - -<entry key="general-instructions7"> -<![CDATA[ -<h3>Scores</h3> -<p> -The total number of tokens collected during a round is shown on the screen with the -message: -<br><br> -Total tokens earned this round: 0 -<br><br> -This the total of tokens not invested in irrigation structure plus additional -tokens earned by growing a crop. -<br> -You will also see the scores of the other participants summarized on the screen. -Finally, you will see the water flow capacity of each player at any given moment, as -illustrated in the figure below. - -]]> -</entry> - - -<entry key="general-instructionsq7"> -<![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> -<form> -Each token is worth 5 cents, thus if you collected 30 tokens in a round you earned: -<br> -<input type="radio" name="q10" value=".15">$0.15<br> -<input type="radio" name="q10" value=".50">$0.50<br> -<input type="radio" name="q10" value="1.50">$1.50<br> -<input type="radio" name="q10" value="2.50">$2.50<br> -<br><br> -<input type="submit" name="submit" value="Submit"> -<br><br> -</form> -]]> -</entry> - -<entry key="general-instructions8"> -<![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. +<h3>Chat Instructions</h3> +You may now chat for %d seconds with the other members of your group. You may +discuss any aspect of the exercise with two important exceptions: </p> +<ol> +<li>You are <b>not allowed</b> to promise the other participants +side-payments or threaten them with any consequence after the experiment is +finished. +</li> +<li>You are <b>not allowed to reveal your real identity</b>.</li> +</ol> <p> -You will first chat via text with other participants in your group and then -decide how much you wish to invest in irrigation infrastructure maintenance. -After all investment decisions have been made you will begin the actual round -and make real-time decisions on when to open your gates and irrigate your -fields. +We will be monitoring the chat traffic. If we detect any violation of these rules, +we will have to remove <b>all members of the group where the violation occurred</b> +from the experiment. That group will have to wait until the entire experiment is +finished to receive payment. </p> <p> -If you have any questions feel free to raise your hand and to ask your question. -<b>Do you have any questions so far?</b> +You can send messages by typing in the text field at the bottom of the screen +and then pressing the return key. The time left for the discussion is displayed with +a progress bar above the text field at the bottom of the screen. </p> ]]> </entry> -<entry key="undisrupted-flow-instructions"> -<![CDATA[ -<p> -If the flow of water is disrupted while your gate is open your crop growing progress -will be halted. -</p> -]]> -</entry> - - <entry key="investment-instructions"> <![CDATA[ -<h3>Invest tokens in the irrigation infrastructure</h3> <p> You have been endowed with 10 tokens to invest. You must make a decision about how much you wish to invest [0,10] in the irrigation infrastructure. You can @@ -702,8 +330,8 @@ </p> <table border="1" cellspacing="2" cellpadding="2"> <thead> -<th>Total Infrastructure Efficiency (percent)</th> -<th>Water delivery (cubic feet per second)</th> +<th>Irrigation Infrastructure Efficiency (percent)</th> +<th>Water delivery capacity (cubic feet per second)</th> </thead> <tr> <td> ≤ 45</td><td>0</td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2010-02-02 04:38:57
|
Revision: 445 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=445&view=rev Author: alllee Date: 2010-02-02 04:38:51 +0000 (Tue, 02 Feb 2010) Log Message: ----------- fixed configuration for first treatment. Should start to templatize these configuration files. Modified Paths: -------------- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round0.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round10.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round11.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round13.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round14.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round15.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round16.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round17.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round18.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round19.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round2.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round20.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round21.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round3.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round4.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round5.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round6.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round7.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round8.xml irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round9.xml Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/irrigation.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -21,9 +21,14 @@ <entry key="round14">round14.xml</entry> <entry key="round15">round15.xml</entry> <entry key="round16">round16.xml</entry> +<entry key="round17">round17.xml</entry> +<entry key="round18">round18.xml</entry> +<entry key="round19">round19.xml</entry> +<entry key="round20">round20.xml</entry> +<entry key="round21">round21.xml</entry> <entry key="wait-for-participants">true</entry> -<entry key="number-of-rounds">17</entry> +<entry key="number-of-rounds">22</entry> <entry key="undisrupted-flow-required">true</entry> @@ -59,7 +64,7 @@ <h3>Welcome</h3> <p> Please be patient while the experimental environment is set up. -<b>Please do not close this window or open any other windows.</b> +<b>Please do not close this window or open any other programs.</b> </p> ]]> </entry> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round0.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round0.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round0.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -4,7 +4,10 @@ <comment>Irrigation experiment round configuration</comment> <entry key="practice-round">true</entry> +<entry key='reset-infrastructure-efficiency'>true</entry> +<entry key='initial-infrastructure-efficiency'>50</entry> + <entry key="instructions"> <![CDATA[ <p> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round10.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round10.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round10.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,8 +3,6 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 9 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round11.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round11.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round11.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,14 +3,11 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>85</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 10 Instructions</h3> <p> -This round is the same as the previous round, but the infrastructure -irrigation efficiency has experienced a severe decline of 85%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round12.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,30 +2,24 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> +<entry key='infrastructure-degradation-factor'>20</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 11 Instructions</h3> <p> -This is round 11/20. +In the past rounds the infrastructure efficiency declined from one round to +the next at a constant amount of 25%. In the following rounds the <b>average +decline</b> of the infrastructure efficiency will remain the same, but the +<b>actual amount</b> of decline can vary from round to round. This means that +in some rounds the decline will be larger than 25% and some rounds the decline +will be smaller than 25%. Before each round begins you will continue to make a +decision on how much to invest in the irrigation infrastructure. After all of +your investment contributions have been submitted the resulting level of +infrastructure efficiency will be displayed and then the round will begin. If +you have any questions, please ask them now. </p> -<p> -In the past 10 rounds the infrastructure efficiency declined from one round to the -next at a constant rate of 25%. In the following 10 rounds the average decline of -the infrastructure efficiency remains the same, but the amount of decline can vary -from round to round. This means that in some rounds the decline will be larger than 25% -and some rounds the decline will be smaller than 25%. Before each round begins you -will continue to make a decision on how much to invest in the irrigation -infrastructure. After all of your investment contributions have been submitted the -resulting level of infrastructure efficiency will be displayed and then the round -will begin. If you have any questions, please ask them now. -</p> -The infrastructure has been degraded by 10%. -</p> - ]]> </entry> </properties> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round13.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round13.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round13.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,13 +2,14 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key="max-total-token-contribution">50</entry> -<entry key='infrastructure-degradation-factor'>10</entry> + +<entry key='infrastructure-degradation-factor'>30</entry> + <entry key="instructions"> <![CDATA[ <h3>Round 12 Instructions</h3> <p> -This is round 12/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round14.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round14.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round14.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,13 +2,14 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>85</entry> +<entry key='infrastructure-degradation-factor'>25</entry> + <entry key="instructions"> <![CDATA[ <h3>Round 13 Instructions</h3> <p> -This is round 13/20. The infrastructure has suffered a severe shock and has been degraded by 85%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round15.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round15.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round15.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,13 +2,13 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> +<entry key='infrastructure-degradation-factor'>20</entry> <entry key="instructions"> <![CDATA[ <h3>Round 14 Instructions</h3> <p> -This is round 14/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round16.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round16.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round16.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,14 +2,14 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> +<entry key='infrastructure-degradation-factor'>35</entry> <entry key="instructions"> <![CDATA[ <h3>Round 15 Instructions</h3> <p> -This is round 15/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round17.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round17.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round17.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,12 +2,12 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> +<entry key='infrastructure-degradation-factor'>20</entry> <entry key="instructions"> <![CDATA[ <h3>Round 16 Instructions</h3> <p> -This is round 16/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round18.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round18.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round18.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,13 +2,13 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>85</entry> +<entry key='infrastructure-degradation-factor'>15</entry> <entry key="instructions"> <![CDATA[ <h3>Round 17 Instructions</h3> <p> -This is round 17/20. The infrastructure has suffered a severe shock and has been degraded by 85%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round19.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round19.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round19.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,14 +2,14 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> +<entry key='infrastructure-degradation-factor'>30</entry> <entry key="instructions"> <![CDATA[ <h3>Round 18 Instructions</h3> <p> -This is round 18/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round2.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round2.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round2.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -10,8 +10,8 @@ <h3>Round 1 Instructions</h3> <p> This is the first actual round of the experiment. Before this round begins -you will have the opportunity to text chat with the other participant for -forty seconds, then decide on your level of investment in the irrigation +you will have the opportunity to text chat with the other participants in your +group, then decide on your level of investment in the irrigation infrastructure. After the total irrigation infrastructure investment has been determined you will begin the experiment and make decisions on when to open your irrigation gates and grow crops. Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round20.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round20.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round20.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -2,15 +2,14 @@ <!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"> <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> -<entry key="clients-per-group">5</entry> +<entry key='infrastructure-degradation-factor'>30</entry> <entry key="instructions"> <![CDATA[ <h3>Round 19 Instructions</h3> <p> -This is round 19/20. The infrastructure has been degraded by 10%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round21.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round21.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round21.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,13 +3,14 @@ <properties> <comment>Irrigation experiment round configuration</comment> +<entry key='infrastructure-degradation-factor'>25</entry> + <entry key="instructions"> <![CDATA[ <h3>Round 20 Instructions</h3> <p> -This is round 20/20. The infrastructure has been degraded by 10%. +This is the final round. </p> - ]]> </entry> </properties> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round3.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round3.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round3.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -7,8 +7,7 @@ <![CDATA[ <h3>Round 2 Instructions</h3> <p> -This round is the same as the previous round, but the infrastructure irrigation has -been decreased by 25%. +This round is the same as the previous round. </p> ]]> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round4.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round4.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round4.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -7,10 +7,8 @@ <![CDATA[ <h3>Round 3 Instructions</h3> <p> -This round is the same as the previous round, but the infrastructure irrigation has -been decreased by 25%. +This round is the same as the previous round. </p> - ]]> </entry> </properties> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round5.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round5.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round5.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,24 +3,12 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 4 Instructions</h3> <p> -In the past rounds the infrastructure efficiency declined from one round to -the next at a constant amount of 25%. In the following rounds the <b>average -decline</b> of the infrastructure efficiency will remain the same, but the -<b>actual amount</b> of decline can vary from round to round. This means that -in some rounds the decline will be larger than 25% and some rounds the decline -will be smaller than 25%. Before each round begins you will continue to make a -decision on how much to invest in the irrigation infrastructure. After all of -your investment contributions have been submitted the resulting level of -infrastructure efficiency will be displayed and then the round will begin. If -you have any questions, please ask them now. +This round is the same as the previous round. </p> - ]]> </entry> </properties> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round6.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round6.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round6.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,8 +3,6 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>85</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 5 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round7.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round7.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round7.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,8 +3,6 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 6 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round8.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round8.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round8.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,8 +3,6 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>30</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 7 Instructions</h3> Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round9.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round9.xml 2010-01-25 04:41:25 UTC (rev 444) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/t1/round9.xml 2010-02-02 04:38:51 UTC (rev 445) @@ -3,8 +3,6 @@ <properties> <comment>Irrigation experiment round configuration</comment> -<entry key='infrastructure-degradation-factor'>10</entry> - <entry key="instructions"> <![CDATA[ <h3>Round 8 Instructions</h3> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <see...@us...> - 2010-01-25 04:41:32
|
Revision: 444 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=444&view=rev Author: seematalele Date: 2010-01-25 04:41:25 +0000 (Mon, 25 Jan 2010) Log Message: ----------- Changed the HQL query parameters: getLastDay. Modified Paths: -------------- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java Modified: mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java =================================================================== --- mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-16 00:30:20 UTC (rev 443) +++ mentalmodels/trunk/src/main/java/edu/asu/commons/mme/service/AnsweringService.java 2010-01-25 04:41:25 UTC (rev 444) @@ -33,7 +33,7 @@ Student student; public static final String getLastDay = "SELECT max(d.dayNumber) FROM DayByDayDecisions d " + - "where d.student=:student and d.studentStrategy != NULL"; + "where d.student.id=:studentId and d.studentStrategy.id != NULL"; /** * This method is for Psychometric, Categorical and text question types. @@ -91,9 +91,9 @@ studentStrategy.setThreshold(clientStudentStrategy.getThreshold()); studentStrategy.setRepeatedDecisionNo(clientStudentStrategy.getRepeatedDecisionNo()); getStudentStrategyDao().save(studentStrategy); - + Query getLastDayForStudent = getStudentStrategyDao().getCurrentSession().createQuery(getLastDay); - getLastDayForStudent.setEntity("student", studentStrategy.getStudent()); + getLastDayForStudent.setEntity("studentId", studentStrategy.getStudent().getId()); Iterator<?> lastdayIterator = getLastDayForStudent.list().iterator(); getLogger().debug("Days are : " + studentStrategy.getDays()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Kalin J. <kj...@as...> - 2010-01-21 20:57:59
|
checking out today at 14:00pm LazyInitializationException keeps showing up inconsistently when "Start Game" button is pressed. SaveStrategy is still not working; mysql table mme.student_response is completely empty... no idea why. On Thu, Jan 21, 2010 at 12:10 PM, Kalin Jonas <kj...@as...> wrote: > (left work at 17:30 friday) > > Today I am coming in to work at 12:15 > I'll be checking to see if the new strategy design is saving properly to > the database > > > On Fri, Jan 15, 2010 at 2:13 PM, Kalin Jonas <kj...@as...> wrote: > >> return from lunch at 14:15pm >> >> >> On Fri, Jan 15, 2010 at 1:41 PM, Kalin Jonas <kj...@as...> wrote: >> >>> lunch at 13:45pm (2.25hr) >>> >>> >>> On Fri, Jan 15, 2010 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: >>> >>>> Coming in to work today at 11:30am >>>> I will be working on modifying the Strategy design component as per my >>>> last discussion with Seema on the topic. >>>> >>>> >>>> On Wed, Jan 13, 2010 at 4:47 PM, Kalin Jonas <kj...@as...> wrote: >>>> >>>>> checking out at 16:45pm (3.5hr) >>>>> Working on resolving communication problem. the messages are being >>>>> sent to the server, just not pushed back to all clients. >>>>> >>>>> On 1/13/10, Kalin Jonas <kj...@as...> wrote: >>>>> > coming in to work today at 13:15 pm >>>>> > I'm still trying to get the laptop at home set up for working in >>>>> flex. >>>>> > also working on fixing the errors that I left behind yesterday >>>>> > >>>>> > On 1/12/10, Kalin Jonas <kj...@as...> wrote: >>>>> >> Leaving at 16:15(1.5hr) >>>>> >> worked with seema on the communication problem, making headway >>>>> >> must fix problem - communication component does not keep track of >>>>> student >>>>> >> yet. >>>>> >> >>>>> >> On Tue, Jan 12, 2010 at 2:47 PM, Kalin Jonas <kj...@as...> >>>>> wrote: >>>>> >> >>>>> >>> Returning at 14:45 >>>>> >>> working on second laptop via remote desktop to set it up for flex >>>>> work. >>>>> >>> >>>>> >>> >>>>> >>> On Tue, Jan 12, 2010 at 2:15 PM, Kalin Jonas <kj...@as...> >>>>> wrote: >>>>> >>> >>>>> >>>> checking out for lunch at 14:15pm (4hr) >>>>> >>>> linux trial has expired, and therefore no progress has been made. >>>>> >>>> working >>>>> >>>> on another computer to try and set it up for use. >>>>> >>>> >>>>> >>>> >>>>> >>>> On Tue, Jan 12, 2010 at 10:10 AM, Kalin Jonas <kj...@as...> >>>>> wrote: >>>>> >>>> >>>>> >>>>> Coming in to work today at 10:15am. >>>>> >>>>> I will be working on the new Strategy Design component as Seema >>>>> and I >>>>> >>>>> discussed: it will have only one list of actions (repeated) and I >>>>> will >>>>> >>>>> be >>>>> >>>>> removing the SuspendRepetition functionality. >>>>> >>>>> I will begin by backing up the old component now. >>>>> >>>>> >>>>> >>>> >>>>> >>>> >>>>> >>> >>>>> >> >>>>> > >>>>> >>>> >>>> >>> >> > |
From: Kalin J. <kj...@as...> - 2010-01-21 19:17:45
|
(left work at 17:30 friday) Today I am coming in to work at 12:15 I'll be checking to see if the new strategy design is saving properly to the database On Fri, Jan 15, 2010 at 2:13 PM, Kalin Jonas <kj...@as...> wrote: > return from lunch at 14:15pm > > > On Fri, Jan 15, 2010 at 1:41 PM, Kalin Jonas <kj...@as...> wrote: > >> lunch at 13:45pm (2.25hr) >> >> >> On Fri, Jan 15, 2010 at 11:26 AM, Kalin Jonas <kj...@as...> wrote: >> >>> Coming in to work today at 11:30am >>> I will be working on modifying the Strategy design component as per my >>> last discussion with Seema on the topic. >>> >>> >>> On Wed, Jan 13, 2010 at 4:47 PM, Kalin Jonas <kj...@as...> wrote: >>> >>>> checking out at 16:45pm (3.5hr) >>>> Working on resolving communication problem. the messages are being >>>> sent to the server, just not pushed back to all clients. >>>> >>>> On 1/13/10, Kalin Jonas <kj...@as...> wrote: >>>> > coming in to work today at 13:15 pm >>>> > I'm still trying to get the laptop at home set up for working in flex. >>>> > also working on fixing the errors that I left behind yesterday >>>> > >>>> > On 1/12/10, Kalin Jonas <kj...@as...> wrote: >>>> >> Leaving at 16:15(1.5hr) >>>> >> worked with seema on the communication problem, making headway >>>> >> must fix problem - communication component does not keep track of >>>> student >>>> >> yet. >>>> >> >>>> >> On Tue, Jan 12, 2010 at 2:47 PM, Kalin Jonas <kj...@as...> wrote: >>>> >> >>>> >>> Returning at 14:45 >>>> >>> working on second laptop via remote desktop to set it up for flex >>>> work. >>>> >>> >>>> >>> >>>> >>> On Tue, Jan 12, 2010 at 2:15 PM, Kalin Jonas <kj...@as...> >>>> wrote: >>>> >>> >>>> >>>> checking out for lunch at 14:15pm (4hr) >>>> >>>> linux trial has expired, and therefore no progress has been made. >>>> >>>> working >>>> >>>> on another computer to try and set it up for use. >>>> >>>> >>>> >>>> >>>> >>>> On Tue, Jan 12, 2010 at 10:10 AM, Kalin Jonas <kj...@as...> >>>> wrote: >>>> >>>> >>>> >>>>> Coming in to work today at 10:15am. >>>> >>>>> I will be working on the new Strategy Design component as Seema >>>> and I >>>> >>>>> discussed: it will have only one list of actions (repeated) and I >>>> will >>>> >>>>> be >>>> >>>>> removing the SuspendRepetition functionality. >>>> >>>>> I will begin by backing up the old component now. >>>> >>>>> >>>> >>>> >>>> >>>> >>>> >>> >>>> >> >>>> > >>>> >>> >>> >> > |
From: Allen L. (JIRA) <jef...@as...> - 2010-01-19 18:02:34
|
[ http://opensource.asu.edu/jira/browse/COMMONS-13?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Allen Lee resolved COMMONS-13. ------------------------------ Fix Version/s: irrigation.asu.spring.2010 Resolution: Fixed Added IrrigationSaveFileConverter to convert binary save files. > verify save file integrity > -------------------------- > > Key: COMMONS-13 > URL: http://opensource.asu.edu/jira/browse/COMMONS-13 > Project: The Virtual Commons > Issue Type: Task > Components: irrigation > Affects Versions: irrigation.asu.fall.2009, irrigation.asu.spring.2010 > Reporter: Allen Lee > Assignee: Allen Lee > Fix For: irrigation.asu.spring.2010, irrigation.asu.fall.2009 > > > Verify save file integrity for November 09 irrigation pretests. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.asu.edu/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: <kj...@us...> - 2010-01-16 00:30:35
|
Revision: 443 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=443&view=rev Author: kjonas Date: 2010-01-16 00:30:20 +0000 (Sat, 16 Jan 2010) Log Message: ----------- updated swf files Modified Paths: -------------- mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf Modified: mentalmodels/trunk/src/main/webapp/FisheryExperimentShell.swf =================================================================== (Binary files differ) Modified: mentalmodels/trunk/src/main/webapp/InitialiseDatabase.swf =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kj...@us...> - 2010-01-16 00:09:50
|
Revision: 442 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=442&view=rev Author: kjonas Date: 2010-01-16 00:09:43 +0000 (Sat, 16 Jan 2010) Log Message: ----------- strToLocation method replaced with intToLocation method. formerly a dummy method, this now takes an index (0,1,2,3,4...) and returns the Location associated with it from the DataModel (0=Harbor, 1=Bay1, etc (presumably)) Modified Paths: -------------- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml 2010-01-16 00:08:20 UTC (rev 441) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/PlannerRow.mxml 2010-01-16 00:09:43 UTC (rev 442) @@ -40,9 +40,9 @@ threshold.enabled = threshold.visible; } - public function getLocation():String + public function getLocation():int { - return location.selectedItem as String; + return location.selectedIndex; // if(location.selectedIndex == 0) // { // return "Harbor"; Modified: mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml =================================================================== --- mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-16 00:08:20 UTC (rev 441) +++ mentalmodels/trunk/flex/src/custom/questions/strategyDesign/StrategyDesignQuestionC.mxml 2010-01-16 00:09:43 UTC (rev 442) @@ -17,6 +17,7 @@ <mx:Script> <![CDATA[ + import actionscript.DataModel; import mx.controls.Alert; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; @@ -89,7 +90,7 @@ { tempArray = repeatedArray.getItemAt(i) as ArrayCollection; tempObject = new StudentStrategy(); - tempObject.location = strToLocation(tempArray.getItemAt(0) as String); + tempObject.location = intToLocation(tempArray.getItemAt(0) as int); tempObject.days = int(tempArray.getItemAt(1) as Number); tempObject.threshold = (tempArray.getItemAt(2) as Number); tempObject.round = repeated.round; @@ -102,9 +103,9 @@ return array; } - private function strToLocation(str:String):Location + private function intToLocation(index:int):Location { - return new Location(); + return DataModel.instance.locations.getItemAt(index) as Location; } ]]> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <al...@us...> - 2010-01-16 00:08:32
|
Revision: 441 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=441&view=rev Author: alllee Date: 2010-01-16 00:08:20 +0000 (Sat, 16 Jan 2010) Log Message: ----------- first cut at an irrigation save file converter. still need to verify all persisted data. Modified Paths: -------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ClientDataModel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/InfrastructureEfficiencyChartPanel.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java Added Paths: ----------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ClientDataModel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ClientDataModel.java 2010-01-15 23:46:54 UTC (rev 440) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ClientDataModel.java 2010-01-16 00:08:20 UTC (rev 441) @@ -122,7 +122,7 @@ } public int getIrrigationCapacity() { - return groupDataModel.getWaterDeliveryCapacity(); + return groupDataModel.getIrrigationCapacity(); } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java 2010-01-15 23:46:54 UTC (rev 440) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java 2010-01-16 00:08:20 UTC (rev 441) @@ -479,13 +479,13 @@ String.format( "<li>Total group investment: %d tokens, increasing the infrastructure efficiency to %d%%</li>", totalContributedTokens, groupDataModel.getInfrastructureEfficiency())); - if (groupDataModel.getWaterDeliveryCapacity() > groupDataModel.getIrrigationCapacityBeforeInvestment()) { + if (groupDataModel.getIrrigationCapacity() > groupDataModel.getIrrigationCapacityBeforeInvestment()) { builder.append("<li><b>Your group's investment has increased the water delivery capacity to "); } else { builder.append("<li>Your group's investment was not enough to increase the water delivery capacity. Your group's water delivery capacity is still "); } - builder.append(groupDataModel.getWaterDeliveryCapacity()).append(" cubic feet of water per second.</li><li>The amount of water available to pass through your irrigation canal is ") + builder.append(groupDataModel.getIrrigationCapacity()).append(" cubic feet of water per second.</li><li>The amount of water available to pass through your irrigation canal is ") .append(groupDataModel.getActualWaterDeliveryCapacity()).append(" cubic feet per second</li>"); SwingUtilities.invokeLater(new Runnable() { public void run() { @@ -549,7 +549,7 @@ "<h2>Current water delivery capacity: %d cubic feet per second</h2>" + "<h2>Available water supply: %d cubic feet per second</h2>", infrastructureEfficiency, - group.calculateWaterDeliveryCapacity(infrastructureEfficiency), + group.calculateIrrigationCapacity(infrastructureEfficiency), roundConfiguration.getWaterSupplyCapacity() )); builder.append(getServerConfiguration().getInvestmentInstructions()); @@ -564,7 +564,7 @@ if (! roundConfiguration.isFirstRound()) { instructionsBuilder.append(roundConfiguration.getInstructions()); instructionsBuilder.append("<hr/>"); - int irrigationCapacity = clientDataModel.getGroupDataModel().getWaterDeliveryCapacity(); + int irrigationCapacity = clientDataModel.getGroupDataModel().getIrrigationCapacity(); // int clientCapacity = roundConfiguration.getMaximumClientFlowCapacity(); if (roundConfiguration.shouldResetInfrastructureEfficiency()) { instructionsBuilder.append("The irrigation infrastructure efficiency is currently 75% (water delivery capacity of 35 cfps)."); Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/InfrastructureEfficiencyChartPanel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/InfrastructureEfficiencyChartPanel.java 2010-01-15 23:46:54 UTC (rev 440) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/InfrastructureEfficiencyChartPanel.java 2010-01-16 00:08:20 UTC (rev 441) @@ -54,7 +54,7 @@ final XYSeries waterSupplySeries = new XYSeries("Available water supply"); GroupDataModel group = client.getClientDataModel().getGroupDataModel(); final int actualInfrastructureEfficiency = group.getInfrastructureEfficiency(); - final int actualFlowCapacity = group.getWaterDeliveryCapacity(); + final int actualFlowCapacity = group.getIrrigationCapacity(); for (int y = 0; y <= actualFlowCapacity; y++) { postInvestmentInfrastructureEfficiencySeries.add(actualInfrastructureEfficiency, y); } @@ -62,7 +62,7 @@ int maximumInfrastructureEfficiency = roundConfiguration.getMaximumInfrastructureEfficiency(); int waterSupplyCapacity = roundConfiguration.getWaterSupplyCapacity(); for (int x = 0; x <= maximumInfrastructureEfficiency; x++) { - int flowCapacity = group.calculateWaterDeliveryCapacity(x); + int flowCapacity = group.calculateIrrigationCapacity(x); potentialInfrastructureEfficiencySeries.add(x,flowCapacity); waterSupplySeries.add(x, waterSupplyCapacity); } Added: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java (rev 0) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java 2010-01-16 00:08:20 UTC (rev 441) @@ -0,0 +1,172 @@ +package edu.asu.commons.irrigation.data; + +import java.io.File; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.SortedSet; +import java.util.TreeSet; +import java.util.concurrent.TimeUnit; + +import edu.asu.commons.event.ChatRequest; +import edu.asu.commons.event.PersistableEvent; +import edu.asu.commons.experiment.Persister; +import edu.asu.commons.experiment.SaveFileProcessor; +import edu.asu.commons.experiment.SavedRoundData; +import edu.asu.commons.irrigation.conf.RoundConfiguration; +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; + +/** + * $Id$ + * + * + * @author <a href='mailto:All...@as...'>Allen Lee</a> + * @version $Rev$ + */ +public class IrrigationSaveFileConverter { + + public static boolean convert(String saveDataDirectory) { + File allSaveFilesDirectory = new File(saveDataDirectory); + if (allSaveFilesDirectory.exists() && allSaveFilesDirectory.isDirectory()) { + List<SaveFileProcessor> processors = new ArrayList<SaveFileProcessor>(); + processors.addAll(Arrays.asList( + new ClientTokensProcessor(), + new AllDataProcessor(), + new SummaryProcessor() + )); + Persister.processSaveFiles(allSaveFilesDirectory, processors); + return true; + } + return false; + } + + public static void main(String[] args) { + if (args.length == 0) { + System.err.println("Usage: java " + IrrigationSaveFileConverter.class + " <save-data-directory>"); + System.exit(0); + } + if (convert(args[0])) { + System.err.println("Successfully converted files in " + args[0]); + } + else { + System.err.println(args[0] + " doesn't appear to be a valid save file directory."); + } + } + + private static class AllDataProcessor extends SaveFileProcessor.Base { + + @Override + public void process(SavedRoundData savedRoundData, PrintWriter writer) { + writer.println("Group #, Identifier, Event"); + ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); + ArrayList<GroupDataModel> groups = new ArrayList<GroupDataModel>(serverDataModel.getAllGroupDataModels()); + for (PersistableEvent persistableEvent: savedRoundData.getActions()) { + Identifier id = persistableEvent.getId(); + GroupDataModel group = serverDataModel.getGroupDataModel(id); + writer.println(String.format("%s, %s, %s", groups.indexOf(group), id, persistableEvent)); + } + } + + @Override + public String getOutputFileExtension() { + return "-all-data.txt"; + } + + } + + private static class SummaryProcessor extends SaveFileProcessor.Base { + + @Override + public void process(SavedRoundData savedRoundData, PrintWriter writer) { + ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); + RoundConfiguration roundConfiguration = (RoundConfiguration) savedRoundData.getRoundParameters(); + ArrayList<GroupDataModel> groups = new ArrayList<GroupDataModel>(serverDataModel.getAllGroupDataModels()); + writer.println("Group, Total group tokens earned, Water availability, Water supply, Tokens invested"); + for (GroupDataModel group: groups) { + int totalGroupTokensEarned = 0; + int totalGroupTokenInvestment = 0; + for (ClientData data : group.getClientDataMap().values()) { + totalGroupTokensEarned += data.getAllTokensEarnedThisRound(); + totalGroupTokenInvestment += data.getInvestedTokens(); + } + writer.println(String.format("%s, %d, %d, %d, %d", + groups.indexOf(group), + totalGroupTokensEarned, + group.getIrrigationCapacity(), + roundConfiguration.getWaterSupplyCapacity(), + totalGroupTokenInvestment)); + } + Map<GroupDataModel, SortedSet<ChatRequest>> chatRequestMap = new HashMap<GroupDataModel, SortedSet<ChatRequest>>(); + SortedSet<ChatRequest> allChatRequests = savedRoundData.getChatRequests(); + if (! allChatRequests.isEmpty()) { + ChatRequest first = allChatRequests.first(); + for (ChatRequest request: savedRoundData.getChatRequests()) { + GroupDataModel group = serverDataModel.getGroupDataModel(request.getSource()); + if (chatRequestMap.containsKey(group)) { + chatRequestMap.get(group).add(request); + } + else { + TreeSet<ChatRequest> chatRequests = new TreeSet<ChatRequest>(); + chatRequests.add(request); + chatRequestMap.put(group, chatRequests); + } + } + // FIXME: hack to deal with rolling chat logs + // set last creation time to the last chat request that occurred so in the next chat round + // we'll know if we repeated a chat request. + // ChatRequest last = allChatRequests.last(); + // lastCreationTime = last.getCreationTime(); + // System.err.println("last creation time: " + lastCreationTime + " - " + last); + for (GroupDataModel group: groups) { + SortedSet<ChatRequest> chatRequests = chatRequestMap.get(group); + if (chatRequests != null) { + writer.println("Group #" + groups.indexOf(group) + " chats"); + for (ChatRequest request: chatRequests) { + writer.println( + String.format("%s: %s (%s s)", + request.getSource(), + request.toString(), + TimeUnit.SECONDS.convert(request.getCreationTime() - first.getCreationTime(), TimeUnit.NANOSECONDS))); + } + } + } + } + } + + @Override + public String getOutputFileExtension() { + return "-summary.txt"; + } + + } + + private static class ClientTokensProcessor extends SaveFileProcessor.Base { + + public void process(SavedRoundData savedRoundData, PrintWriter writer) { + ServerDataModel serverDataModel = (ServerDataModel) savedRoundData.getDataModel(); + ArrayList<GroupDataModel> groups = new ArrayList<GroupDataModel>(serverDataModel.getAllGroupDataModels()); + writer.println("Group #, Identifier, Position, Tokens Earned From Water Collected, Uninvested Tokens"); + for (GroupDataModel group: groups) { + for (ClientData data : group.getClientDataMap().values()) { + writer.println(String.format("%s, %s, %s, %s, %s", + groups.indexOf(group), data.getId(), data.getPriorityString(), data.getTokensEarnedFromWaterCollected(), data.getUninvestedTokens())); + } + } + + + } + + @Override + public String getOutputFileExtension() { + return "-tokens.txt"; + } + + } + +} Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java 2010-01-15 23:46:54 UTC (rev 440) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java 2010-01-16 00:08:20 UTC (rev 441) @@ -124,7 +124,7 @@ * @param totalTokens * @return */ - public int calculateWaterDeliveryCapacity(final int infrastructureEfficiency) { + public int calculateIrrigationCapacity(final int infrastructureEfficiency) { if (infrastructureEfficiency <= 45) { return 0; } @@ -157,15 +157,15 @@ public int getIrrigationCapacityBeforeInvestment() { // return Math.min(calculateFlowCapacity(initialInfrastructureEfficiency), getRoundConfiguration().getWaterSupplyCapacity()); - return calculateWaterDeliveryCapacity(infrastructureEfficiencyBeforeInvestment); + return calculateIrrigationCapacity(infrastructureEfficiencyBeforeInvestment); } /** * Returns the theoretical maximum amount of water that the infrastructure can handle. * This is independent of the actual water supply. */ - public int getWaterDeliveryCapacity() { - return calculateWaterDeliveryCapacity(infrastructureEfficiency); + public int getIrrigationCapacity() { + return calculateIrrigationCapacity(infrastructureEfficiency); // return Math.min(calculateFlowCapacity(infrastructureEfficiency), getRoundConfiguration().getWaterSupplyCapacity()); } @@ -175,7 +175,7 @@ * @return */ public int getActualWaterDeliveryCapacity() { - return Math.min(getWaterDeliveryCapacity(), getRoundConfiguration().getWaterSupplyCapacity()); + return Math.min(getIrrigationCapacity(), getRoundConfiguration().getWaterSupplyCapacity()); } public void resetCurrentlyAvailableFlowCapacity() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |