JP2011034179A - Plant model creating system and plant model creation method - Google Patents

Plant model creating system and plant model creation method Download PDF

Info

Publication number
JP2011034179A
JP2011034179A JP2009177585A JP2009177585A JP2011034179A JP 2011034179 A JP2011034179 A JP 2011034179A JP 2009177585 A JP2009177585 A JP 2009177585A JP 2009177585 A JP2009177585 A JP 2009177585A JP 2011034179 A JP2011034179 A JP 2011034179A
Authority
JP
Japan
Prior art keywords
program
input
plant model
output
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2009177585A
Other languages
Japanese (ja)
Other versions
JP5254149B2 (en
Inventor
Akio Arakawa
秋雄 荒川
Kenya Takiwaki
賢也 滝脇
Nobuyuki Saijo
信之 西條
Shigeto Kikuchi
茂人 菊池
Hideki Takahashi
秀樹 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2009177585A priority Critical patent/JP5254149B2/en
Publication of JP2011034179A publication Critical patent/JP2011034179A/en
Application granted granted Critical
Publication of JP5254149B2 publication Critical patent/JP5254149B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To accurately and efficiently rebuild a plant model which is easier to understood than conventional types, and is easily maintained by using conventional software source codes. <P>SOLUTION: A plant model creating system 10 is provided with a software part rebuilding processing means 14, that includes an input/output extraction processing part 21, which determines the type of variables from the software source code; an argument processing part 23, which creates sub-programs referring between the sub-programs with a local variable; a connection relation information extraction processing part 22, which creates an input/output relation table of a program configuration tree of the sub-programs and the variables; a part group arrangement connection processing part 25, which refers to the program configuration tree, the input/output relation table and part data and arranges and connects software parts; a program source code creation processing part 26 which creates a source code for a program of a connected model program; and a calculation evaluation part 27 which calculates and evaluates the programs. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、シミュレーションモデルを作成する技術に係り、特に、モデルの再構築を正確かつ効率的に行い得るプラントモデル作成システムおよびプラントモデル作成方法に関する。   The present invention relates to a technique for creating a simulation model, and more particularly to a plant model creation system and a plant model creation method capable of accurately and efficiently reconstructing a model.

原子力プラントにおいては安定運転を確保するために、プラントのプロセス特性や制御装置および操作装置を模擬した運転訓練用シミュレータを用いて、運転訓練が行われている。運転訓練においてはプラントの運転手順に沿った起動停止手順を学習・訓練するとともに、万が一、プラントにおこることが想定される異常事象をシミュレータにより発生させ、これに対する対応操作・措置を訓練する。   In a nuclear power plant, in order to ensure stable operation, operation training is performed using an operation training simulator that simulates process characteristics of the plant, a control device, and an operation device. In the operation training, the start / stop procedure in accordance with the operation procedure of the plant is learned and trained, and an abnormal event that is supposed to occur in the plant is generated by the simulator, and the corresponding operation and measures are trained.

訓練においては訓練の条件が実プラントと近いことが訓練の効果を高めるために必要である。模擬している状況が実プラントとプラントの状態、および操作の条件において近いことが臨場感を高めることになる。すなわち、プラントの運転状態の温度、圧力、流量、放射線センサー読み値、スイッチの状態が実プラントの運転状態と近いことの他、運転しているクルーの数、作業の内容が実際の運転の状況とあっていることが望ましい。   In training, it is necessary for the training conditions to be close to the actual plant in order to enhance the training effect. When the situation being simulated is close to the actual plant and the state of the plant and the operating conditions, the sense of reality is enhanced. That is, in addition to the fact that the temperature, pressure, flow rate, radiation sensor readings, and switch status of the plant operating state are close to the actual plant operating state, the number of crews operating and the details of work are the actual operating conditions. It is desirable to match.

このような観点から、プラントの実機と近い環境を作るために多くの機器を模擬するプラントモデル作成システムやプラント模擬装置が提案されている。このような多くの機器を模擬するプラントモデル作成システムやプラント模擬装置では、そのソフトウエアの量は通常膨大なものであり、その開発・製作・保守には多大な労力を要している事情に鑑みて、例えば、特許文献1及び特許文献2に記載されるような労力軽減化を図ったプラントモデル作成システムやプラント模擬装置が提案されている。   From such a viewpoint, a plant model creation system and a plant simulation device that simulate many devices have been proposed in order to create an environment close to an actual plant. In such a plant model creation system or plant simulation device that simulates many devices, the amount of software is usually enormous, and development, production, and maintenance require a lot of labor. In view of this, for example, a plant model creation system and a plant simulation device that have been proposed to reduce labor as described in Patent Literature 1 and Patent Literature 2 have been proposed.

特開2006−3600号公報JP 2006-3600 A 特開2008−225820号公報JP 2008-225820 A

しかしながら、上述した特許文献に記載されるプラントモデル作成システムに代表される従来のプラントモデル作成システムでは、開発・製作・保守に要する労力の軽減化が必ずしも十分なものではなかった。例えば、上述した特許文献に記載されるプラントモデル作成システムでは、既存のソフトウエアを再利用するため、個別に新しく部品化して再製作する方法が採用されているが、個別の部品化は当該プラントモデル作成システムを使って行ってはいるものの、ユーザーの手作業による入力の負担が多く手間がかかる点は否めないものであった。   However, in the conventional plant model creation system represented by the plant model creation system described in the above-mentioned patent document, the labor required for development, production, and maintenance is not always sufficiently reduced. For example, in the plant model creation system described in the above-mentioned patent document, in order to reuse existing software, a method of individually making new parts and remanufacturing is adopted. Although it was done using a model creation system, it was undeniable that the burden of manual input by the user was heavy and time consuming.

そこで、上述した課題を考慮して、再構築する際に、従来のソフトウエアのソースコードよりもわかりやすく保守しやすいソフトウエアとして正確かつ効率的にプラントモデルを再構築し得るプラントモデル作成システムおよびプラントモデル作成方法を提供する。   Therefore, in consideration of the above-mentioned problems, a plant model creation system that can reconstruct a plant model accurately and efficiently as software that is easier to understand and maintain than conventional software source code, A plant model creation method is provided.

本発明に係るプラントモデル作成システムは、上述した課題を解決するため、既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段を具備し、前記ソフトウエア部品再構築処理手段は、前記既存のソフトウエアのソースコードから、入力変数、出力変数、および、入力と出力の両方が存在する変数のうち、何れの変数であるかを判定する入出力抽出処理部と、前記既存のソフトウエアに対して、グローバル変数でのサブプログラム間の参照をローカル変数での参照に置き換えたサブプログラムを生成する引数化処理部と、前記入出力抽出処理部の変数判定結果および引数化処理部の生成したサブプログラムを用いて、前記サブプログラムをモデルオブジェクトとして認識し呼び出し関係を定義したプログラム構成ツリー情報および前記変数の入出力関係情報を生成する接続関係情報抽出処理部と、前記プログラム構成ツリー情報および入出力関係情報に基づいて、予め生成しておいた部品データから所定の部品を呼び出して部品を配置し、配置した部品同士を結線する部品群配置結線処理部と、前記部品群の配置および結線の状態と入出力関係情報に基づいてプログラムのソースコードを生成するプログラムソースコード生成処理部と、前記プログラムソースコード生成処理部が生成したプログラムを計算し評価する計算評価部とを備えることを特徴とする。   In order to solve the above-described problems, the plant model creation system according to the present invention includes software part restructuring processing means for reconstructing software parts from existing software, and the software part restructuring processing means includes: An input / output extraction processing unit for determining which one of the input variable, the output variable, and the variable in which both the input and the output exist from the source code of the existing software; and the existing software An argumentization processing unit that generates a subprogram in which a reference between subprograms in a global variable is replaced with a reference in a local variable, and a variable determination result and an argumentization processing unit of the input / output extraction processing unit A program that recognizes the subprogram as a model object and defines the calling relationship using the generated subprogram. A connection relationship information extraction processing unit that generates configuration tree information and input / output relationship information of the variable, and calls a predetermined component from previously generated component data based on the program configuration tree information and input / output relationship information A component group arrangement / connection processing unit that arranges the components and connects the arranged components, and a program source code generation process that generates the source code of the program based on the arrangement and connection state of the component groups and the input / output relation information And a calculation evaluation unit that calculates and evaluates the program generated by the program source code generation processing unit.

本発明に係るプラントモデル作成方法は、上述した課題を解決するため、既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段を具備するプラントモデル作成システムにおけるプラントモデル作成方法であり、前記ソフトウエア部品再構築処理手段が、既存のソフトウエアのソースコードから当該ソースコードの中の変数が入力変数、出力変数または入出力変数の何れであるかを判定するステップと、前記判定ステップでの判定結果を使って前記ソースコードを持つプログラムのプログラム構成ツリーと、当該プログラムのサブプログラム間でやりとりされる変数の入出力関係を規定した入出力関係情報とを抽出するステップと、前記サブプログラム間におけるグローバル変数での参照をローカル変数での参照に置き換えたサブプログラムを生成するステップと、前記プログラム構成ツリー、入出力関係情報、サブプログラムおよび予め生成しておいたソフトウエア部品を格納したデータベースを参照して前記ソフトウエア部品を配置し結線するステップと、前記ソフトウエア部品を結線したプラントモデルのプログラムのソースコードを生成するステップと、前記プラントモデルと当該プラントモデルの運転手順を示す情報とに基づいてシミュレーションコードを生成し、生成したシミュレーションコードを評価するステップとを備えた処理手順を実行することを特徴とする。   The plant model creation method according to the present invention is a plant model creation method in a plant model creation system comprising software part rebuilding processing means for rebuilding software parts from existing software in order to solve the above-described problems. The software component restructuring processing means determines from the existing software source code whether the variable in the source code is an input variable, an output variable, or an input / output variable; and the determination Extracting the program configuration tree of the program having the source code using the determination result in step, and the input / output relationship information defining the input / output relationship of variables exchanged between the subprograms of the program; and Referencing global variables between subprograms using local variables Generating a subprogram replaced with a reference, and placing and connecting the software components with reference to the program configuration tree, input / output relation information, subprograms and a database storing previously generated software components A simulation code is generated based on the step of generating, a source code of a program of the plant model connected with the software component, and information indicating an operation procedure of the plant model and the plant model And a step of evaluating the code.

本発明によれば、プラントモデルを再構築する際に、従来のソフトウエアのソースコードよりもわかりやすく保守しやすいソフトウエアとして正確かつ効率的に行うことができる。   According to the present invention, when a plant model is reconstructed, it can be accurately and efficiently performed as software that is easier to understand and maintain than the source code of conventional software.

本発明の実施形態に係るプラントモデル作成システムのシステム構成例を示した概略図。Schematic which showed the system configuration example of the plant model creation system which concerns on embodiment of this invention. 本発明が再利用する既存のプログラムのソースの一例を示した説明図。Explanatory drawing which showed an example of the source of the existing program which this invention reuses. 本発明に係るプラントモデル作成システムが実行するソースコードソフトウエア部品の再構築処理手順の処理フローを示す説明図。Explanatory drawing which shows the processing flow of the reconstruction process procedure of the source code software component which the plant model creation system which concerns on this invention performs. 本発明の実施形態に係るプラントモデル作成システムの引数化処理部が実行する引数化処理ステップの処理手順を示した説明図。Explanatory drawing which showed the process sequence of the argument-ized process step which the argument-ized process part of the plant model creation system which concerns on embodiment of this invention performs. 本発明の実施形態に係るプラントモデル作成システムの入出力抽出処理部が実行する入出力抽出処理ステップの処理フローを示した説明図。Explanatory drawing which showed the processing flow of the input / output extraction process step which the input / output extraction process part of the plant model creation system which concerns on embodiment of this invention performs. 本発明の実施形態に係るプラントモデル作成システムにおいて作成される引数定義表の一例を示した説明図。Explanatory drawing which showed an example of the argument definition table produced in the plant model production system which concerns on embodiment of this invention. 本発明の実施形態に係るプラントモデル作成システムの接続関係情報抽出処理部が抽出する接続関係情報としてのプログラム構成ツリーの情報を示した説明図。Explanatory drawing which showed the information of the program structure tree as connection relation information which the connection relation information extraction process part of the plant model creation system which concerns on embodiment of this invention extracts. 本発明の実施形態に係るプラントモデル作成システムの接続関係情報抽出処理部が抽出した接続関係情報からプログラムのサブプログラム間における変数の入出力関係についてまとめたテーブル(入出力関係表)の一例を示した説明図。An example of the table (input / output relation table) which summarizes the input / output relation of the variable between the subprograms of the program from the connection relation information extracted by the connection relation information extraction processing unit of the plant model creation system according to the embodiment of the present invention is shown. Explanatory drawing. 本発明の実施形態に係るプラントモデル作成システムの引数化処理部が実行する引数化処理ステップ後に得られるソースの一例を示した説明図。Explanatory drawing which showed an example of the source obtained after the argumentization process step which the argumentization process part of the plant model creation system which concerns on embodiment of this invention performs. 本発明の実施形態に係るプラントモデル作成システムの部品データを作成する際に必要となるアイコンの一例を示した説明図。Explanatory drawing which showed an example of the icon required when producing the component data of the plant model creation system which concerns on embodiment of this invention. 本発明の実施形態に係るプラントモデル作成システムの部品化処理部が作成した部品データの一例およびプログラム再構成の概略例を示す説明図。Explanatory drawing which shows an example of the part data which the componentization process part of the plant model creation system which concerns on embodiment of this invention produced, and the schematic example of a program reconstruction. 本発明の実施形態に係るプラントモデル作成システムの部品データに対応する部品の引数定義表であって、(a)は部品名「入口境界」の引数定義表、(b)は部品名「出口境界」の引数定義表、(c)は部品名「ポンプ」の引数定義表、(d)は部品名「タンク」の引数定義表を説明する説明図。It is an argument definition table of parts corresponding to part data of the plant model creation system concerning an embodiment of the present invention, (a) is an argument definition table of part name "entrance boundary", (b) is part name "exit boundary" (C) is an argument definition table for a component name “pump”, and (d) is an explanatory diagram for explaining an argument definition table for a component name “tank”. 本発明の実施形態に係るプラントモデル作成システムの部品群配置結線処理部が実行する部品群配置結線処理ステップの処理手順を示した説明図。Explanatory drawing which showed the process sequence of the component group arrangement | positioning connection process step which the component group arrangement | positioning connection process part of the plant model creation system which concerns on embodiment of this invention performs. 本発明の実施形態に係るプラントモデル作成システムのプログラムソースコード生成処理部がプログラムの更新・生成の際に作成するメモリーテーブルの一例を示す説明図。Explanatory drawing which shows an example of the memory table which the program source code production | generation process part of the plant model production system which concerns on embodiment of this invention produces at the time of the update and production | generation of a program. 本発明の実施形態に係るプラントモデル作成システムのプログラムソースコード生成処理部が作成したプログラムのソースの一例を示した説明図。Explanatory drawing which showed an example of the source of the program which the program source code production | generation process part of the plant model creation system which concerns on embodiment of this invention created. 本発明の実施形態に係るプラントモデル作成システムの計算評価部が実行するシミュレーションコード評価ステップの詳細な処理手順を説明する説明図。Explanatory drawing explaining the detailed process sequence of the simulation code evaluation step which the calculation evaluation part of the plant model creation system which concerns on embodiment of this invention performs. 本発明の実施形態に係るプラントモデル作成システムにおいて、既存のプログラム構成ツリーを部品追加等によって変更した後のプログラム構成ツリーを示した説明図。In the plant model creation system which concerns on embodiment of this invention, explanatory drawing which showed the program structure tree after changing the existing program structure tree by components addition etc. FIG. 本発明の実施形態に係るプラントモデル作成システムにおいて、プログラム構成ツリーの変更に伴い変更された後の入出力関係表を示した説明図。In the plant model creation system which concerns on embodiment of this invention, explanatory drawing which showed the input-output relationship table after changing with the change of a program structure tree. 本発明の実施形態に係るプラントモデル作成システムの部品群配置結線処理部が実行する部品群配置結線処理ステップによって変更後のプログラム構成ツリーに対応した部品を配置し結線して作成された結線図を示す説明図。The connection diagram created by arranging and connecting parts corresponding to the changed program configuration tree by the parts group arrangement and connection processing step executed by the parts group arrangement and connection processing unit of the plant model creation system according to the embodiment of the present invention. FIG. 本発明の実施形態に係るプラントモデル作成システムのプログラムの更新・生成の際に作成されるメモリーテーブルの一例であり、プログラムソースコード生成処理部がプログラムを更新した後のメモリーテーブルを示す説明図。Explanatory drawing which is an example of the memory table created at the time of the update of the program of the plant model creation system which concerns on embodiment of this invention, and a program source code production | generation process part updates the program. 本発明の実施形態に係るプラントモデル作成システムで実行されるプログラムソースコード生成処理ステップのサブステップであるメモリーテーブル更新処理ステップの処理フローを示した説明図。Explanatory drawing which showed the processing flow of the memory table update process step which is a substep of the program source code production | generation process step performed with the plant model creation system which concerns on embodiment of this invention. 本発明の実施形態に係るプラントモデル作成システムで再利用するプラントプログラムに含まれるタンクプログラム(サブプログラム)のソース(引数化処理前)を示した説明図。Explanatory drawing which showed the source (before argumentization process) of the tank program (subprogram) contained in the plant program reused with the plant model creation system which concerns on embodiment of this invention. 本発明の実施形態に係るプラントモデル作成システムで再利用するプラントプログラムに含まれるタンクプログラム(サブプログラム)のソースから得られる情報を示す図であって、(a)は引数定義表の例を示した説明図、(b)はプログラム構成ツリー情報を示した説明図、(c)は入出力関係表の一例を示した説明図。It is a figure which shows the information obtained from the source of the tank program (subprogram) contained in the plant program reused with the plant model creation system which concerns on embodiment of this invention, Comprising: (a) shows the example of an argument definition table | surface (B) is an explanatory diagram showing program configuration tree information, (c) is an explanatory diagram showing an example of an input / output relationship table. 本発明の実施形態に係るプラントモデル作成システムで再利用するプラントプログラムに含まれるタンクプログラム(サブプログラム)に対して引数化処理ステップ後のソースを示した説明図。Explanatory drawing which showed the source after the argumentization process step with respect to the tank program (subprogram) contained in the plant program reused with the plant model creation system which concerns on embodiment of this invention. タンクプログラム(サブプログラム)を有するプラントプログラムに対して本発明の実施形態に係るプラントモデル作成システムの部品化処理部が作成した部品データの一例およびプログラム再構成の概略例を示す説明図。Explanatory drawing which shows an example of the part data which the part conversion process part of the plant model creation system which concerns on embodiment of this invention produced | generated with respect to the plant program which has a tank program (subprogram), and the schematic example of program reconstruction.

以下、本発明の実施形態に係るプラントモデル作成システムの実施形態について、図面を参照して説明する。   Hereinafter, an embodiment of a plant model creation system according to an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の実施形態に係るプラントモデル作成システムの一実施例であるプラントモデル作成システム10のシステム構成例を示した概略図である。   FIG. 1 is a schematic diagram showing a system configuration example of a plant model creation system 10 which is an example of a plant model creation system according to an embodiment of the present invention.

プラントモデル作成システム10は、ハードウエア資源であるコンピュータとソフトウエア資源であるソフトウエア部品再構築処理プログラム(以下、ソフトウエア部品再構築処理PGと称する。)11とが協働することによって実現されるシステムであり、サブプログラム間の変数の取り合いをローカル変数(FORTRAN言語では引数)で取り合うようにして処理を実行するシステムである。   The plant model creation system 10 is realized by the cooperation of a computer, which is a hardware resource, and a software component reconstruction process program (hereinafter referred to as a software component reconstruction process PG) 11 which is a software resource. This is a system that executes processing by exchanging variables between subprograms with local variables (arguments in the FORTRAN language).

図1に示されるプラントモデル作成システム10は、操作の入力を受け付ける入力手段12と、処理実行結果等の視覚的な情報をユーザーに提示する表示手段13と、既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段14と、プログラム、ファイル、データベース等の電子的な情報を記憶して格納可能な記憶領域を有する記憶手段15と、を具備する。   A plant model creation system 10 shown in FIG. 1 includes an input unit 12 that receives an input of an operation, a display unit 13 that presents visual information such as a process execution result to a user, and software components from existing software. Software component restructuring processing means 14 for restructuring and storage means 15 having a storage area capable of storing and storing electronic information such as programs, files, and databases.

ソフトウエア部品再構築処理手段14は、入出力抽出処理部21と、接続関係情報抽出処理部22と、引数化処理部23と、部品化処理部24と、部品群配置結線処理部25と、プログラムソースコード生成処理部26と、計算評価部27とを備える。   The software component reconstruction processing means 14 includes an input / output extraction processing unit 21, a connection relation information extraction processing unit 22, an argumentization processing unit 23, a componentization processing unit 24, a component group arrangement connection processing unit 25, A program source code generation processing unit 26 and a calculation evaluation unit 27 are provided.

入出力抽出処理部21は、既存のソフトウエアのソースコードから何れの種類の変数であるか、すなわち、入力変数、出力変数または入力と出力の両方が存在する変数(以下、入出力変数と称する。)の何れであるかを判定する機能を有し、当該機能に基づいて入力変数、出力変数または入出力変数の何れであるかを判定する。   The input / output extraction processing unit 21 is any type of variable from the existing software source code, that is, an input variable, an output variable, or a variable in which both input and output exist (hereinafter referred to as an input / output variable). .)), And based on the function, it is determined whether the variable is an input variable, an output variable, or an input / output variable.

接続関係情報抽出処理部22は、接続関係情報を抽出する機能を有し、当該機能に基づいて接続関係情報を抽出する。ここで、接続関係情報とは、後述する図7に一例として示されるプログラム構成ツリーの情報と、後述する図8(図6)に一例として示される入出力関係の情報とを含む。   The connection relation information extraction processing unit 22 has a function of extracting connection relation information, and extracts connection relation information based on the function. Here, the connection relationship information includes information of a program configuration tree shown as an example in FIG. 7 described later and input / output relationship information shown as an example in FIG. 8 (FIG. 6) described later.

また、接続関係情報抽出処理部22は、接続関係情報の抽出のみならず、一度抽出され作成されたプログラム構成ツリーの情報および入出力関係の情報を編集(追加や削除等)する機能を有し、当該機能によって、プログラム構成ツリーや入出力関係表の編集を行うことができる。   The connection relationship information extraction processing unit 22 has a function of not only extracting connection relationship information but also editing (adding, deleting, etc.) program configuration tree information and input / output relationship information once extracted and created. With this function, the program configuration tree and the input / output relationship table can be edited.

引数化処理部23は、ソースコードにおけるコモンラベルの変数をいわゆる引数に追加していく機能を有する。引数化処理部23は、当該機能を用いて、プログラムを引数化する。具体的には後述する図4に示される処理を行い、既存のソースを後述する図9に示されるソースとする処理を実行する。これによって、再構築後のプログラムにおいて、サブプログラム間の変数の取り合いをローカル変数(FORTRAN言語では引数)で取り合うようにすることができる。   The argument processing unit 23 has a function of adding a common label variable in the source code to a so-called argument. The argumentization processing unit 23 converts the program into an argument using the function. Specifically, the process shown in FIG. 4 described later is performed, and the process of setting an existing source as the source shown in FIG. 9 described later is executed. As a result, in the reconstructed program, it is possible to exchange variables between subprograms with local variables (arguments in the FORTRAN language).

部品化処理部24は、予めユーザーが定義したアイコンと、引数化処理部23によって引数化されたサブプログラム29に登場する部品とを対応付ける機能を有する。また、部品化処理部24は、生成したソフトウエア部品のうち不要となったものを削除したり複製したりする機能(ソフトウエア部品編集機能)を有する。   The componentization processing unit 24 has a function of associating an icon defined by the user in advance with a component appearing in the subprogram 29 that is argumentized by the argumentization processing unit 23. In addition, the componentization processing unit 24 has a function (software component editing function) for deleting or duplicating unnecessary generated software components.

部品化処理部24は、図3に示されるソースコードソフトウエア部品再構築処理手順(ステップS1〜ステップS4)のステップS2の処理(より詳細には図10に示される処理)を実行することで、アイコンとサブプログラムに登場する部品名とを対応付けてソフトウエア部品を生成することができる。   The componentization processing unit 24 executes the processing of step S2 (more specifically, the processing shown in FIG. 10) of the source code software component reconstruction processing procedure (step S1 to step S4) shown in FIG. The software component can be generated by associating the icon with the component name appearing in the subprogram.

部品群配置結線処理部25は、プログラム構成ツリーおよび入出力関係表(接続関係情報)に基づいて、予め生成しておいた個々の部品から所定の部品を呼び出して部品を配置したり、配置した部品と部品とを結線したりする機能を有し、当該機能に基づいて複数の部品を結線して構成されるモデルプログラム(本実施例ではプラントモデル)の作成をユーザーが容易に行えるようにする。   Based on the program configuration tree and the input / output relationship table (connection relationship information), the component group arrangement / connection processing unit 25 calls a predetermined component from previously generated components and arranges or arranges the components. It has a function of connecting parts to each other, and a user can easily create a model program (plant model in this embodiment) configured by connecting a plurality of parts based on the function. .

プログラムソースコード生成処理部26は、部品群の配置および結線の状態と入出力関係情報に基づいてプログラムのソースコードを生成する機能を有し、当該機能に基づいてプログラムのソースコードを生成する。   The program source code generation processing unit 26 has a function of generating a source code of the program based on the arrangement of components, the connection state, and the input / output relation information, and generates the source code of the program based on the function.

計算評価部27は、プログラムについて計算し評価する機能を有し、当該機能に基づいて、プログラムソースコード生成処理部26が生成したソースコードに係るプログラムを評価する。   The calculation evaluation unit 27 has a function of calculating and evaluating a program, and evaluates a program related to the source code generated by the program source code generation processing unit 26 based on the function.

尚、プラントモデル作成システム10の入力手段12、表示手段13、ソフトウエア部品再構築処理手段14および記憶手段15は、必ずしも同一のコンピュータ内に存在することを要しない。ソフトウエア部品再構築処理手段14と入力手段12、表示手段13および記憶手段15がアクセス可能に構成されていれば良く、これらの手段が幾つかのコンピュータに分散して配置されていても構わない。   Note that the input unit 12, the display unit 13, the software component reconstruction processing unit 14, and the storage unit 15 of the plant model creation system 10 do not necessarily exist in the same computer. The software component reconstruction processing means 14, the input means 12, the display means 13, and the storage means 15 need only be configured to be accessible, and these means may be distributed among several computers. .

次に、図1に示されるプラントモデル作成システム10を適用して、既存のシミュレーションソフトを再利用し、保守しやすいモデルプログラムを再構成する処理内容について説明する。   Next, processing contents for applying the plant model creation system 10 shown in FIG. 1 and reusing existing simulation software to reconstruct a model program that is easy to maintain will be described.

図2は、既存のプログラムのソースの一例を示した説明図である。ここで、符号29はサブプログラムである。   FIG. 2 is an explanatory diagram showing an example of the source of an existing program. Here, reference numeral 29 is a subprogram.

図2に示されるように、一般的な計算プログラムのソースコードは、例えばFORTRAN言語で言うコモン変数(COMMON宣言されたグローバル変数)などグローバルな変数がいたるところに使われている。これは、どこからでもこの宣言を共通にもてば値を参照・定義できるが、対象とするプログラムがどの変数を用いているのか、あるいは再びこのサブプログラムを使ったりグローバル変数を変更しようとしたりする場合に、全てのロジックをチェックする必要が出てきてしまう。このことがソフトウエアの部品を再利用する際の妨げになっている。   As shown in FIG. 2, the source code of a general calculation program is used everywhere for global variables such as common variables in the FORTRAN language (global variables declared COMMON). This is because you can refer to and define a value by using this declaration from anywhere in common, but the target program uses which variable, or uses this subprogram again or tries to change a global variable. In this case, it becomes necessary to check all the logic. This hinders the reuse of software components.

図2に示される例は、プラントモデルのソースが、境界条件、タンクおよびポンプのソースから構成されていることを示している。そして、このタンクのソースは質量収支および熱収支のサブプログラムから構成されている。各サブプログラム間の変数のやり取りはいわゆるコモン領域を取ってグローバル変数で渡しているものである。   The example shown in FIG. 2 shows that the source of the plant model consists of boundary conditions, tank and pump sources. The source of this tank is composed of subprograms for mass balance and heat balance. The exchange of variables between subprograms is a global variable that takes a so-called common area.

このとき、機器を追加したりした場合には、このグローバル変数を追加し、全てのソースを修正する必要がある。また、使用される変数が陽に定義されているわけでなく、そのソフトウエアとしての外部との関係や入出力が不明確なものとなっている。例えば、ポンプサブプログラムでは、T3,T4は使われていないにもかかわらず宣言部分におく必要がある。   At this time, when a device is added, it is necessary to add this global variable and modify all sources. In addition, the variables used are not explicitly defined, and the external relationship and input / output of the software are unclear. For example, in the pump subprogram, T3 and T4 must be placed in the declaration part even though they are not used.

尚、図2に示されるソースはメインのサブプログラム以下はサブプログラムのみを呼ぶ構成となっているが、シミュレーションにおけるプログラムは一般的にこのような形にできるので、以下この形式を例について説明する。   The source shown in FIG. 2 has a configuration in which only the main subprogram and the subprograms are called. However, since the program in the simulation can generally be in such a form, this form will be described below as an example. .

図3は、プラントモデル作成システム10が実行するソースコードソフトウエア部品の再構築処理の手順を示す説明図である。ここで、図3に示される符号31〜37は電子的な情報であり、処理の実行に先立って、または事後的に図1に示される記憶手段15に格納される。また、必要に応じてデータベース化されている場合もある。   FIG. 3 is an explanatory diagram showing the procedure of the source code software component reconstruction process executed by the plant model creation system 10. Here, reference numerals 31 to 37 shown in FIG. 3 are electronic information, which are stored in the storage unit 15 shown in FIG. 1 before or after execution of the processing. Moreover, it may be made into a database as needed.

図3に示されるように、ユーザーからの処理実行要求があると、ソースコードソフトウエア部品再構築処理手順(ステップS1〜ステップS4)を開始する。   As shown in FIG. 3, when there is a process execution request from the user, the source code software component restructuring process procedure (steps S1 to S4) is started.

まず、ステップS1では、ソフトウエア部品再構築処理手段14が、既存のソフトウエアのソースコード31から入出力および接続関係情報を抽出して引数化する処理を実行する。具体的には、入出力抽出処理部21がソースコード31の中の変数が入力変数、出力変数または入出力変数の何れであるかを判定し、当該判定結果を使って接続関係情報抽出処理部22が接続関係情報32を抽出する。また、引数化処理部23はソースコード31から当該ソースコードに含まれるサブプログラム29間におけるグローバル変数での参照をローカル変数(いわゆる引数)での参照に置き換えたサブプログラム29を生成する引数化処理ステップを行う。   First, in step S1, the software component reconstruction processing means 14 executes processing for extracting input / output and connection relation information from the existing software source code 31 and converting it into an argument. Specifically, the input / output extraction processing unit 21 determines whether the variable in the source code 31 is an input variable, an output variable, or an input / output variable, and uses the determination result to determine the connection relation information extraction processing unit. 22 extracts the connection relation information 32. The argumentization processing unit 23 also generates an argumentization process for generating a subprogram 29 in which the reference in the global variable between the subprograms 29 included in the source code 31 is replaced with the reference in the local variable (so-called argument). Do step.

続いてステップS2では、ソフトウエア部品再構築処理手段14(具体的には、部品化処理部24)が、ステップS1で抽出された接続関係情報32と、引数化されたサブプログラム群33と、予め作成しておいたアイコンとを用いて部品名とアイコン、その他必要な情報を対応付ける部品化処理、すなわち、ソフトウエア部品を作成する。この結果、色々な部品についての部品データ34が生成される。尚、ソースコードソフトウエア部品再構築処理手順を何度か実施している場合には、ステップS2の処理ステップは省略される場合もある。   Subsequently, in step S2, the software component reconstruction processing means 14 (specifically, the component processing unit 24), the connection relation information 32 extracted in step S1, the subprogram group 33 converted into an argument, Using a previously created icon, a componentization process for associating a component name with an icon and other necessary information, that is, a software component is created. As a result, component data 34 for various components is generated. If the source code software component restructuring process procedure has been performed several times, the process step of step S2 may be omitted.

続いてステップS3では、ユーザーが処理実行の入力操作することによって、入力手段12からソフトウエア部品再構築処理手段14に与えられた指示に基づいて、ソフトウエア部品再構築処理手段14、具体的には、部品群配置結線処理部25が、ステップS1で作成された接続関係情報32とサブプログラム29の集合であるサブプログラム群33とステップS2で作成された部品データ34を参照して、必要なソフトウエア部品を配置し結線する。そして、ソフトウエア部品再構築処理手段14のプログラムソースコード生成部26が当該結線後の状態(プラントモデル)のプログラムのソースコードを生成する。この結果、プラントモデル35が生成される。   Subsequently, in step S3, based on an instruction given from the input unit 12 to the software component reconstruction processing unit 14 by a user performing an input operation for processing execution, the software component reconstruction processing unit 14, specifically, The component group arrangement / connection processing unit 25 refers to the connection relationship information 32 created in step S1, the subprogram group 33 which is a set of subprograms 29, and the component data 34 created in step S2. Arrange and connect software components. Then, the program source code generation unit 26 of the software component reconstruction processing means 14 generates the source code of the program in the state after connection (plant model). As a result, a plant model 35 is generated.

続いて、ステップS4では、ソフトウエア部品再構築処理手段14(具体的には、計算評価部27)が、プラントモデル35に係るプラントの運転手順を示す情報として予め作成しておいた運転手順情報36を読み出し、シミュレーション手順を設定する。そして、計算評価部27は、シミュレーションコードを生成し、生成したシミュレーションコードを評価する。評価結果は、計算評価結果情報37として、例えば、表示手段12に表示されたり、記憶手段15に格納されたりする。   Subsequently, in step S4, the operating procedure information previously created as information indicating the operating procedure of the plant related to the plant model 35 by the software component reconstruction processing means 14 (specifically, the calculation evaluation unit 27). 36 is read and a simulation procedure is set. Then, the calculation evaluation unit 27 generates a simulation code and evaluates the generated simulation code. The evaluation result is displayed on the display unit 12 or stored in the storage unit 15 as the calculation evaluation result information 37, for example.

図3に示されるステップS1〜ステップS4の各処理ステップのより詳細な処理内容について図4〜図16を引用して説明する。   More detailed processing contents of the processing steps of Steps S1 to S4 shown in FIG. 3 will be described with reference to FIGS.

図4は、引数化処理部23が実行する引数化処理ステップの処理フローを示した説明図である。   FIG. 4 is an explanatory diagram showing a processing flow of argumentization processing steps executed by the argumentization processing unit 23.

引数化処理部23は、まず、ソーステキストを読み込み(ステップS11)、ブランク、コメントなどを削除、継続行をつなげ、ソーステキストとして有効な部分を抽出する(ステップS12)。そして、使用したプログラミング言語の言語規則に沿って変数を切り出す(ステップS13)。これは、演算記号、括弧などからソース上の変数を切り出し、予約語などを排除することで可能となる。尚、演算記号、括弧などからソース上の変数を切り出し、予約語などを排除する機能は、一般にFORTRAN,C言語などのコンパイラーにも備えられているので、これを利用して実行することもできる。続いて、引数化処理部23は、グローバル変数として使われていたものについては、サブルーチンの引数へ上げ、引数を追加する(ステップS14)。以上のステップS11〜ステップS14が引数化処理部23の行う引数化処理ステップである。   The argument processing unit 23 first reads the source text (step S11), deletes blanks, comments, etc., connects the continuation lines, and extracts a valid portion as the source text (step S12). Then, variables are cut out in accordance with the language rules of the used programming language (step S13). This can be done by cutting out variables on the source from operation symbols, parentheses, etc., and eliminating reserved words. In addition, since a compiler for FORTRAN, C language, etc. is generally provided with a function for cutting out variables on the source from operation symbols, parentheses, etc., and eliminating reserved words, it can also be executed using this. . Subsequently, the argumentization processing unit 23 adds the argument used for the global variable to the subroutine argument and adds the argument (step S14). The above steps S11 to S14 are the argumentization processing steps performed by the argumentization processing unit 23.

図5は、入出力抽出処理部21が実行する入出力抽出処理ステップの処理フローを示した説明図である。   FIG. 5 is an explanatory diagram showing a processing flow of input / output extraction processing steps executed by the input / output extraction processing unit 21.

入出力抽出処理部21は、まず、ソースコード31を読み出してソースの入力を行い(ステップS15)、変数の切り出しを行う(ステップS16)。そして、切り出した変数がはじめに現れない場合、関数・サブプログラムの出力変数である場合または等式の右辺に来ない場合(ステップS17でNOの場合)には、当該変数は出力変数であると判定する(ステップS18)。   First, the input / output extraction processing unit 21 reads the source code 31 and inputs the source (step S15), and cuts out the variable (step S16). If the cut variable does not appear first, if it is an output variable of a function / subprogram, or if it does not come to the right side of the equation (NO in step S17), it is determined that the variable is an output variable. (Step S18).

一方、入出力抽出処理部21は、切り出した変数がはじめに現れる場合、関数・サブプログラムの入力変数である場合または等式の右辺に来る場合(ステップS17でYESの場合)には、入力変数または出力変数と判断し(ステップS19)、2回目以降、常に関数・サブプログラムの入力変数かまたは等式の右辺に来る場合(ステップS20でYESの場合)には、入力変数であると判断する(ステップS21)。また、そうでない場合(ステップS20でNOの場合)には、入出力抽出処理部21は、入力と出力がある変数であると判断する(ステップS22)。すなわち、入出力抽出処理ステップでは、上記三種類に変数は分けられる。   On the other hand, if the extracted variable first appears, if it is an input variable of a function / subprogram, or if it comes to the right side of the equation (in the case of YES in step S17), the input / output extraction processing unit 21 It is determined as an output variable (step S19), and if it is always the input variable of a function / subprogram or the right side of an equation after the second time (YES in step S20), it is determined as an input variable (step S20). Step S21). If not (NO in step S20), the input / output extraction processing unit 21 determines that the input and output are variables (step S22). That is, in the input / output extraction processing step, the variables are divided into the above three types.

ここで、図2に示されるプログラムに対して入出力抽出処理ステップおよび接続関係情報抽出処理を実行した場合の例を説明する。   Here, an example in which the input / output extraction processing step and the connection relation information extraction processing are executed on the program shown in FIG. 2 will be described.

図6は、図2に示されるプログラムに対して入出力抽出処理ステップおよび接続関係情報抽出処理を実行して作成される引数定義表の一例を示した説明図である。尚、図6に示される五つの表は、図2に示される五つのサブプログラム29に対応する。   FIG. 6 is an explanatory diagram showing an example of an argument definition table created by executing the input / output extraction processing step and the connection relation information extraction processing for the program shown in FIG. The five tables shown in FIG. 6 correspond to the five subprograms 29 shown in FIG.

入出力抽出処理部21は、図6に示されるように、例えば、質量M1については流量の差分(W1−W2)*DTが積算されるため、最初に右辺に来ているということで、入力変数と判断するが、更新されるため出力とも判断する。   As shown in FIG. 6, for example, the input / output extraction processing unit 21 inputs the difference in flow rate (W 1 −W 2) * DT for the mass M 1, so that it first comes to the right side. Although it is determined as a variable, it is also determined as an output because it is updated.

ここで、図6に示される表のサブプログラム名および変数の型は、同様にソースリストを構文解析して抽出したものである。例えば、サブプログラム名はSUBROUTINE文の次に来る単語を抽出すればよい。これらの情報は、入出力関係情報に含まれる情報であり、接続関係情報抽出処理部22によって抽出することができる。尚、図6に示される引数定義表の例コメントについては、通常ソースリストからは抽出できないため、必要に応じてユーザーが入力すればよい。すなわち、コメントは、プログラムの理解に役立つ任意の情報であって、プログラム構造に影響を与える情報ではない。   Here, the subprogram names and variable types in the table shown in FIG. 6 are obtained by parsing the source list in the same manner. For example, the subprogram name may be extracted from the word that comes after the SUBROUTINE statement. These pieces of information are information included in the input / output relation information and can be extracted by the connection relation information extraction processing unit 22. Note that the comment in the argument definition table shown in FIG. 6 cannot be extracted from the normal source list, so the user can input it as necessary. That is, the comment is arbitrary information useful for understanding the program and is not information that affects the program structure.

一方、接続関係情報抽出処理部22は、プログラムのソースよりそのプログラムが呼んでいるサブプログラムを、例えばCALL文の次に来る単語ということで抽出することができる。   On the other hand, the connection relationship information extraction processing unit 22 can extract the subprogram called by the program from the source of the program, for example, as a word that comes after the CALL sentence.

図7は、接続関係情報抽出処理部22が抽出する接続関係情報としてのプログラム構成ツリーの情報の一例を示した説明図である。   FIG. 7 is an explanatory diagram showing an example of program configuration tree information as connection relation information extracted by the connection relation information extraction processing unit 22.

接続関係情報抽出処理部22は、図7に示されるように、実行順序とコールしているサブプログラムを示しているプログラム構成ツリーを生成することができる。このとき、同一名のサブプログラム名でも計算しようとしている対象が異なることがある点に鑑み、出現順にその対象の番号(オブジェクト番号)を付加するようにする。例えば、図7に示される例では、Object_0からObject_4まで番号をつけている。   As shown in FIG. 7, the connection relation information extraction processing unit 22 can generate a program configuration tree indicating the execution order and the subprograms that are called. At this time, in consideration of the fact that the target to be calculated may be different even for the subprogram names having the same name, the numbers of the targets (object numbers) are added in the order of appearance. For example, in the example shown in FIG. 7, numbers are assigned from Object_0 to Object_4.

次に、図8を引用してサブプログラム間における入出力関係の抽出の処理内容について説明する。   Next, the contents of the process of extracting the input / output relationship between the subprograms will be described with reference to FIG.

図8は、変数のサブプログラム間の入出力関係についてまとめたテーブル(入出力関係表)の一例を示した説明図である。   FIG. 8 is an explanatory diagram showing an example of a table (input / output relationship table) that summarizes the input / output relationships between variable subprograms.

接続関係情報抽出処理部22は、接続関係情報32に含まれる入出力関係情報(図6)とプログラム構成ツリー情報(図7)とを参照して変数のサブプログラム間における入出力関係(サブプログラム間でやりとりされる変数の入出力関係)を規定したテーブル、すなわち、入出力関係表(図8)を作成することができる。   The connection relation information extraction processing unit 22 refers to the input / output relation information (FIG. 6) and the program configuration tree information (FIG. 7) included in the connection relation information 32, and the input / output relation (subprogram between variable subprograms). A table defining the input / output relationship of variables exchanged between them, that is, an input / output relationship table (FIG. 8) can be created.

例えば、図6に示される各サブプログラム29と対応するテーブル(入出力関係情報)をみると、サブプログラムBOUND_Iにおいて、変数W1,T1は出力と定義されている。一方、変数W1,T1は、タンクサブプログラムTankにおいて、入力と定義されている。この結果、図8に示されるように、変数W1,T1は、サブプログラムBOUND_Iにおいて定義され出力される変数であり、タンクサブプログラムTankで入力される変数として関係が規定される。すなわち、出力と入力との対応付けがなされる。他の変数W2等についても同様に出力と入力との対応付けがなされる。   For example, looking at the table (input / output relation information) corresponding to each subprogram 29 shown in FIG. 6, in the subprogram BOUND_I, the variables W1 and T1 are defined as outputs. On the other hand, the variables W1 and T1 are defined as inputs in the tank subprogram Tank. As a result, as shown in FIG. 8, the variables W1 and T1 are defined and output in the subprogram BOUND_I, and the relationship is defined as a variable input in the tank subprogram Tank. That is, the output and the input are associated with each other. Similarly, other variables W2 and the like are associated with outputs and inputs.

図9は、引数化処理部23が実行する引数化処理ステップの結果、図2に示されるソースから得られる引数化処理ステップ後のソースを示した説明図である。引数化処理ステップにおいては、引数化処理部23が抽出された図6に示されるテーブル(引数定義表)のコモンラベルの変数をいわゆる引数に追加していくことになる。その処理をした結果は例えば図9に示されるようなものとなる。   FIG. 9 is an explanatory diagram showing the source after the argumentization processing step obtained from the source shown in FIG. 2 as a result of the argumentization processing step executed by the argumentization processing unit 23. In the argument processing step, the variable of the common label in the table (argument definition table) shown in FIG. 6 from which the argument processing unit 23 has been extracted is added to the so-called argument. The result of the processing is as shown in FIG. 9, for example.

次に、図3に示されるステップS2の部品化処理ステップのより詳細な処理内容について説明する。   Next, more detailed processing contents of the componentization processing step of step S2 shown in FIG. 3 will be described.

部品化処理ステップでは、ステップS1で引数化されたサブプログラム29(図9)とこれに対応する引数定義情報(図6)およびアイコン40(図10)が必要となる。アイコン40は描画ソフトなどでユーザーが予め定義しておく。   In the componentization processing step, the subprogram 29 (FIG. 9) converted to the argument in step S1, the argument definition information (FIG. 6) and the icon 40 (FIG. 10) corresponding thereto are required. The icon 40 is previously defined by the user using drawing software or the like.

図10は、部品データ34作成の際に必要となるアイコン40の一例を示した説明図である。   FIG. 10 is an explanatory diagram showing an example of the icon 40 that is necessary when the component data 34 is created.

図10に示されるように、アイコン40は、サブプログラム29の名称と当該サブプログラム29に登場する部品名とを対応付けて格納しておく。例えば、図10に示されるアイコン40aは、部品番号「No.1」と、部品名「入口境界」と、サブプログラム名「BOUND_I」と関連付けられて部品化処理部24が読み出し可能に格納される。他のアイコン40b,40c,40dについても同様である。また、部品名はユーザーが定義して決定する。尚、図10に示されるアイコン40はモデルを表す図形と結線ができる端点とを有する構成を採用したものであるが、端点は一つの変数または変数の組をまとめたベクトルのようなものでも良い。   As shown in FIG. 10, the icon 40 stores the name of the subprogram 29 and the part name appearing in the subprogram 29 in association with each other. For example, the icon 40a illustrated in FIG. 10 is associated with the part number “No. 1”, the part name “entrance boundary”, and the subprogram name “BOUND_I”, and is stored so as to be readable by the parting processing unit 24. . The same applies to the other icons 40b, 40c, and 40d. The part name is defined and determined by the user. Note that the icon 40 shown in FIG. 10 adopts a configuration having a figure representing a model and an end point that can be connected, but the end point may be a single variable or a vector of a set of variables. .

部品データ34の作成は、部品化処理部24がソースプログラムから解析して抽出されたプログラム構成ツリーと入出力関係表を含む接続関係情報32と、図6に示されるサブプログラム29のソースと引数定義表の情報とを参照して、部品名(又は機器名)およびアイコン40の情報を対応付けすることでなされる。プログラム構成ツリー、入出力関係表、サブプログラム29のソース、引数定義表の情報およびアイコン40の情報が対応付けられることで、ソースリストに対応させることができる。   The component data 34 is generated by connecting the relationship information 32 including the program configuration tree and the input / output relationship table extracted by the component processing unit 24 from the source program, and the source and argument of the subprogram 29 shown in FIG. This is done by referring to the information in the definition table and associating the component name (or device name) with the information of the icon 40. By associating the program configuration tree, the input / output relationship table, the source of the subprogram 29, the information of the argument definition table, and the information of the icon 40, it is possible to correspond to the source list.

次に、図9に示される引数化されたサブプログラム29を用いて結線図を構成することについて説明する。   Next, the construction of a connection diagram using the argumentized subprogram 29 shown in FIG. 9 will be described.

図11は部品化処理部24が作成した部品データ34の一例およびプログラム再構成の概略例を示す説明図であり、図12は部品データ34に対応する部品の引数定義表であり、図12(a)は部品名「入口境界」の引数定義表、(b)は部品名「出口境界」の引数定義表、(c)は部品名「ポンプ」の引数定義表、(d)は部品名「タンク」の引数定義表を説明する説明図、図13は、部品群配置結線処理部が実行する部品群配置結線処理ステップの処理手順を示した説明図である。   FIG. 11 is an explanatory diagram showing an example of part data 34 created by the partization processing unit 24 and a schematic example of program reconstruction. FIG. 12 is an argument definition table of parts corresponding to the part data 34, and FIG. a) is an argument definition table for the component name “entrance boundary”, (b) is an argument definition table for the component name “exit boundary”, (c) is an argument definition table for the component name “pump”, and (d) is an argument definition table for the component name “pump”. FIG. 13 is an explanatory diagram illustrating a processing procedure of a component group arrangement / connection processing step executed by the component group arrangement / connection processing unit.

尚、図11において示される部品名欄45に表示される部品名とアイコン欄46に表示されるアイコン40a,40b,40c,40dはユーザーが定義したものである。また、サブプログラム欄47には、図9に示されるサブプログラム29のうち対応するサブプログラム29の内容(例えば、部品名がポンプであればポンプのサブプログラム)が記載され、引数定義欄48には、図12(a)〜図12(d)の内容が記載される。   Note that the component names displayed in the component name column 45 and the icons 40a, 40b, 40c, and 40d displayed in the icon column 46 shown in FIG. 11 are defined by the user. Further, the subprogram column 47 describes the contents of the corresponding subprogram 29 in the subprogram 29 shown in FIG. 9 (for example, the pump subprogram if the part name is a pump), and the argument definition column 48 displays the contents. The contents of FIGS. 12A to 12D are described.

図11に示されるように、プラントモデル作成システム10は、ソースコード31からプログラム構成ツリーと入出力関係表と部品データ(部品データ群)34とを生成する。これは、上述した図3に示されるステップS1およびステップS2を経てなされる。その後、ユーザーは部品データ群34からモデル再構築に使用する部品を選択することで、図11に示されるような結線図のプラントモデル35が再構築される(図3に示されるステップS3)。   As shown in FIG. 11, the plant model creation system 10 generates a program configuration tree, an input / output relationship table, and part data (part data group) 34 from a source code 31. This is done through steps S1 and S2 shown in FIG. Thereafter, the user selects a part to be used for model reconstruction from the part data group 34, whereby the plant model 35 of the connection diagram as shown in FIG. 11 is reconstructed (step S3 shown in FIG. 3).

図13に示される部品群配置結線処理ステップは、部品データ34を配置し結線してプラントモデル35を作成する処理ステップであり、ユーザーによるプログラム構成ツリーと入出力関係表が確定した旨の情報を受け付けると、その処理が開始される。まず、ステップS31では、部品群配置結線処理部25が図11に示されるプログラム構成ツリーと入出力関係表と部品データ34の情報(図12に示される引数定義表を含む)に基づいてプログラム構成ツリーに基づき部品を配置する。プログラム構成ツリーには、部品名と対応する機器名が入っているため配置には十分な情報があり、これをすることができる。   The component group arrangement / connection processing step shown in FIG. 13 is a processing step in which component data 34 is arranged and connected to create a plant model 35, and information indicating that the program configuration tree and the input / output relationship table by the user have been determined. When accepted, the process is started. First, in step S31, the component group arrangement / connection processing unit 25 executes the program configuration based on the program configuration tree shown in FIG. 11, the input / output relationship table, and the information on the component data 34 (including the argument definition table shown in FIG. 12). Arrange parts based on the tree. Since the program configuration tree contains the device name corresponding to the part name, there is sufficient information for arrangement, and this can be done.

続いて、ステップS32では、入出力関係表(図8)に基づき結線する。入出力関係表には変数の入出力の対応関係が記述されており、引数定義表には変数とピンの位置が入っているため両者を参照することで、入出力関係表の出力側から入力側へ結線することで結線図を描くことができる。   Subsequently, in step S32, connection is made based on the input / output relationship table (FIG. 8). The input / output relationship table describes the input / output correspondence of variables, and the argument definition table contains the positions of variables and pins. By referring to both, input from the output side of the input / output relationship table A connection diagram can be drawn by connecting to the side.

図13において、処理フロー(ステップS31、ステップS32)の右側に示された図は、結線した結果を示す説明図である。出力端より入力端へ矢印を向けているため、流量を計算出力しているPump部品からの流量(接続端の1に相当)はPumpからTank、PumpからBOUND_Oの向きとなっている。   In FIG. 13, the diagram shown on the right side of the processing flow (step S31, step S32) is an explanatory diagram showing the result of connection. Since the arrow is directed from the output end to the input end, the flow rate (corresponding to 1 at the connection end) from the Pump component that is calculating and outputting the flow rate is in the direction from Pump to Tank, and from Pump to BOUND_O.

次に、プラントモデル作成システム10におけるプログラムの更新・生成について説明する。   Next, program update / generation in the plant model creation system 10 will be described.

図14はプログラムソースコード生成処理部26がプログラムの更新・生成の際に作成するメモリーテーブル50の一例を示す説明図であり、図15はプログラムソースコード生成処理部26が作成したプログラムのソース51の一例を示した説明図である。   FIG. 14 is an explanatory diagram showing an example of a memory table 50 created when the program source code generation processing unit 26 updates / generates a program. FIG. 15 shows a program source 51 created by the program source code generation processing unit 26. It is explanatory drawing which showed an example.

