[virtualcommons-svn] SF.net SVN: virtualcommons:[469] irrigation/trunk/src/main/java/edu/asu/ commo
Status: Beta
Brought to you by:
alllee
From: <al...@us...> - 2010-02-10 06:38:53
|
Revision: 469 http://virtualcommons.svn.sourceforge.net/virtualcommons/?rev=469&view=rev Author: alllee Date: 2010-02-10 06:38:47 +0000 (Wed, 10 Feb 2010) Log Message: ----------- updated save file converter to include additional group summary stats Modified Paths: -------------- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java Modified: irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java =================================================================== --- irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java 2010-02-09 00:53:10 UTC (rev 468) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/data/IrrigationSaveFileConverter.java 2010-02-10 06:38:47 UTC (rev 469) @@ -89,7 +89,7 @@ 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"); + writer.println("Group, Total group tokens earned, Water availability, Water supply, Tokens invested, Infrastructure before investment, Total infrastructure efficiency, % infrastructure decline"); for (GroupDataModel group: groups) { int totalGroupTokensEarned = 0; int totalGroupTokenInvestment = 0; @@ -97,12 +97,16 @@ totalGroupTokensEarned += data.getAllTokensEarnedThisRound(); totalGroupTokenInvestment += data.getInvestedTokens(); } - writer.println(String.format("%s, %d, %d, %d, %d", + writer.println(String.format("%s, %d, %d, %d, %d, %d, %d, %d", groups.indexOf(group), totalGroupTokensEarned, group.getIrrigationCapacity(), roundConfiguration.getWaterSupplyCapacity(), - totalGroupTokenInvestment)); + totalGroupTokenInvestment, + group.getInfrastructureEfficiencyBeforeInvestment(), + group.getInfrastructureEfficiency(), + roundConfiguration.getInfrastructureDegradationFactor() + )); } Map<GroupDataModel, SortedSet<ChatRequest>> chatRequestMap = new HashMap<GroupDataModel, SortedSet<ChatRequest>>(); SortedSet<ChatRequest> allChatRequests = savedRoundData.getChatRequests(); 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-02-09 00:53:10 UTC (rev 468) +++ irrigation/trunk/src/main/java/edu/asu/commons/irrigation/server/GroupDataModel.java 2010-02-10 06:38:47 UTC (rev 469) @@ -199,25 +199,25 @@ return maximumAvailableWaterFlow; } - public int getInfrastructureEfficiency() { - return infrastructureEfficiency; - } + public int getInfrastructureEfficiency() { + return infrastructureEfficiency; + } - public int getInfrastructureEfficiencyBeforeInvestment() { - return infrastructureEfficiencyBeforeInvestment; - } - - public Logger getLogger() { - if (logger == null) { - logger = Logger.getLogger(getClass().getName()); - } - return logger; - } - - + public int getInfrastructureEfficiencyBeforeInvestment() { + return infrastructureEfficiencyBeforeInvestment; + } + + public Logger getLogger() { + if (logger == null) { + logger = Logger.getLogger(getClass().getName()); + } + return logger; + } + + public void setRoundConfiguration(RoundConfiguration roundConfiguration) { - this.roundConfiguration = roundConfiguration; - } + this.roundConfiguration = roundConfiguration; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |