[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model EnergyCalc.java, 1.10, 1.11
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-08-13 11:41:30
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27141/src/net/sourceforge/bprocessor/model Modified Files: EnergyCalc.java Log Message: Forgot checkstyle Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** EnergyCalc.java 13 Aug 2007 11:36:21 -0000 1.10 --- EnergyCalc.java 13 Aug 2007 11:41:25 -0000 1.11 *************** *** 17,21 **** public class EnergyCalc { private static Logger log = Logger.getLogger(EnergyCalc.class); ! /** * energyLoss calculates the total energy transmission loss --- 17,21 ---- public class EnergyCalc { private static Logger log = Logger.getLogger(EnergyCalc.class); ! /** * energyLoss calculates the total energy transmission loss *************** *** 37,43 **** totalloss = totalloss + calcloss(current.getBackDomain(), current); } else ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } } if (current.getBackDomain().getClassification() != null) { --- 37,43 ---- totalloss = totalloss + calcloss(current.getBackDomain(), current); } else ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getBackDomain(), current); ! } } if (current.getBackDomain().getClassification() != null) { *************** *** 45,51 **** totalloss = totalloss + calcloss(current.getFrontDomain(), current); } else ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } } } --- 45,51 ---- totalloss = totalloss + calcloss(current.getFrontDomain(), current); } else ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-100")) { ! totalloss = totalloss + calcloss(current.getFrontDomain(), current); ! } } } *************** *** 55,59 **** return totalloss; } ! /** * Calculates energyloss of a surface --- 55,59 ---- return totalloss; } ! /** * Calculates energyloss of a surface *************** *** 63,66 **** --- 63,67 ---- * @return the enegyloss */ + //TODO implement handling of elemented spaces (make calc recursive) private static double calcloss(Space classification, Surface current) { double loss = 0; *************** *** 99,103 **** Surface closest = null; Space spa = null; ! //Find closest surface that have a functional space as either front or back domain for (Surface sur : classification.getEnvelope()) { --- 100,104 ---- Surface closest = null; Space spa = null; ! //Find closest surface that have a functional space as either front or back domain for (Surface sur : classification.getEnvelope()) { *************** *** 117,121 **** } } ! //Choose the resulting functional space from the closest surface if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { --- 118,122 ---- } } ! //Choose the resulting functional space from the closest surface if (closest != null && closest.getFrontDomain().isFunctionalSpace()) { *************** *** 125,129 **** spa = closest.getBackDomain(); } ! if (spa != null) { if (spa.getClassification() != null) { --- 126,130 ---- spa = closest.getBackDomain(); } ! if (spa != null) { if (spa.getClassification() != null) { *************** *** 139,146 **** } } ! return relevant; } ! /** * heatedArea calculates the total area that is heated in the building --- 140,147 ---- } } ! return relevant; } ! /** * heatedArea calculates the total area that is heated in the building *************** *** 150,154 **** double tha = 0; Iterator it = Project.getInstance().world().getSurfaces().iterator(); ! while (it.hasNext()) { Surface current = (Surface) it.next(); --- 151,155 ---- double tha = 0; Iterator it = Project.getInstance().world().getSurfaces().iterator(); ! while (it.hasNext()) { Surface current = (Surface) it.next(); *************** *** 180,186 **** } } - return tha; } - } --- 181,185 ---- |