プラントモデル作成システム10において、プログラムの更新・生成は、プログラムソースコード生成処理部26が、プログラムソースコード生成処理ステップを実行することによってなされる。プログラムの更新・生成は、結線図を描く場合と同様にして行うことができる。具体的には以下の通りである。   In the plant model creation system 10, the program update / generation is performed by the program source code generation processing unit 26 executing the program source code generation processing step. Updating and generating the program can be performed in the same way as drawing a connection diagram. Specifically, it is as follows.

プログラムソースコード生成処理部26は、まず、プログラム構成ツリーの順にサブプログラムを呼ぶよう並べるステップを実行する。そして、その引数は入出力関係表を参照して、ひとつの部品の出力から入力への結線関係が在るものは同一変数を取っていくようにし、残った部品固有の変数については追加していくステップを実行する。このようにして変数を取っていくとプログラムの変数並びは図14に示されるメモリーテーブル50のようになり、サブプログラムの変数を呼ぶ関係も埋めることができる。   The program source code generation processing unit 26 first executes a step of arranging subprograms in the order of the program configuration tree. Then, refer to the input / output relation table for the argument, and take the same variable if there is a connection relation from the output of one part to the input, and add the remaining part-specific variables. Execute the steps to go. If the variables are taken in this way, the program variable list becomes like the memory table 50 shown in FIG. 14, and the relationship of calling the subprogram variables can be filled.

プログラムソースコード生成処理部26は、上記二つのステップ(プログラムソースコード生成処理ステップのサブステップ)を実行することによって、メモリーテーブル50が作成される。このメモリーテーブル50は、例えば、記憶手段15等の読み出し可能な記憶領域に格納される。この場合のプログラムのソースコード51は図15に示される。   The program source code generation processing unit 26 creates the memory table 50 by executing the above two steps (substeps of the program source code generation processing step). For example, the memory table 50 is stored in a readable storage area such as the storage unit 15. The source code 51 of the program in this case is shown in FIG.

次に、生成されたプログラムのソースコード51が適切であるかの評価(図3に示されるステップS4)について説明する。   Next, evaluation of whether the source code 51 of the generated program is appropriate (step S4 shown in FIG. 3) will be described.

図16は、計算評価部27が実行するシミュレーションコード評価ステップ(図3に示されるステップS4)の詳細な処理手順を説明する説明図である。   FIG. 16 is an explanatory diagram illustrating a detailed processing procedure of a simulation code evaluation step (step S4 shown in FIG. 3) executed by the calculation evaluation unit 27.

実際のシミュレーションにおいては、生成されたプログラムに対して初期値およびパラメータを設定し、また、動作させる変数を設定して計算し、出力される変数をプロットなどして評価するのが一般的である。   In an actual simulation, it is common to set initial values and parameters for the generated program, set variables to be operated and calculate, and evaluate the output variables by plotting etc. .

シミュレーションコード評価ステップは、図16に示されるように、計算評価部27が初期値およびパラメータを設定し(ステップS41)、時刻timeを初期化し(ステップS42)、時刻time>終了時刻tstopの条件を満たす場合(ステップS43でYESの場合)には、シミュレーションコード評価ステップを終了する。   In the simulation code evaluation step, as shown in FIG. 16, the calculation evaluation unit 27 sets initial values and parameters (step S41), initializes time time (step S42), and sets the condition of time time> end time tstop. If it is satisfied (YES in step S43), the simulation code evaluation step is terminated.

一方、時刻time>終了時刻tstopの条件を満たさない場合(ステップS43でNOの場合)、変更すべきパラメータは、時刻のある時点において変更するということになるため、時刻を更新するループの内側で変更することになる。すなわち、ステップS43でYESとなるまでステップS43からステップS47の処理ステップを繰り返す。具体的には、運転条件を変更し(ステップS44)、評価対象となるプログラムを呼び出して状態量を計算し(ステップS45)、時々刻々の計算結果を出力し(ステップS46)、時刻を更新(ステップS47)した後、ステップS43に進み、時刻time>終了時刻tstopの条件を満たすかを確認する。   On the other hand, when the condition of time time> end time tstop is not satisfied (in the case of NO in step S43), the parameter to be changed is changed at a certain time point. Will change. That is, the processing steps from step S43 to step S47 are repeated until YES is obtained in step S43. Specifically, the operating condition is changed (step S44), the program to be evaluated is called to calculate the state quantity (step S45), the calculation result is output every moment (step S46), and the time is updated (step S46). After step S47), the process proceeds to step S43 to check whether or not the condition of time time> end time tstop is satisfied.

次に、図3に示されるソースコードソフトウエア部品再構築処理手順を経て再構築されたプログラムモデルを部分的に削除したり追加したりして変更する場合の一例について説明する。   Next, an example of changing the program model reconstructed through the source code software component restructuring process procedure shown in FIG. 3 by partially deleting or adding will be described.

図17はプログラム構成ツリーの情報の一例であり、図7に示されるプログラム構成ツリーを部品追加等によって変更した後のプログラム構成ツリーを示した説明図であり、図18はプログラム構成ツリーの変更に伴い変更された後の入出力関係表を示した説明図である。   FIG. 17 is an example of program configuration tree information. FIG. 17 is an explanatory diagram showing the program configuration tree after the program configuration tree shown in FIG. 7 is changed by adding a part or the like. FIG. It is explanatory drawing which showed the input / output relationship table after having been changed.

例えば、図7に示されるような構成ツリーを持つプログラムモデルを、図17に示されるように部分的に削除したり追加したりして変更したい場合には、図7に示されるプログラム構成ツリーおよびこれに対応する入出力関係表(図8)にサブプログラム名、機器名、変数名、入出力関係などを追加していけば良い。   For example, when it is desired to change a program model having a configuration tree as shown in FIG. 7 by partially deleting or adding as shown in FIG. 17, the program configuration tree shown in FIG. Subprogram names, device names, variable names, input / output relationships, etc. may be added to the corresponding input / output relationship table (FIG. 8).

例えば、図17に示されるプログラム構成ツリーでは、図7に示されるプログラム構成ツリーに対して、Object_3(ポンプ)を削除して新たにポンプ(Object_5)、タンク(Object_7)およびポンプ(Object_6)を追加するものとする。尚、上記で追加したポンプ(Object_5)、タンク(Object_7)およびポンプ(Object_6)は既に部品データ34に格納されているポンプ部品およびタンク部品とする。   For example, in the program configuration tree shown in FIG. 17, Object_3 (pump) is deleted and new pump (Object_5), tank (Object_7), and pump (Object_6) are added to the program configuration tree shown in FIG. It shall be. The pump (Object_5), the tank (Object_7), and the pump (Object_6) added above are assumed to be pump parts and tank parts already stored in the part data 34.

図18に示される入出力関係表は、図17に示されるプログラム構成ツリーと対応するので、図17の部品の削除および追加に対応して、削除したObject_3(ポンプ)の入出力関係データ(入出力関係表)を削除し、追加したポンプ(Object_5)、タンク(Object_7)およびポンプ(Object_6)の入出力関係データ(入出力関係表)を追加する。入出力関係表は部品データ34の作成時には作成されているため、格納されているデータを参照してデータの削除や追加をすることができる。この結果、プログラム構成ツリーと当該プログラム構成ツリーに対応する入出力関係表が確定するので、その後の部品の配置および結線については、上述の説明の通りである。   Since the input / output relationship table shown in FIG. 18 corresponds to the program configuration tree shown in FIG. 17, the input / output relationship data (input) of the deleted Object_3 (pump) corresponding to the deletion and addition of the parts in FIG. The output relationship table) is deleted, and input / output relationship data (input / output relationship table) of the added pump (Object_5), tank (Object_7), and pump (Object_6) is added. Since the input / output relationship table is created when the component data 34 is created, the stored data can be deleted or added with reference to the stored data. As a result, since the program configuration tree and the input / output relationship table corresponding to the program configuration tree are determined, the subsequent arrangement and connection of parts are as described above.

図19は、変更後のプログラム構成ツリーに対応した部品、すなわち、入口境界(Object_1)、出口境界(Object_2)、ポンプ(Object_5とObject_6)およびタンク(Object_4とObject_7)を配置し結線して作成された結線図を示す説明図である。   FIG. 19 is created by arranging and connecting parts corresponding to the changed program structure tree, that is, an inlet boundary (Object_1), an outlet boundary (Object_2), a pump (Object_5 and Object_6), and a tank (Object_4 and Object_7). It is explanatory drawing which shows the connection diagram.

部品群配置結線処理部25が、図17に示されるプログラム構成ツリーと図18に示される入出力関係表を参照して図13に示される部品群配置結線処理ステップ(ステップS31およびステップS32)を実行すると、図19に示される結線図を作成する。プログラム構成ツリー、入出力関係表および部品データ34への部品の追加は、例えば、ワークシートなどで追加していけば良い。   The component group arrangement / connection processing unit 25 performs the component group arrangement / connection processing step (steps S31 and S32) shown in FIG. 13 with reference to the program configuration tree shown in FIG. 17 and the input / output relationship table shown in FIG. When executed, the connection diagram shown in FIG. 19 is created. For example, parts may be added to the program configuration tree, the input / output relation table, and the part data 34 using a worksheet or the like.

次に、部品を追加した場合(図17および図18に示される例)におけるプログラムの更新について説明する。   Next, update of a program when a part is added (example shown in FIGS. 17 and 18) will be described.

図20は、プログラムの更新・生成の際に作成されるメモリーテーブルの一例であり、プログラムソースコード生成処理部26がプログラムソースコードを更新した後のメモリーテーブル50を示す説明図である。   FIG. 20 is an example of a memory table created when updating / generating a program, and is an explanatory diagram showing the memory table 50 after the program source code generation processing unit 26 has updated the program source code.

図17および図18に示される例のように、ポンプ等の部品を追加した場合、プログラム(ここではプラントのプログラム)のソースコード51を更新する必要がある。ソースコード51の更新は、ソースコード51を生成する場合と同様にプログラムソースコード生成処理部26が行う。   When parts such as a pump are added as in the examples shown in FIGS. 17 and 18, it is necessary to update the source code 51 of the program (here, the plant program). The source code 51 is updated by the program source code generation processing unit 26 as in the case where the source code 51 is generated.

まず、変更後のプログラム構成ツリー(図17)の順にサブプログラム29を呼ぶように並べていく。その引数は入出力関係表(図18)を参照して、一つの部品の出力から入力への結線関係が在るものは同一変数を取っていくようにする。そして、残った部品固有の変数については追加する。このようにして変数を取っていくと、プログラムの変数並びは図20に示されるようになり、サブプログラム29の変数を呼ぶ関係も埋めることができる。   First, the subprograms 29 are arranged so as to be called in the order of the changed program structure tree (FIG. 17). As for the argument, referring to the input / output relationship table (FIG. 18), those having a connection relationship from the output to the input of one component are assumed to take the same variable. The remaining part-specific variables are added. If the variables are taken in this way, the program variable list is as shown in FIG. 20, and the relationship of calling the variables of the subprogram 29 can be filled.

