[virtualcommons-svn] SF.net SVN: virtualcommons:[301] irrigation/trunk/src/main
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2009-10-19 18:58:27
|
Revision: 301 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=301&view=rev Author: alllee Date: 2009-10-19 18:58:17 +0000 (Mon, 19 Oct 2009) Log Message: ----------- finished adding the rest of the general instructions, still need to fill in screenshots. More refactoring on the client GUI as well, general instructions are almost complete. 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/IrrigationClient.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/RegistrationEvent.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml 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 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ClientDataModel.java 2009-10-19 18:58:17 UTC (rev 301) @@ -1,6 +1,3 @@ -/** - * - */ package edu.asu.commons.irrigation.client; import java.util.ArrayList; @@ -32,13 +29,15 @@ private GroupDataModel groupDataModel; private IrrigationClient client; - + + private ServerConfiguration serverConfiguration; private RoundConfiguration roundConfiguration; private int timeLeft = 0; public ClientDataModel(EventChannel channel, IrrigationClient client) { this.client = client; + this.serverConfiguration = client.getServerConfiguration(); } public ClientData getClientData() { @@ -85,12 +84,11 @@ } public ServerConfiguration getServerConfiguration() { - return roundConfiguration.getParentConfiguration(); + return serverConfiguration; } public void setGroupDataModel(GroupDataModel groupDataModel) { this.groupDataModel = groupDataModel; - setRoundConfiguration(groupDataModel.getRoundConfiguration()); } public GroupDataModel getGroupDataModel() { 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 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/ExperimentGameWindow.java 2009-10-19 18:58:17 UTC (rev 301) @@ -41,6 +41,8 @@ * $Id$ * * The root experiment window placed in the client's JFrame. + * + * FIXME: refactor this class. * * @author <a href='mailto:All...@as...'>Allen Lee</a> * @version $Rev$ @@ -50,6 +52,8 @@ private static final long serialVersionUID = -5636795631355367711L; private ClientDataModel clientDataModel; + + private ChatPanel chatPanel; private JScrollPane instructionsScrollPane; @@ -249,7 +253,7 @@ // FIXME: get rid of hardcoded animation on page 5. Should instead // just be an animated gif or something like that. // should be more like "if instructions.hasAnimation()" - if(instructionNumber == 5) { + if (instructionNumber == 5) { getInstructionsPanel().add(getCanalAnimationPanel(), BorderLayout.PAGE_START); } else { @@ -421,12 +425,11 @@ * @return */ private String getGeneralInstructions(int pageNumber, int pagesTraversed) { - return clientDataModel.getServerConfiguration().getGeneralInstructions(pageNumber, pagesTraversed, client.getClientDataModel().getPriority()); } private String getGeneralInstructions(int pageNumber) { - return client.getServerConfiguration().getGeneralInstructions(pageNumber); + return clientDataModel.getServerConfiguration().getGeneralInstructions(pageNumber); } private JTextField getInvestedTokensTextField() { @@ -645,7 +648,7 @@ "showup fee, for a grand total of $%3.2f", (float)dollarsPerToken*clientData.getTotalTokensEarned(), (float)dollarsPerToken*clientData.getTotalTokens(), - (float)dollarsPerToken*clientData.getTotalTokens() + client.getServerConfiguration().getShowUpPayment() + (float)dollarsPerToken*clientData.getTotalTokens() + clientDataModel.getServerConfiguration().getShowUpPayment() )); //append the added practice round instructions if(clientDataModel.getRoundConfiguration().isPracticeRound()) { @@ -665,7 +668,8 @@ public void run() { instructionsEditorPane.setText(instructions); instructionsEditorPane.setCaretPosition(0); - instructionsScrollPane.requestFocusInWindow(); + instructionsScrollPane.requestFocusInWindow(); + ExperimentGameWindow.this.repaint(); } }); } @@ -900,7 +904,6 @@ addCenterComponent(getInstructionsPanel()); } - private ChatPanel chatPanel; private ChatPanel getChatPanel() { if (chatPanel == null) { chatPanel = new ChatPanel(); Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/client/IrrigationClient.java 2009-10-19 18:58:17 UTC (rev 301) @@ -69,7 +69,7 @@ public IrrigationClient(EventChannel channel, ServerConfiguration serverConfiguration) { this.channel = channel; - this.serverConfiguration = serverConfiguration; + setServerConfiguration(serverConfiguration); this.clientDispatcher = DispatcherFactory.getInstance().createClientDispatcher(channel); } @@ -158,9 +158,12 @@ } private void initEventProcessors() { + // registration events are sent before the start of each round and contain the configuration + // for that round, including all instructions, parameters, for that round. channel.add(this, new EventTypeProcessor<RegistrationEvent>(RegistrationEvent.class) { public void handle(RegistrationEvent event) { RoundConfiguration configuration = event.getRoundConfiguration(); + clientDataModel.setGroupDataModel(event.getClientData().getGroupDataModel()); clientDataModel.setRoundConfiguration(configuration); experimentGameWindow.updateRoundInstructions(configuration); } @@ -224,7 +227,7 @@ public ServerConfiguration getServerConfiguration() { return serverConfiguration; } - + public void setServerConfiguration(ServerConfiguration serverConfiguration) { this.serverConfiguration = serverConfiguration; } 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 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/conf/ServerConfiguration.java 2009-10-19 18:58:17 UTC (rev 301) @@ -65,10 +65,9 @@ } /** - * getting the general welcome instructions + * Returns the appropriate general instructions text, performing logic for adding + * positions and quizzes. * - * FIXME: Refactor this method. - * * @param instructionPageNumber * @param pagesTraversed * @return @@ -150,5 +149,9 @@ 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"); + } } Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/RegistrationEvent.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/RegistrationEvent.java 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/events/RegistrationEvent.java 2009-10-19 18:58:17 UTC (rev 301) @@ -17,15 +17,25 @@ private RoundConfiguration roundConfiguration; private final ClientData clientData; - public RegistrationEvent(Identifier target, RoundConfiguration configuration) { - this(target, configuration, null); + /** + * Constructor used by the facilitator, which doesn't need any ClientData objects. + * + * @param id + * @param roundConfiguration + */ + public RegistrationEvent(Identifier id, RoundConfiguration roundConfiguration) { + this(id, roundConfiguration, null); } - public RegistrationEvent(Identifier target, RoundConfiguration roundConfiguration, ClientData clientData) { - super(target, roundConfiguration.getInstructions()); - this.roundConfiguration = roundConfiguration; + public RegistrationEvent(Identifier id, RoundConfiguration roundConfiguration, ClientData clientData) { + super(id, roundConfiguration.getInstructions()); this.clientData = clientData; } + + public RegistrationEvent(ClientData clientData, RoundConfiguration roundConfiguration) { + this(clientData.getId(), roundConfiguration, clientData); + this.roundConfiguration = roundConfiguration; + } public RoundConfiguration getRoundConfiguration() { return roundConfiguration; Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/facilitator/FacilitatorWindow.java 2009-10-19 18:58:17 UTC (rev 301) @@ -1,6 +1,3 @@ -/** - * - */ package edu.asu.commons.irrigation.facilitator; import java.awt.BorderLayout; @@ -33,13 +30,12 @@ */ public class FacilitatorWindow extends JPanel { + private static final long serialVersionUID = 3607885359444962888L; + private Facilitator facilitator; private Dimension windowDimension; - private static final long serialVersionUID = 1L; - - private JButton startRoundButton = null; private JButton beginChatButton; @@ -47,7 +43,7 @@ private HtmlEditorPane editorPane; private JScrollPane scrollPane; - private JButton enableInstructionButton; + private JButton showInstructionsButton; /** * This is the default constructor */ @@ -58,15 +54,7 @@ initialize(); } - /* - public IrrigationFacilitatorWindow(){ - super(); - initialize(); - } - */ - /** - * This method initializes this * * @return void */ @@ -77,7 +65,7 @@ buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); buttonPanel.add(getStartRoundButton()); buttonPanel.add(getBeginChatButton()); - buttonPanel.add(getEnableInstructionButton()); + buttonPanel.add(getShowInstructionsButton()); add(buttonPanel, BorderLayout.NORTH); JPanel informationPanel = new JPanel(); editorPane = new HtmlEditorPane(); @@ -86,18 +74,17 @@ add(informationPanel, BorderLayout.CENTER); } - private JButton getEnableInstructionButton() { - // TODO Auto-generated method stub - if (enableInstructionButton == null) { - enableInstructionButton = new JButton("Enable Instruction"); - enableInstructionButton.addActionListener(new ActionListener() { + private JButton getShowInstructionsButton() { + if (showInstructionsButton == null) { + showInstructionsButton = new JButton("Show Instructions"); + showInstructionsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { - enableInstructionButton.setEnabled(false); +// enableInstructionButton.setEnabled(false); facilitator.transmit(new ShowInstructionsRequest(facilitator.getId())); } }); } - return enableInstructionButton; + return showInstructionsButton; } /** @@ -124,7 +111,7 @@ return beginChatButton; } - public Facilitator getFacilitator(){ + public Facilitator getFacilitator() { return facilitator; } @@ -143,9 +130,8 @@ startRoundButton = new JButton(); startRoundButton.setBounds(new Rectangle(180, 16, 136, 24)); startRoundButton.setText("Start Round"); - startRoundButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed() + startRoundButton.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { facilitator.sendBeginRoundRequest(); } }); 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 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/IrrigationServer.java 2009-10-19 18:58:17 UTC (rev 301) @@ -186,13 +186,13 @@ clients.put(identifier, clientData); serverDataModel.addClient(clientData); } - transmit(new RegistrationEvent(clientData.getId(), getRoundConfiguration(), clientData)); + transmit(new RegistrationEvent(clientData, getRoundConfiguration())); } }); addEventProcessor(new EventTypeProcessor<DisconnectionRequest>(DisconnectionRequest.class) { @Override public void handle(DisconnectionRequest request) { - getLogger().warning("irrigation server is disconnecting: " + request); + getLogger().warning("irrigation server handling disconnection request: " + request); Identifier disconnectedClientId = request.getId(); synchronized (clients) { clients.remove(disconnectedClientId); @@ -239,8 +239,8 @@ addEventProcessor(new EventTypeProcessor<QuizCompletedEvent>(QuizCompletedEvent.class) { @Override public void handle(QuizCompletedEvent event) { - getLogger().info("Quiz Completed Event:"+event.getId()+" : instruction Number"+event.getInstructionNumber()); numberOfCompletedQuizzes++; + getLogger().info("Completed quizzes: " + numberOfCompletedQuizzes); if(numberOfCompletedQuizzes == clients.size()*8){ getLogger().info("Everyone has finished reading the general instructions successfully"); } @@ -392,9 +392,11 @@ // need to send instructions //Send the end round event to the facilitator //Send the end round event to all the clients - for (ClientData data : clients.values()) { - data.award(); - transmit(new EndRoundEvent(data.getId(), data.getGroupDataModel(), getConfiguration().isLastRound())); + synchronized (clients) { + for (ClientData data : clients.values()) { + data.award(); + transmit(new EndRoundEvent(data.getId(), data.getGroupDataModel(), getConfiguration().isLastRound())); + } } transmit(new FacilitatorEndRoundEvent(facilitatorId, serverDataModel)); @@ -406,13 +408,15 @@ private void cleanupRound() { // reset client data values - for (ClientData clientData: clients.values()) { - if (getConfiguration().getCurrentParameters().isPracticeRound()) { - clientData.resetAllTokens(); + synchronized (clients) { + for (ClientData clientData: clients.values()) { + if (getConfiguration().getCurrentParameters().isPracticeRound()) { + clientData.resetAllTokens(); + } + else { + clientData.reset(); + } } - else { - clientData.reset(); - } } submittedClients = 0; persister.clear(); @@ -425,19 +429,21 @@ RoundConfiguration nextRoundConfiguration = getConfiguration().nextRound(); serverDataModel.setRoundConfiguration(nextRoundConfiguration); // set up the next round - if (nextRoundConfiguration.shouldRandomizeGroup()) { - serverDataModel.clear(); - List<ClientData> clientDataList = new ArrayList<ClientData>(clients.values()); - // randomize the client data list - Collections.shuffle(clientDataList); - // re-add each the clients to the server data model - for (ClientData data: clientDataList) { - serverDataModel.addClient(data); + synchronized (clients) { + if (nextRoundConfiguration.shouldRandomizeGroup()) { + serverDataModel.clear(); + List<ClientData> clientDataList = new ArrayList<ClientData>(clients.values()); + // randomize the client data list + Collections.shuffle(clientDataList); + // re-add each the clients to the server data model + for (ClientData data: clientDataList) { + serverDataModel.addClient(data); + } + } + // send registration events to all participants. + for (ClientData data: clients.values()) { + transmit(new RegistrationEvent(data, nextRoundConfiguration)); } - } - // send registration events to all participants. - for (ClientData data: clients.values()) { - transmit(new RegistrationEvent(data.getId(), nextRoundConfiguration, data)); } // send new round configuration to the facilitator transmit(new RegistrationEvent(facilitatorId, nextRoundConfiguration)); Modified: irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml =================================================================== --- irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml 2009-10-17 22:23:23 UTC (rev 300) +++ irrigation/trunk/src/main/resources/configuration/asu-fall-2009/irrigation.xml 2009-10-19 18:58:17 UTC (rev 301) @@ -32,7 +32,7 @@ <entry key="wait-for-participants">true</entry> <entry key="number-of-rounds">22</entry> -<entry key="undisrupted-bandwidth">true</entry> +<entry key="undisrupted-flow-required">true</entry> <entry key="q1">4</entry> <entry key="q2">identity</entry> @@ -41,12 +41,37 @@ <entry key="q5">4</entry> <entry key="q6">5</entry> <entry key="q7">25</entry> -<entry key="q8">4</entry> -<entry key="q9">25</entry> -<entry key="q10">30</entry> -<entry key="q11">1.50</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 windows.</b> +</p> +]]> +</entry> + + <entry key="facilitator-instructions"> <![CDATA[ <h3>Facilitator Instructions</h3> @@ -125,18 +150,27 @@ <entry key="general-instructions2"> <![CDATA[ <h3>Chat</h3> -<p>Each round will start with a chat period of 40 seconds where you can send text -messages to the other participants. You may discuss any aspect of the exercise. -<b>However</b>, you are <b>not allowed</b> to promise the other participants +<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. You are also <b>not allowed</b> to reveal your real identity. We will be -monitoring the chat traffic. If we see any member of a group violating the rules, -we will have to remove that <b>entire group</b> from the experiment room. That -group will have to wait until the entire experiment is finished to receive -their payment.<br><br> - +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> @@ -160,20 +194,20 @@ <![CDATA[ <h3>Creating Irrigation Infrastructure</h3> <p> -At the beginning of each round 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 fee of -$5, for a grand total of at least $15. +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 grow a -large crop and earn $1.50 each round. If you grow crops you can roughly triple your +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. @@ -238,7 +272,7 @@ <th>Water delivery (cubic feet per second)</th> </thead> <tr> -<td> ≤ 45</td><td>0</td> +<td>≤ 45</td><td>0</td> </tr> <tr> <td>46-51</td><td>5</td> @@ -350,9 +384,12 @@ <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 balls) to flow to them. -Note that the available bandwidth downstream of a player with an open port is reduced (illustrated by narrowing of the canal). +<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 @@ -361,24 +398,21 @@ 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. You can only start growing a crop if you have water available to -your position. If water runs out during the growing period of the crop, the partial -grown crop is lost, and you need to start from scratch again. Water can run out if, -for example, one or more people upstream from your position open their gates. <b>You -can only grow a crop successfully when you have access to water for a number of -seconds without disruptions.</b> +available for E. </p> <p> -Assume that the total irrigation capacity available is 40 cfps. If player A opens -their gate, they will take 25 cfps from the canal, leaving 15 cfps for B and -everyone else downstream. If A does not open the gate however, then a total of 40 -cfps is left for B and everyone else downstream. +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. +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> @@ -388,14 +422,23 @@ <br><br> To continue to the next page, please answer the following question:<br> <form> -What is the minimum time to deliver 500 cubic feet to your field when your maximum -water flow capacity is available? +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="12.5">12.5 seconds<br> -<input type="radio" name="q6" value="20">20 seconds<br> -<input type="radio" name="q6" value="25">25 seconds<br> -<input type="radio" name="q6" value="50">50 seconds<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> @@ -405,21 +448,88 @@ <entry key="general-instructions6"> <![CDATA[ <h3>How to grow crops</h3> -<p>To start growing crops, click on one of the boxes labeled "Grow this crop".<br> <p> -<img src = "http://sod19.asu.edu/irrigation/images/fileScreenShotNew.JPG"><br> +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> -The crop receiving water will turn red. When the crop is successfully grown and -harvested it the box will turn green. If water becomes unavailable for a period of -5 seconds after starting to grow a crop, the crop will be lost and you will have to -click the button again to re-irrigate that crop. -<br> -The percentage of the water needed for the crop at any point in time is indicated by the progress bar <br> -<img src = "http://sod19.asu.edu/irrigation/images/fileProgressBarScreenShot.JPG"><br> <p> -You cannot grow multiple crops at the same time. -<img src = "http://sod19.asu.edu/irrigation/images/pauseButtonScreenShot.JPG"><br> +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> @@ -428,12 +538,20 @@ <br><br> To continue to the next page, please answer the following question:<br> <form> -If there are 4 green boxes and one red box, how many crops have you grown and harvested successfully?<br> -<input type="radio" name="q8" value="1">1<br> +If you invest 7 of the 10 tokens you started with, and you put 202 cf of water on +your field, what is the total number of tokens you will have earned for that round? +<input type="radio" name="q8" value="3">3<br> <input type="radio" name="q8" value="4">4<br> -<input type="radio" name="q8" value="5">5<br> -<input type="radio" name="q8" value="10">10<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? +<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> ]]> @@ -441,44 +559,20 @@ <entry key="general-instructions7"> <![CDATA[ -<h3>Earnings</h3> -<p>The number of tokens earned in each round depends on how many crops have been grown and harvested in that round. -The earnings reflect the net profit of growing crops, taking into account the costs -of fertilization, labor, and equipment. The first few crops you grow don't generate -any net profit in terms of tokens earned because your costs must be covered first. -You must have grown at last two crops before you cover your fixed costs and begin to -generate tokens as shown in the following graph. -</p> +<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> -<img src = "http://sod19.asu.edu/irrigation/images/fileTokenGraphScreenShot.JPG"><br> -<p> -The amount of tokens earned by growing crops files can also be represented as the following table. -</p> -<table border="1" cellspacing="2" cellpadding="2"> -<tr> - <td>Number of crops grown</td> - <td>0</td> - <td>1</td> - <td>2</td> - <td>3</td> - <td>4</td> - <td>5</td> -</tr> -<tr> - <td>Tokens earned</td> - <td>0</td> - <td>0</td> - <td>6</td> - <td>22</td> - <td>28</td> - <td>30</td> -</tr> -</table> -Your earnings at the end of the round depend on your investment and the number of crops grown. -Recall that you get 10 tokens to start with. Suppose you invest 6 tokens in the irrigation -infrastructure and you grow 4 crops. You would have earned 28 tokens from your -crops, added to your leftover tokens, i.e., 28 + (10-6) = 32 tokens. Each token is -worth 5 cents, translating to an actual dollar amount of $1.60.<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> @@ -488,85 +582,50 @@ <br><br> To continue to the next page, please answer the following question:<br> <form> -If you invest 7 tokens out of the 10 tokens you start with, and you grow 3 crops, how many total tokens would you have earned that round? +Each token is worth 5 cents, thus if you collected 30 tokens in a round you earned: <br> -<input type="radio" name="q9" value="3">3<br> -<input type="radio" name="q9" value="7">7<br> -<input type="radio" name="q9" value="22">22<br> -<input type="radio" name="q9" value="25">25<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> - -If you invest 10 tokens out of the 10 tokens you start with, and you grow 5 crops, how many total tokens would you have earned that round? -<br> -<input type="radio" name="q10" value="10">10<br> -<input type="radio" name="q10" value="20">20<br> -<input type="radio" name="q10" value="25">25<br> -<input type="radio" name="q10" value="30">30<br> -<br><br> <input type="submit" name="submit" value="Submit"> <br><br> </form> ]]> </entry> -<entry key="general-instructions8"> +<entry key="general-instructionsq9"> <![CDATA[ -<h3>Scores</h3> -<p>The total number of tokens collected during the experiment is shown as:<br> <p> -<img src = "http://sod19.asu.edu/irrigation/images/tokensCollectedScreenShot.JPG"><br> +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> -This is the total of tokens not invested in irrigation infrastructure plus the -additional tokens you've earned by growing crops<br> -You can see the scores of the other participants summarized on the screen. You can -also see the percentage of each player's water being used at any given moment, -as illustrated in the figure below. <p> -<img src = "http://sod19.asu.edu/irrigation/images/scoreScreenShotNew.JPG"><br> +You will first chat via text with other participants in your group for 40 seconds, +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> -]]> -</entry> - -<entry key="general-instructionsq8"> -<![CDATA[ -<br><br> -To continue to the next page, please answer the following question:<br> -<form> -Each token is worth 5 cents. If you collected 30 tokens in a round you would have earned:<br> -<input type="radio" name="q11" value="0.15">0.15<br> -<input type="radio" name="q11" value="0.50">0.50<br> -<input type="radio" name="q11" value="1.50">1.50<br> -<input type="radio" name="q11" value="2.50">2.50<br> -<br><br> -<input type="submit" name="submit" value="Submit"> -</form> -]]> -</entry> - -<entry key="general-instructionsq9"> -<![CDATA[ -We will now start with two practice rounds. This practice round will not contribute to your earnings – -it is intended to acquaint you with the functioning of the exercise environment.<br><br> - +<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="general-instructions-undisruptedBandwidth"> +<entry key="undisrupted-flow-instructions"> <![CDATA[ -<br> -You can only start downloading a file if you have bandwidth available at your position. If the bandwidth connection -is broken during the downloading of a file, the downloaded part of the file is lost, and you need to start from scratch -again to download this file. The bandwidth connection can be broken if, for example, one or more people to the left of -your position starts downloading files, using up the all available bandwidth. Only when you have continuous access to -bandwidth without disruptions for a length of time sufficient to download an entire file can you download a file -successfully. +<p> +If the flow of water is disrupted while your gate is open your crop growing progress +will be halted. +</p> ]]> </entry> -<entry key="general-instructions11"> +<entry key="investment-instructions"> <![CDATA[ <h3>Invest tokens in the irrigation infrastructure</h3> <p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |