在通风网络计算中,如果风流的方向与分支的方向相反时,会出现风量解算结果为负数的情况,此时需要做相应的处理。
<pre name="code" class="java"> if(ve.getAirQ()<0){
Node bn = (Node) c.getSource().getValue();
//Node nbn = nl.getNode(bn.getLabel());
Node en = (Node) c.getTarget().getValue();
// Node nen = nl.getNode(en.getLabel());
mxCell cs = (mxCell) c.getSource();
mxCell ct = (mxCell) c.getTarget();
c.setSource(ct);
c.setTarget(cs);
// c.getSource().setValue(en);
// c.getTarget().setValue(bn);
ve.setEnode(bn);
ve.setBnode(en);
c.setValue(ve);
// mxPoint sp=c.getGeometry().getSourcePoint();
// mxPoint tp=c.getGeometry().getTargetPoint();
// c.getGeometry().setSourcePoint(tp);
// c.getGeometry().setTargetPoint(sp);
}