次に、図20に示されるメモリーテーブル50に更新する際の処理内容(メモリーテーブル更新処理ステップ)について説明する。   Next, processing contents (memory table update processing step) when updating to the memory table 50 shown in FIG. 20 will be described.

図21は、プログラムソースコード生成処理部26が実行するプログラムソースコード生成処理ステップのサブステップであるメモリーテーブル更新処理ステップの処理フローを示した説明図である。   FIG. 21 is an explanatory diagram showing a processing flow of a memory table update processing step which is a sub-step of the program source code generation processing step executed by the program source code generation processing unit 26.

部品の追加や削除等の変更があった場合、変更の無い部分のメモリー配置は変わらない方が、これまでのデータセットが使えるので有効である。メモリーテーブル更新処理ステップは、この既存の部分を変更しないように配慮した処理内容になっている。具体的には、まず、プログラムソースコード生成処理部26がメモリー再利用指令の入力を認識すると(ステップS51)、図20に示されるメモリーテーブル50のメモリー利用状態フラグを参照し、ここが0,1,2の何れであるかを判断する(ステップS52)。ここで、0は記憶領域が未使用である、1は記憶領域が使用中である、2は部品削除に伴い情報が削除されて現在は記憶領域が未使用である、ことを意味する。   When there is a change such as addition or deletion of parts, it is more effective that the data set up to now can be used if the memory arrangement of the part without change is not changed. The memory table update processing step has a processing content in consideration of not changing the existing part. Specifically, first, when the program source code generation processing unit 26 recognizes the input of the memory reuse command (step S51), the memory use state flag of the memory table 50 shown in FIG. It is determined whether it is 1 or 2 (step S52). Here, 0 means that the storage area is unused, 1 means that the storage area is in use, and 2 means that information has been deleted due to component deletion and the storage area is currently unused.

メモリーテーブル50のメモリー利用状態フラグに0が存在しない(1又は2のみが存在する)場合(ステップS52でNOの場合)には、プログラムソースコード生成処理部26がフラグの2の記憶領域を探し、当該記憶領域のフラグを2から0に書き換えて(ステップS53)、使用できる記憶領域を確保する。一方、メモリーテーブル50のメモリー利用状態フラグに0が存在する場合(ステップS52でYESの場合)には、何も行わない。   If the memory usage status flag of the memory table 50 does not have 0 (only 1 or 2 exists) (NO in step S52), the program source code generation processing unit 26 searches for the storage area of the flag 2 Then, the storage area flag is rewritten from 2 to 0 (step S53) to secure a usable storage area. On the other hand, if 0 is present in the memory use state flag of the memory table 50 (YES in step S52), nothing is performed.

このような処理ステップを実行することによって、削除した領域を再度使うこともでき、部品の追加や削除等の変更があった場合でも変更の無い部分のメモリー配置(メモリー利用状態フラグを1の記憶領域)を変えることなく、これまでのデータセットが使えて有効である。   By executing such processing steps, the deleted area can be reused, and even if there is a change such as addition or deletion of parts, the memory allocation of the part without change (memory usage status flag is stored as 1) The existing data set can be used and is effective without changing the area.

尚、図1〜図21を引用して説明した上述の例では、プラントプログラムに対してサブプログラムが一層である場合を示していたが、これは一層に限らず階層化されていても良い。そこで、プラントプログラムに対してサブプログラムが階層化されている場合について図22から図25を引用して説明する。   In the above-described example described with reference to FIGS. 1 to 21, the case where there is one subprogram with respect to the plant program is shown, but this is not limited to one, and the subprogram may be hierarchized. Then, the case where the subprogram is hierarchized with respect to the plant program will be described with reference to FIGS.

図22は、プラントプログラムに対してタンクプログラム(サブプログラム)が階層化されている場合の一例であり、タンクプログラムのソースを示した説明図である。また、図23は、図22に示されるタンクプログラムから得られる情報を説明する図であり、図23(a)は引数定義表の例を示した説明図(図6に対応)、図23(b)はプログラム構成ツリー情報を示した説明図(図7に対応)、および、図23(c)は入出力関係表の一例を示した説明図(図8に対応)である。さらに、図24は、図22に示されるタンクプログラムに対して引数化処理ステップ後のソースを示した説明図である。   FIG. 22 is an example of a case where tank programs (subprograms) are hierarchized with respect to the plant program, and is an explanatory diagram showing the source of the tank program. FIG. 23 is a diagram for explaining information obtained from the tank program shown in FIG. 22. FIG. 23 (a) is an explanatory diagram showing an example of an argument definition table (corresponding to FIG. 6), FIG. b) is an explanatory diagram showing program configuration tree information (corresponding to FIG. 7), and FIG. 23 (c) is an explanatory diagram showing an example of an input / output relationship table (corresponding to FIG. 8). Further, FIG. 24 is an explanatory diagram showing the source after the argumentization processing step for the tank program shown in FIG.

例えば、図22に示されるように、タンクプログラムTankがマスバランスを表すサブプログラムMASSとHEATから構成されている場合、この3つのプログラムに対しても、上述したように、接続関係情報32に含まれる入出力関係情報(図23(a))、プログラム構成ツリー(図23(b))、および、入出力関係表(図23(c))を作成することができる。また、プログラム構成ツリーおよび入出力関係表の情報があれば、引数化処理部23が引数化処理ステップを実行して、図24に示されるようなソースを得ることができる。   For example, as shown in FIG. 22, when the tank program Tank is composed of subprograms MASS and HEAT representing mass balance, these three programs are also included in the connection relation information 32 as described above. Input / output relationship information (FIG. 23A), program configuration tree (FIG. 23B), and input / output relationship table (FIG. 23C) can be created. If there is information on the program configuration tree and the input / output relationship table, the argumentization processing unit 23 can execute the argumentization processing step to obtain a source as shown in FIG.

図25は、図22に示されるタンクプログラム(サブプログラム)を有するプラントプログラムに対してプラントモデル作成システム10の部品化処理部24が作成した部品データ34の一例およびプログラム再構成の概略例を示す説明図である。   FIG. 25 shows an example of part data 34 created by the parting processing unit 24 of the plant model creation system 10 for the plant program having the tank program (subprogram) shown in FIG. 22 and a schematic example of program reconstruction. It is explanatory drawing.

図22に示される引数化処理前のソースから図24に示される引数化処理後のソースを得た後は、それぞれ、部品名、機器名、アイコンを対応させることで図25に示されるように結線図を生成することができる。また、同様にこれら部品のソースから新たにtank部品のソースの再構成および部品を削除等して変更した場合のタンク部品のソースを生成することができる。   After obtaining the source after the argumentization processing shown in FIG. 24 from the source before the argumentization processing shown in FIG. 22, as shown in FIG. 25 by associating the part name, device name, and icon respectively. A connection diagram can be generated. Similarly, it is possible to generate a tank component source when a new tank component source is reconfigured from these component sources and the components are changed by deleting or the like.

以上、プラントモデル作成システム10、プラントモデル作成方法としてのソースコードソフトウエア部品再構築処理手順、およびコンピュータをプラントモデル作成システムとして機能させる若しくはコンピュータにソースコードソフトウエア部品再構築処理手順を実行させるソフトウエア部品再構築処理PG11によれば、プラントモデルを再構築する際に、従来のソフトウエアのソースコードよりもわかりやすく保守しやすいソフトウエアとして正確かつ効率的に行うことができる。   As described above, the plant model creation system 10, the source code software component reconstruction processing procedure as the plant model creation method, and the software that causes the computer to function as the plant model creation system or that causes the computer to execute the source code software component reconstruction processing procedure According to the software component restructuring process PG11, when reconstructing a plant model, it can be accurately and efficiently performed as software that is easier to understand and maintain than the source code of conventional software.

すなわち、既存のプログラム(ソースコード31)に対して、グローバル変数でのサブプログラム間の参照をローカル変数での参照に置き換えたサブプログラム29、サブプログラム29をモデルオブジェクトとして認識し呼び出し関係を定義したプログラム構成ツリーおよび変数の入出力関係表を生成し、アイコン40と対応させた部品を集めた部品データ(データベース)34から必要な部品データ34を読み出して配置し、結線することで、モデルプログラムの結線図を生成して当該結線図に対応するモデルプログラムを再生成することができる。   That is, for the existing program (source code 31), the subprogram 29, in which the reference between the subprograms in the global variable is replaced with the reference in the local variable, recognizes the subprogram 29 as a model object and defines the calling relationship A program configuration tree and a variable input / output relation table are generated, and necessary part data 34 is read out from the part data (database) 34 in which parts corresponding to the icons 40 are collected, arranged, and connected, so that the model program It is possible to generate a connection diagram and regenerate a model program corresponding to the connection diagram.

また、プログラム構成ツリーと入出力関係表を含む接続関係情報32をユーザーが入力手段12を介して容易に編集することができ、編集後は編集後のサブプログラム29、接続関係情報32および必要な部品データ34を読み出して配置し、結線することができるので、モデルプログラムの改修も容易に行うことができる。   Further, the user can easily edit the connection relation information 32 including the program configuration tree and the input / output relation table via the input means 12, and after editing, the edited subprogram 29, the connection relation information 32, and the necessary information are displayed. Since the component data 34 can be read out, arranged, and connected, the model program can be easily modified.

尚、本発明は上記の各実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化しても良い。また、プラントモデルの作成を例にしているが、これに限定されず、他のシミュレーションモデルのプログラムについて適用できる。   Note that the present invention is not limited to the above-described embodiments as they are, and may be embodied by modifying constituent elements without departing from the scope of the invention in the implementation stage. Moreover, although the creation of a plant model is taken as an example, the present invention is not limited to this, and can be applied to programs of other simulation models.

10 プラントモデル作成システム
11 ソフトウエア部品再構築処理PG
12 入力手段
13 表示手段
14 ソフトウエア部品再構築処理手段
15 記憶手段
21 入出力抽出処理部
22 接続関係情報抽出処理部
23 引数化処理部
24 部品化処理部
25 部品群配置結線処理部
26 プログラムソースコード生成処理部
27 計算評価部
29 サブプログラム
31 ソースコード
32 接続関係情報
33 サブプログラム群
34 部品データ
35 プラントモデル
36 運転手順情報
37 計算評価結果情報
40(40a,40b,40c,40d) アイコン
45 部品名欄
46 アイコン欄
47 サブプログラム欄
48 引数定義欄
50 メモリーテーブル
51 プログラムのソースコード
10 Plant model creation system 11 Software parts reconstruction process PG
DESCRIPTION OF SYMBOLS 12 Input means 13 Display means 14 Software component reconstruction process means 15 Storage means 21 Input / output extraction process part 22 Connection relation information extraction process part 23 Argumentization process part 24 Componentization process part 25 Parts group arrangement connection process part 26 Program source Code generation processing unit 27 Calculation evaluation unit 29 Subprogram 31 Source code 32 Connection relationship information 33 Subprogram group 34 Component data 35 Plant model 36 Operation procedure information 37 Calculation evaluation result information 40 (40a, 40b, 40c, 40d) Icon 45 Component Name field 46 Icon field 47 Subprogram field 48 Argument definition field 50 Memory table 51 Program source code

