您的位置:首页 > 理论基础 > 计算机网络

基于JGraphX的通风网络解算---通风网络解算中出现风量为负值的处理

2015-07-29 20:09 253 查看
在通风网络计算中,如果风流的方向与分支的方向相反时,会出现风量解算结果为负数的情况,此时需要做相应的处理。

<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);

}

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: