计算机工程与应用 ›› 2016, Vol. 52 ›› Issue (4): 234-237.

• 工程与应用 • 上一篇    下一篇

面向对象技术实现活动网络图及关键路径算法

张静文,周  杉   

  1. 西北工业大学 管理学院,西安 710072
  • 出版日期:2016-02-15 发布日期:2016-02-03

Realizations of activity network graphs and critical path algorithm based on object-oriented technique

ZHANG Jingwen, ZHOU Shan   

  1. School of Management, Northwestern Polytechnical University, Xi’an 710072, China
  • Online:2016-02-15 Published:2016-02-03

摘要: 采用邻接矩阵表示项目活动网络图需要较多的存储空间,且基于结构化程序设计思想实现网络图和关键路径算法都非常繁琐。采用面向对象的类表示活动,基于动态数组表示活动网络图及活动之间的逻辑关系,并据此开发了基于面向对象技术实现关键路径算法的代码,进一步从理论上分析了采用面向对象技术的优势。研究表明,相对于传统的处理方式,基于面向对象技术的项目活动网络图表示及关键路径的算法较大降低了存储和计算的复杂性。

关键词: 活动网络图, 面向对象, 关键路径算法, 编码

Abstract: The expression of adjacency matrixes for graphs of project activity networks requires more storage space, and it is very complicated to realize network graphs and critical path algorithm based on structured programmingthoughts. This paper adopts an object-oriented(OO, in short) class to represent activities, and dynamic arrays to denote activity network graphs and logical precedence relationships among activities;accordingly, the codes of the critical path algorithm are developed by means of an OO technique. Moreover, the advantages of the OO technique are analyzed in theory. The conclusion shows that the representation of activity network graphs and realization of the critical path algorithm based on the OO technique can greatly reduce the complexity of storages and calculations when comparing with the traditional approaches.

Key words: activity network graphs, object-oriented, critical path algorithm, coding