基于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);
}
<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);
}
相关文章推荐
- Htttp网络框架之Netroid (针对大文件的下载)
- Linux 网卡驱动学习(二)(网络驱动接口小结)
- 网络流24题 (一)
- linux_c 网络开发日记(4)多进程程序设计_进程控制原理
- Android网络状态广播监听
- Linux 网卡驱动学习(一)(分析一个虚拟硬件的网络驱动例子)
- Python写的Web spider(网络爬虫)
- 网络流初步
- PHP输出http状态码以及常用状态码
- 大型网络游戏服务器的框架设计
- mac与phy如何实现网络自适应
- iOS实时监测网络状况
- nginx中http.server.location指令语法
- 伪造Http请求IP地址
- 一个使用超简单C++封装的网络库(包含服务器端和客户端,跨平台,比较适用于移动终端)
- 【HttpClient4.5中文教程】【第一章 :基础】1.1执行请求(一)
- HTTP协议的chunked编码 http://www.cnblogs.com/zhaozhan/archive/2010/08/24/1807639.html
- iOS开发——网络编程OC篇&GCDAsyncSocket编程
- http返回头中content-length与Transfer-Encoding: chunked的问题释疑
- iOS网络编程之AFNetworking使用