Thread: [Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Classification.java, 1.6, 1.7 Energy
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Nikolaj B. <nbr...@us...> - 2007-01-31 12:48:47
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20924/src/net/sourceforge/bprocessor/model Modified Files: Classification.java EnergyCalc.java Log Message: Fixed the old energy calc method to use id's and not names to resovle a conversion problem between systems Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EnergyCalc.java 29 Jan 2007 18:08:45 -0000 1.5 --- EnergyCalc.java 31 Jan 2007 12:48:23 -0000 1.6 *************** *** 25,47 **** Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification() != null) { ! if (current.getFrontDomain().getClassification().getName().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } ! if (current.getFrontDomain().getClassification().getName(). ! equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } } if (current.getBackDomain().getClassification() != null) { ! if (current.getBackDomain().getClassification().getName().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } ! if (current.getBackDomain().getClassification().getName() ! .equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } } } ! return totalloss; } --- 25,48 ---- Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification() != null) { ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } ! if (current.getFrontDomain().getClassification().getId(). ! equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } } if (current.getBackDomain().getClassification() != null) { ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } ! if (current.getBackDomain().getClassification().getId() ! .equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } } } ! int i = (int) (totalloss * 1000); ! totalloss = ((double) i) / 1000; return totalloss; } *************** *** 62,80 **** if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! if (classification.getClassification().getName().equalsIgnoreCase("Terrandæk")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Tagkonstruktion") || ! classification.getClassification().getName().equalsIgnoreCase("Tagsystem")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Loftkonstruktion")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Vægsystem") || ! classification.getClassification().getName().equalsIgnoreCase("Vægkonstruktion")) { loss = 0.25 * current.getArea(); return loss; --- 63,81 ---- if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-210.01")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.01") || ! classification.getClassification().getFullId(null).equalsIgnoreCase("-215")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.04")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205") || ! classification.getClassification().getFullId(null).equalsIgnoreCase("-205.01")) { loss = 0.25 * current.getArea(); return loss; *************** *** 91,100 **** if (classification.getClassification(). ! getName().equalsIgnoreCase("Vinduesparti")) { loss = 0.8 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Dørparti")) { loss = 1.5 * current.getArea(); return loss; --- 92,101 ---- if (classification.getClassification(). ! getFullId(null).equalsIgnoreCase("-205.02")) { loss = 0.8 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205.03")) { loss = 1.5 * current.getArea(); return loss; *************** *** 155,163 **** if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName().equalsIgnoreCase("Beboelse og ophold")) { relevant = true; } --- 156,165 ---- if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { relevant = true; } *************** *** 182,191 **** spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName() ! .equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } --- 184,193 ---- spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } *************** *** 195,204 **** spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName() ! .equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } --- 197,206 ---- spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Classification.java 6 Jan 2007 21:06:59 -0000 1.6 --- Classification.java 31 Jan 2007 12:48:23 -0000 1.7 *************** *** 157,161 **** Space current = cur; String fullId = id.toString(); ! if (current.getTypeClassification() != null) { if (!("" + fullId.charAt(0)).equalsIgnoreCase("-")) { if (!current.getTypeClassification().getId().equalsIgnoreCase("0")) { --- 157,161 ---- Space current = cur; String fullId = id.toString(); ! if (current != null && current.getTypeClassification() != null) { if (!("" + fullId.charAt(0)).equalsIgnoreCase("-")) { if (!current.getTypeClassification().getId().equalsIgnoreCase("0")) { *************** *** 170,174 **** Classification par = parent; if (par != null) { ! if (cur.getOwner().getLevel() != 2) { current = cur.getOwner(); if (current.getClassification() == par) { --- 170,174 ---- Classification par = parent; if (par != null) { ! if (cur != null && cur.getOwner().getLevel() != 2) { current = cur.getOwner(); if (current.getClassification() == par) { *************** *** 188,192 **** while (!par.getName().equalsIgnoreCase("Classification")) { fullId = par.getId() + "." + fullId; ! par = par.getParent(); } } --- 188,192 ---- while (!par.getName().equalsIgnoreCase("Classification")) { fullId = par.getId() + "." + fullId; ! par = par.getParent(); } } |