Claims (7)

既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段を具備し、前記ソフトウエア部品再構築処理手段は、
前記既存のソフトウエアのソースコードから、入力変数、出力変数、および、入力と出力の両方が存在する変数のうち、何れの変数であるかを判定する入出力抽出処理部と、
前記既存のソフトウエアに対して、グローバル変数でのサブプログラム間の参照をローカル変数での参照に置き換えたサブプログラムを生成する引数化処理部と、
前記入出力抽出処理部の変数判定結果および引数化処理部の生成したサブプログラムを用いて、前記サブプログラムをモデルオブジェクトとして認識し呼び出し関係を定義したプログラム構成ツリー情報および前記変数の入出力関係情報を生成する接続関係情報抽出処理部と、
前記プログラム構成ツリー情報および入出力関係情報に基づいて、予め生成しておいた部品データから所定の部品を呼び出して部品を配置し、配置した部品同士を結線する部品群配置結線処理部と、
前記部品群の配置および結線の状態と入出力関係情報に基づいてプログラムのソースコードを生成するプログラムソースコード生成処理部と、
前記プログラムソースコード生成処理部が生成したプログラムを計算し評価する計算評価部とを備えることを特徴とするプラントモデル作成システム。
Software component reconstruction processing means for reconstructing software parts from existing software, the software component reconstruction processing means,
From the existing software source code, an input variable, an output variable, and an input / output extraction processing unit that determines which one of the variables in which both input and output are present, and
For the existing software, an argumentization processing unit that generates a subprogram in which references between subprograms in global variables are replaced with references in local variables;
Program configuration tree information that recognizes the subprogram as a model object and defines a calling relationship using the variable determination result of the input / output extraction processing unit and the subprogram generated by the argumentization processing unit, and the input / output relationship information of the variable A connection relation information extraction processing unit for generating
Based on the program configuration tree information and the input / output relation information, a part group arrangement connection processing unit that calls a predetermined part from part data generated in advance and places the part, and connects the arranged parts,
A program source code generation processing unit for generating a source code of a program based on the arrangement and connection state of the component group and input / output relation information;
A plant model creation system comprising: a calculation evaluation unit that calculates and evaluates a program generated by the program source code generation processing unit.
予めユーザーが定義したアイコンと、前記引数化処理部が引数化したサブプログラムに登場する部品名とを対応付けてソフトウエア部品を生成する部品化処理部をさらに備えることを特徴とする請求項1に記載のプラントモデル作成システム。 2. A componentization processing unit that generates a software component by associating an icon defined in advance by a user with a component name that appears in a subprogram that is argumentized by the argumentization processing unit. The plant model creation system described in 1. 前記接続関係情報抽出処理部は、プログラム構成ツリー情報および入出力関係情報を編集可能に構成されたことを特徴とする請求項1又は2に記載のプラントモデル作成システム。 3. The plant model creation system according to claim 1, wherein the connection relationship information extraction processing unit is configured to be able to edit program configuration tree information and input / output relationship information. 前記部品化処理部は、前記ソフトウエア部品を削除可能に構成されたことを特徴とする請求項1乃至3記載の何れか1項に記載のプラントモデル作成システム。 The plant model creation system according to any one of claims 1 to 3, wherein the componentization processing unit is configured to be able to delete the software component. 請求項1または2記載のプラントモデル作成システムにおいて、
前記モデルプログラム再生成する際に、追加・削除されない変数のアドレスは保持されることを特徴とするプラントモデル作成システム。
In the plant model creation system according to claim 1 or 2,
A plant model creation system characterized in that the address of a variable that is not added or deleted is retained when the model program is regenerated.
請求項1乃至3記載プラントモデル作成システムにおいて、
前記アイコンと対応させた部品は階層構造をもつことを特徴とするプラントモデル作成システム。
In the plant model creation system according to claims 1 to 3,
A plant model creation system characterized in that the parts associated with the icon have a hierarchical structure.
既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段を具備するプラントモデル作成システムにおけるプラントモデル作成方法であり、前記ソフトウエア部品再構築処理手段が、
既存のソフトウエアのソースコードから当該ソースコードの中の変数が入力変数、出力変数または入出力変数の何れであるかを判定するステップと、
前記判定ステップでの判定結果を使って前記ソースコードを持つプログラムのプログラム構成ツリーと、当該プログラムのサブプログラム間でやりとりされる変数の入出力関係を規定した入出力関係情報とを抽出するステップと、
前記サブプログラム間におけるグローバル変数での参照をローカル変数での参照に置き換えたサブプログラムを生成するステップと、
前記プログラム構成ツリー、入出力関係情報、サブプログラムおよび予め生成しておいたソフトウエア部品を格納したデータベースを参照して前記ソフトウエア部品を配置し結線するステップと、
前記ソフトウエア部品を結線したプラントモデルのプログラムのソースコードを生成するステップと、
前記プラントモデルと当該プラントモデルの運転手順を示す情報とに基づいてシミュレーションコードを生成し、生成したシミュレーションコードを評価するステップとを備えた処理手順を実行することを特徴とするプラントモデル作成方法。
A plant model creation method in a plant model creation system comprising a software part reconstruction processing means for reconstructing a software part from existing software, wherein the software part reconstruction processing means comprises:
Determining whether a variable in the source code is an input variable, an output variable or an input / output variable from the existing software source code;
Extracting the program configuration tree of the program having the source code using the determination result in the determination step and the input / output relationship information defining the input / output relationship of variables exchanged between subprograms of the program; ,
Generating a subprogram in which a reference in a global variable between the subprograms is replaced with a reference in a local variable;
Placing and connecting the software components with reference to the program configuration tree, input / output relationship information, subprograms and a database storing previously generated software components;
Generating a source code of a plant model program in which the software components are connected;
A plant model creation method, comprising: generating a simulation code based on the plant model and information indicating an operation procedure of the plant model, and executing a processing procedure including a step of evaluating the generated simulation code.
JP2009177585A 2009-07-30 2009-07-30 Plant model creation system and plant model creation method Active JP5254149B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009177585A JP5254149B2 (en) 2009-07-30 2009-07-30 Plant model creation system and plant model creation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009177585A JP5254149B2 (en) 2009-07-30 2009-07-30 Plant model creation system and plant model creation method

Publications (2)

Publication Number Publication Date
JP2011034179A true JP2011034179A (en) 2011-02-17
JP5254149B2 JP5254149B2 (en) 2013-08-07

Family

ID=43763215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009177585A Active JP5254149B2 (en) 2009-07-30 2009-07-30 Plant model creation system and plant model creation method

Country Status (1)

Country Link
JP (1) JP5254149B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015087838A (en) * 2013-10-29 2015-05-07 株式会社東芝 Information processing apparatus, information processing method, and program

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04297927A (en) * 1991-03-26 1992-10-21 Yokogawa Electric Corp System for making software into component and utilizing the same
JPH07168711A (en) * 1993-12-16 1995-07-04 Fuji Facom Corp Program managing method
JPH1063492A (en) * 1996-08-23 1998-03-06 Kawasaki Steel Corp Software specification generator
JPH10254687A (en) * 1997-03-11 1998-09-25 Canon Inc Program analysis device and analysis method therefor
JPH11259282A (en) * 1998-03-12 1999-09-24 Toshiba Corp Device for synthesizing program and method therefor
JP2001043078A (en) * 1999-07-28 2001-02-16 Mitsubishi Electric Corp Program improvement supporting device
JP2002342079A (en) * 2001-05-22 2002-11-29 Yamatake Sangyo Systems Co Ltd Control program preparation device
JP2003223321A (en) * 2002-01-31 2003-08-08 Toshiba Corp Software component preparing method and program and software component preparing device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04297927A (en) * 1991-03-26 1992-10-21 Yokogawa Electric Corp System for making software into component and utilizing the same
JPH07168711A (en) * 1993-12-16 1995-07-04 Fuji Facom Corp Program managing method
JPH1063492A (en) * 1996-08-23 1998-03-06 Kawasaki Steel Corp Software specification generator
JPH10254687A (en) * 1997-03-11 1998-09-25 Canon Inc Program analysis device and analysis method therefor
JPH11259282A (en) * 1998-03-12 1999-09-24 Toshiba Corp Device for synthesizing program and method therefor
JP2001043078A (en) * 1999-07-28 2001-02-16 Mitsubishi Electric Corp Program improvement supporting device
JP2002342079A (en) * 2001-05-22 2002-11-29 Yamatake Sangyo Systems Co Ltd Control program preparation device
JP2003223321A (en) * 2002-01-31 2003-08-08 Toshiba Corp Software component preparing method and program and software component preparing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015087838A (en) * 2013-10-29 2015-05-07 株式会社東芝 Information processing apparatus, information processing method, and program

Also Published As

Publication number Publication date
JP5254149B2 (en) 2013-08-07

Similar Documents

Publication Publication Date Title
Hästbacka et al. Model-driven development of industrial process control applications
US8150673B1 (en) Partitioning a model in modeling environments
US7503027B1 (en) Hardware description language code generation from a state diagram
JP4482563B2 (en) Simplified data signal support for diagramming environment languages
CN106648662B (en) Report generation device and method based on project cost calculation description language BCL
JP5005510B2 (en) Software design support method, design support apparatus, and design support program
CN110262794A (en) A kind of AADL behaviour expanding method and tool based on specification with description language
JP2009181446A (en) Program generating device and block diagram generating apparatus
JP2005242569A (en) Data processor design method and apparatus, and program
Ermel et al. Animated simulation of integrated UML behavioral models based on graph transformation
Zhu et al. Engine-cooperative game modeling (ecgm) bridge model-driven game development and game engine tool-chains
Edwards et al. Automated analysis and code generation for domain-specific models
JP5254149B2 (en) Plant model creation system and plant model creation method
Śmiałek et al. From use cases and their relationships to code
CN116932393A (en) Model checking method based on rule engine and low-code rule modeling
CN112100984A (en) Data conversion method and system from EBOM to SBOM
CN116909553A (en) Page online development and local compiling operation system
Folli et al. Refactoring of UML models using AGG
Wen et al. “Integrare”, a collaborative environment for behavior-oriented design
JP4564255B2 (en) Simulation device
Serna et al. Dash: A new language for declarative behavioural requirements with control state hierarchy
Lugato et al. Model-Driven Engineering for High Performance Computing Applications
CN107918958B (en) Visualization and customizable three-dimensional rendering system and method
CN106094561B (en) Marine Synthesize Electric Propulsion System modeling and simulating method and device
Li et al. A metamodeling level transformation from UML sequence diagrams to Coq.

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110811

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20111218

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121204

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121205

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130201

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130307

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130326

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130417

R151 Written notification of patent or utility model registration

Ref document number: 5254149

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20160426

Year of fee payment: 3