개정판 d9eec6e8
issue #1198: HEX_H에서 루프 오류 수정
Change-Id: I08228230b991ea37b20d6df127a4c51835e9c42e
HYTOS/HYTOS/Commands/HydroCalculationCommand.py | ||
---|---|---|
668 | 668 |
break |
669 | 669 |
# end at connector |
670 | 670 |
elif loop.items[-1].connectedItem and int(loop.items[-1].connectedItem._conn_index) == 2: |
671 |
matches = [conn for conn in loop.items[-1].parentItem().connectors if |
|
672 |
(not conn in loop.items) and conn.connectedItem and |
|
673 |
int(conn.connectedItem._conn_index) == 1] |
|
671 |
if loop.items[-1].parentItem().name in ['HEX_H']: |
|
672 |
target = (loop.items[-1]._conn_index + 2) // (len(loop.items[-1].parentItem().connectors) + 1) |
|
673 |
matches = [conn for conn in loop.items[-1].parentItem().connectors if |
|
674 |
(not conn in loop.items) and conn.connectedItem and conn._conn_index == target and |
|
675 |
int(conn.connectedItem._conn_index) == 1] |
|
676 |
else: |
|
677 |
matches = [conn for conn in loop.items[-1].parentItem().connectors if |
|
678 |
(not conn in loop.items) and conn.connectedItem and |
|
679 |
int(conn.connectedItem._conn_index) == 1] |
|
674 | 680 |
if matches: |
675 | 681 |
# sort by nozzle no |
676 |
matches.sort(key=lambda conn: conn._conn_index) # .connectedItem.parentItem().stream_no) |
|
682 |
matches.sort(key=lambda conn: conn._conn_index) # .connectedItem.parentItem().stream_no)
|
|
677 | 683 |
for match in matches[1:]: |
678 | 684 |
res.append(QEngineeringLoopItem(loop.items + [match])) |
679 | 685 |
loop.items.append(matches[0]) |
... | ... | |
683 | 689 |
from App import App |
684 | 690 |
from AppDocData import MessageType |
685 | 691 | |
686 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
687 |
sys.exc_info()[-1].tb_lineno)
|
|
692 |
message = f"error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:" \
|
|
693 |
f"{sys.exc_info()[-1].tb_lineno}"
|
|
688 | 694 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
689 | 695 |
finally: |
690 | 696 |
loop.name = 'Loop{}'.format(len(self.loops) + 1) |
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
1642 | 1642 |
control_valves.append(name) |
1643 | 1643 | |
1644 | 1644 |
attr = item.parent.attribute |
1645 |
ws.cell(row_no, col_no, attr['Tag_No']).font = Font(bold=True, |
|
1646 |
underline='single', |
|
1647 |
size=11) |
|
1645 |
if 'Tag_No' in attr: |
|
1646 |
ws.cell(row_no, col_no, attr['Tag_No']).font = Font(bold=True, |
|
1647 |
underline='single', |
|
1648 |
size=11) |
|
1648 | 1649 | |
1649 | 1650 |
row_no += 1 |
1650 | 1651 |
ws.cell(row_no, col_no, 'Inlet P :') |
1651 | 1652 |
col_no += 2 |
1652 |
ws.cell(row_no, col_no, round(attr['Suct.P'], 3)) |
|
1653 |
if 'Suct.P' in attr: |
|
1654 |
ws.cell(row_no, col_no, round(attr['Suct.P'], 3)) |
|
1653 | 1655 |
col_no += 1 |
1654 | 1656 |
ws.cell(row_no, col_no, '{}.g'.format(units['Pressure'])) |
1655 | 1657 | |
... | ... | |
1657 | 1659 |
col_no = 24 if col_no == 27 else 28 |
1658 | 1660 |
ws.cell(row_no, col_no, 'Outlet P :') |
1659 | 1661 |
col_no += 2 |
1660 |
ws.cell(row_no, col_no, round(attr['Disc.P'], 3)) |
|
1662 |
if 'Disc.P' in attr: |
|
1663 |
ws.cell(row_no, col_no, round(attr['Disc.P'], 3)) |
|
1661 | 1664 |
col_no += 1 |
1662 | 1665 |
ws.cell(row_no, col_no, '{}.g'.format(units['Pressure'])) |
1663 | 1666 | |
... | ... | |
1665 | 1668 |
col_no = 24 if col_no == 27 else 28 |
1666 | 1669 |
ws.cell(row_no, col_no, 'Diff.P :') |
1667 | 1670 |
col_no += 2 |
1668 |
ws.cell(row_no, col_no, round(attr['Diff.P'], 3)) |
|
1671 |
if 'Diff.P' in attr: |
|
1672 |
ws.cell(row_no, col_no, round(attr['Diff.P'], 3)) |
|
1669 | 1673 |
col_no += 1 |
1670 | 1674 |
ws.cell(row_no, col_no, units['Pressure']) |
1671 | 1675 | |
... | ... | |
1673 | 1677 |
col_no = 24 if col_no == 27 else 28 |
1674 | 1678 |
ws.cell(row_no, col_no, 'dP Ratio :') |
1675 | 1679 |
col_no += 2 |
1676 |
ws.cell(row_no, col_no, round(attr['dP Ratio'] * 100, 2)) |
|
1680 |
if 'dP Ratio' in attr: |
|
1681 |
ws.cell(row_no, col_no, round(attr['dP Ratio'] * 100, 2)) |
|
1677 | 1682 |
col_no += 1 |
1678 | 1683 |
ws.cell(row_no, col_no, '%') |
1679 | 1684 |
내보내기 Unified diff