JP5254149B2 - Plant model creation system and plant model creation method - Google Patents
Plant model creation system and plant model creation method Download PDFInfo
- Publication number
- JP5254149B2 JP5254149B2 JP2009177585A JP2009177585A JP5254149B2 JP 5254149 B2 JP5254149 B2 JP 5254149B2 JP 2009177585 A JP2009177585 A JP 2009177585A JP 2009177585 A JP2009177585 A JP 2009177585A JP 5254149 B2 JP5254149 B2 JP 5254149B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- input
- processing unit
- output
- variable
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 67
- 238000012545 processing Methods 0.000 claims description 155
- 238000000605 extraction Methods 0.000 claims description 37
- 238000011156 evaluation Methods 0.000 claims description 17
- 238000004364 calculation method Methods 0.000 claims description 12
- 230000000717 retained effect Effects 0.000 claims description 3
- 238000010586 diagram Methods 0.000 description 38
- 230000006870 function Effects 0.000 description 21
- 238000003860 storage Methods 0.000 description 15
- 238000004088 simulation Methods 0.000 description 14
- 238000004519 manufacturing process Methods 0.000 description 9
- 238000012549 training Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 5
- 238000012217 deletion Methods 0.000 description 4
- 230000037430 deletion Effects 0.000 description 4
- 238000005520 cutting process Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 238000011017 operating method Methods 0.000 description 2
- 230000002159 abnormal effect Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- Testing And Monitoring For Control Systems (AREA)
- Stored Programmes (AREA)
- Feedback Control In General (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
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
しかしながら、上述した特許文献に記載されるプラントモデル作成システムに代表される従来のプラントモデル作成システムでは、開発・製作・保守に要する労力の軽減化が必ずしも十分なものではなかった。例えば、上述した特許文献に記載されるプラントモデル作成システムでは、既存のソフトウエアを再利用するため、個別に新しく部品化して再製作する方法が採用されているが、個別の部品化は当該プラントモデル作成システムを使って行ってはいるものの、ユーザーの手作業による入力の負担が多く手間がかかる点は否めないものであった。 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 place the component Te, wherein the placed between parts based on the connection to the component group arranged connection processing unit for creating a model program, placement and connection states between input-output relationship information of the parts that constitute the model program And a program source code generation processing unit that generates a source code of the model program, and when the model program is created, an address of a variable that is not added or deleted is retained .
本発明に係るプラントモデル作成方法は、上述した課題を解決するため、既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段を具備するプラントモデル作成システムにおけるプラントモデル作成方法であり、前記ソフトウエア部品再構築処理手段が、既存のソフトウエアのソースコードから当該ソースコードの中の変数が入力変数、出力変数または入出力変数の何れであるかを判定するステップと、前記判定ステップでの判定結果を使って前記ソースコードを持つプログラムのプログラム構成ツリーと、当該プログラムのサブプログラム間でやりとりされる変数の入出力関係を規定した入出力関係情報とを抽出するステップと、前記サブプログラム間におけるグローバル変数での参照をローカル変数での参照に置き換えたサブプログラムを生成するステップと、前記プログラム構成ツリー、入出力関係情報、サブプログラムおよび予め生成しておいたソフトウエア部品を格納したデータベースを参照して前記ソフトウエア部品を配置し結線するステップと、前記ソフトウエア部品を結線したモデルプログラムのソースコードを生成するステップとを備え、前記モデルプログラムを作成する際に、追加・削除されない変数のアドレスは保持される処理手順を実行することを特徴とするプラントモデル作成方法。 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 And a step of generating a source code of a model program in which the software components are connected, and executing a processing procedure in which addresses of variables that are not added / deleted are retained when the model program is created A plant model creation method characterized by
本発明によれば、プラントモデルを再構築する際に、従来のソフトウエアのソースコードよりもわかりやすく保守しやすいソフトウエアとして正確かつ効率的に行うことができる。 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.
以下、本発明の実施形態に係るプラントモデル作成システムの実施形態について、図面を参照して説明する。 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
プラントモデル作成システム10は、ハードウエア資源であるコンピュータとソフトウエア資源であるソフトウエア部品再構築処理プログラム(以下、ソフトウエア部品再構築処理PGと称する。)11とが協働することによって実現されるシステムであり、サブプログラム間の変数の取り合いをローカル変数(FORTRAN言語では引数)で取り合うようにして処理を実行するシステムである。
The plant
図1に示されるプラントモデル作成システム10は、操作の入力を受け付ける入力手段12と、処理実行結果等の視覚的な情報をユーザーに提示する表示手段13と、既存のソフトウエアからソフトウエア部品を再構築するソフトウエア部品再構築処理手段14と、プログラム、ファイル、データベース等の電子的な情報を記憶して格納可能な記憶領域を有する記憶手段15と、を具備する。
A plant
ソフトウエア部品再構築処理手段14は、入出力抽出処理部21と、接続関係情報抽出処理部22と、引数化処理部23と、部品化処理部24と、部品群配置結線処理部25と、プログラムソースコード生成処理部26と、計算評価部27とを備える。
The software component reconstruction processing means 14 includes an input / output
入出力抽出処理部21は、既存のソフトウエアのソースコードから何れの種類の変数であるか、すなわち、入力変数、出力変数または入力と出力の両方が存在する変数(以下、入出力変数と称する。)の何れであるかを判定する機能を有し、当該機能に基づいて入力変数、出力変数または入出力変数の何れであるかを判定する。
The input / output
接続関係情報抽出処理部22は、接続関係情報を抽出する機能を有し、当該機能に基づいて接続関係情報を抽出する。ここで、接続関係情報とは、後述する図7に一例として示されるプログラム構成ツリーの情報と、後述する図8(図6)に一例として示される入出力関係の情報とを含む。
The connection relation information
また、接続関係情報抽出処理部22は、接続関係情報の抽出のみならず、一度抽出され作成されたプログラム構成ツリーの情報および入出力関係の情報を編集(追加や削除等)する機能を有し、当該機能によって、プログラム構成ツリーや入出力関係表の編集を行うことができる。
The connection relationship information
引数化処理部23は、ソースコードにおけるコモンラベルの変数をいわゆる引数に追加していく機能を有する。引数化処理部23は、当該機能を用いて、プログラムを引数化する。具体的には後述する図4に示される処理を行い、既存のソースを後述する図9に示されるソースとする処理を実行する。これによって、再構築後のプログラムにおいて、サブプログラム間の変数の取り合いをローカル変数(FORTRAN言語では引数)で取り合うようにすることができる。
The
部品化処理部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
部品化処理部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 /
プログラムソースコード生成処理部26は、部品群の配置および結線の状態と入出力関係情報に基づいてプログラムのソースコードを生成する機能を有し、当該機能に基づいてプログラムのソースコードを生成する。
The program source code
計算評価部27は、プログラムについて計算し評価する機能を有し、当該機能に基づいて、プログラムソースコード生成処理部26が生成したソースコードに係るプログラムを評価する。
The
尚、プラントモデル作成システム10の入力手段12、表示手段13、ソフトウエア部品再構築処理手段14および記憶手段15は、必ずしも同一のコンピュータ内に存在することを要しない。ソフトウエア部品再構築処理手段14と入力手段12、表示手段13および記憶手段15がアクセス可能に構成されていれば良く、これらの手段が幾つかのコンピュータに分散して配置されていても構わない。
Note that the
次に、図1に示されるプラントモデル作成システム10を適用して、既存のシミュレーションソフトを再利用し、保守しやすいモデルプログラムを再構成する処理内容について説明する。
Next, processing contents for applying the plant
図2は、既存のプログラムのソースの一例を示した説明図である。ここで、符号29はサブプログラムである。
FIG. 2 is an explanatory diagram showing an example of the source of an existing program. Here,
図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
図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
続いてステップ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
続いてステップ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
続いて、ステップ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
図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
引数化処理部23は、まず、ソーステキストを読み込み(ステップS11)、ブランク、コメントなどを削除、継続行をつなげ、ソーステキストとして有効な部分を抽出する(ステップS12)。そして、使用したプログラミング言語の言語規則に沿って変数を切り出す(ステップS13)。これは、演算記号、括弧などからソース上の変数を切り出し、予約語などを排除することで可能となる。尚、演算記号、括弧などからソース上の変数を切り出し、予約語などを排除する機能は、一般にFORTRAN,C言語などのコンパイラーにも備えられているので、これを利用して実行することもできる。続いて、引数化処理部23は、グローバル変数として使われていたものについては、サブルーチンの引数へ上げ、引数を追加する(ステップS14)。以上のステップS11〜ステップS14が引数化処理部23の行う引数化処理ステップである。
The
図5は、入出力抽出処理部21が実行する入出力抽出処理ステップの処理フローを示した説明図である。
FIG. 5 is an explanatory diagram showing a processing flow of input / output extraction processing steps executed by the input / output
入出力抽出処理部21は、まず、ソースコード31を読み出してソースの入力を行い(ステップS15)、変数の切り出しを行う(ステップS16)。そして、切り出した変数がはじめに現れない場合、関数・サブプログラムの出力変数である場合または等式の右辺に来ない場合(ステップS17でNOの場合)には、当該変数は出力変数であると判定する(ステップS18)。
First, the input / output
一方、入出力抽出処理部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
ここで、図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
入出力抽出処理部21は、図6に示されるように、例えば、質量M1については流量の差分(W1−W2)*DTが積算されるため、最初に右辺に来ているということで、入力変数と判断するが、更新されるため出力とも判断する。
As shown in FIG. 6, for example, the input / output
ここで、図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
一方、接続関係情報抽出処理部22は、プログラムのソースよりそのプログラムが呼んでいるサブプログラムを、例えばCALL文の次に来る単語ということで抽出することができる。
On the other hand, the connection relationship information
図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
接続関係情報抽出処理部22は、図7に示されるように、実行順序とコールしているサブプログラムを示しているプログラム構成ツリーを生成することができる。このとき、同一名のサブプログラム名でも計算しようとしている対象が異なることがある点に鑑み、出現順にその対象の番号(オブジェクト番号)を付加するようにする。例えば、図7に示される例では、Object_0からObject_4まで番号をつけている。
As shown in FIG. 7, the connection relation information
次に、図8を引用してサブプログラム間における入出力関係の抽出の処理内容について説明する。 Next, the processing contents of the input / output relationship extraction 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
例えば、図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
図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
次に、図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 an icon 40 that is required when the
図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
部品データ34の作成は、部品化処理部24がソースプログラムから解析して抽出されたプログラム構成ツリーと入出力関係表を含む接続関係情報32と、図6に示されるサブプログラム29のソースと引数定義表の情報とを参照して、部品名(又は機器名)およびアイコン40の情報を対応付けすることでなされる。プログラム構成ツリー、入出力関係表、サブプログラム29のソース、引数定義表の情報およびアイコン40の情報が対応付けられることで、ソースリストに対応させることができる。
The
次に、図9に示される引数化されたサブプログラム29を用いて結線図を構成することについて説明する。
Next, the construction of a connection diagram using the
図11は部品化処理部24が作成した部品データ34の一例およびプログラム再構成の概略例を示す説明図であり、図12は部品データ34に対応する部品の引数定義表であり、図12(a)は部品名「入口境界」の引数定義表、(b)は部品名「出口境界」の引数定義表、(c)は部品名「ポンプ」の引数定義表、(d)は部品名「タンク」の引数定義表を説明する説明図、図13は、部品群配置結線処理部が実行する部品群配置結線処理ステップの処理手順を示した説明図である。
FIG. 11 is an explanatory diagram showing an example of
尚、図11において示される部品名欄45に表示される部品名とアイコン欄46に表示されるアイコン40a,40b,40c,40dはユーザーが定義したものである。また、サブプログラム欄47には、図9に示されるサブプログラム29のうち対応するサブプログラム29の内容(例えば、部品名がポンプであればポンプのサブプログラム)が記載され、引数定義欄48には、図12(a)〜図12(d)の内容が記載される。
Note that the component names displayed in the
図11に示されるように、プラントモデル作成システム10は、ソースコード31からプログラム構成ツリーと入出力関係表と部品データ(部品データ群)34とを生成する。これは、上述した図3に示されるステップS1およびステップS2を経てなされる。その後、ユーザーは部品データ群34からモデル再構築に使用する部品を選択することで、図11に示されるような結線図のプラントモデル35が再構築される(図3に示されるステップS3)。
As shown in FIG. 11, the plant
図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
続いて、ステップ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
図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
プラントモデル作成システム10において、プログラムの更新・生成は、プログラムソースコード生成処理部26が、プログラムソースコード生成処理ステップを実行することによってなされる。プログラムの更新・生成は、結線図を描く場合と同様にして行うことができる。具体的には以下の通りである。
In the plant
プログラムソースコード生成処理部26は、まず、プログラム構成ツリーの順にサブプログラムを呼ぶよう並べるステップを実行する。そして、その引数は入出力関係表を参照して、ひとつの部品の出力から入力への結線関係が在るものは同一変数を取っていくようにし、残った部品固有の変数については追加していくステップを実行する。このようにして変数を取っていくとプログラムの変数並びは図14に示されるメモリーテーブル50のようになり、サブプログラムの変数を呼ぶ関係も埋めることができる。
The program source code
プログラムソースコード生成処理部26は、上記二つのステップ(プログラムソースコード生成処理ステップのサブステップ)を実行することによって、メモリーテーブル50が作成される。このメモリーテーブル50は、例えば、記憶手段15等の読み出し可能な記憶領域に格納される。この場合のプログラムのソースコード51は図15に示される。
The program source code
次に、生成されたプログラムのソースコード51が適切であるかの評価(図3に示されるステップS4)について説明する。
Next, evaluation of whether the
図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
実際のシミュレーションにおいては、生成されたプログラムに対して初期値およびパラメータを設定し、また、動作させる変数を設定して計算し、出力される変数をプロットなどして評価するのが一般的である。 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
一方、時刻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
図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
図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 /
次に、部品を追加した場合(図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
図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
まず、変更後のプログラム構成ツリー(図17)の順にサブプログラム29を呼ぶように並べていく。その引数は入出力関係表(図18)を参照して、一つの部品の出力から入力への結線関係が在るものは同一変数を取っていくようにする。そして、残った部品固有の変数については追加する。このようにして変数を取っていくと、プログラムの変数並びは図20に示されるようになり、サブプログラム29の変数を呼ぶ関係も埋めることができる。
First, the
次に、図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
部品の追加や削除等の変更があった場合、変更の無い部分のメモリー配置は変わらない方が、これまでのデータセットが使えるので有効である。メモリーテーブル更新処理ステップは、この既存の部分を変更しないように配慮した処理内容になっている。具体的には、まず、プログラムソースコード生成処理部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
メモリーテーブル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
このような処理ステップを実行することによって、削除した領域を再度使うこともでき、部品の追加や削除等の変更があった場合でも変更の無い部分のメモリー配置(メモリー利用状態フラグを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
図25は、図22に示されるタンクプログラム(サブプログラム)を有するプラントプログラムに対してプラントモデル作成システム10の部品化処理部24が作成した部品データ34の一例およびプログラム再構成の概略例を示す説明図である。
FIG. 25 shows an example of
図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
すなわち、既存のプログラム(ソースコード31)に対して、グローバル変数でのサブプログラム間の参照をローカル変数での参照に置き換えたサブプログラム29、サブプログラム29をモデルオブジェクトとして認識し呼び出し関係を定義したプログラム構成ツリーおよび変数の入出力関係表を生成し、アイコン40と対応させた部品を集めた部品データ(データベース)34から必要な部品データ34を読み出して配置し、結線することで、モデルプログラムの結線図を生成して当該結線図に対応するモデルプログラムを再生成することができる。
That is, for the existing program (source code 31), the
また、プログラム構成ツリーと入出力関係表を含む接続関係情報32をユーザーが入力手段12を介して容易に編集することができ、編集後は編集後のサブプログラム29、接続関係情報32および必要な部品データ34を読み出して配置し、結線することができるので、モデルプログラムの改修も容易に行うことができる。
Further, the user can easily edit the
尚、本発明は上記の各実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化しても良い。また、プラントモデルの作成を例にしているが、これに限定されず、他のシミュレーションモデルのプログラムについて適用できる。 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
DESCRIPTION OF
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 that calls a predetermined part from part data generated in advance and places the part, and connects the arranged parts to create a model program A connection processing unit;
A program source code generation processing unit that generates a source code of the model program based on the arrangement and connection state of the component group constituting the model program and input / output relation information, and when creating the model program, A plant model creation system characterized in that addresses of variables that are not added or deleted are retained.
既存のソフトウエアのソースコードから当該ソースコードの中の変数が入力変数、出力変数または入出力変数の何れであるかを判定するステップと、
前記判定ステップでの判定結果を使って前記ソースコードを持つプログラムのプログラム構成ツリーと、当該プログラムのサブプログラム間でやりとりされる変数の入出力関係を規定した入出力関係情報とを抽出するステップと、
前記サブプログラム間におけるグローバル変数での参照をローカル変数での参照に置き換えたサブプログラムを生成するステップと、
前記プログラム構成ツリー、入出力関係情報、サブプログラムおよび予め生成しておいたソフトウエア部品を格納したデータベースを参照して前記ソフトウエア部品を配置し結線するステップと、
前記ソフトウエア部品を結線したモデルプログラムのソースコードを生成するステップとを備え、前記モデルプログラムを作成する際に、追加・削除されない変数のアドレスは保持される処理手順を実行することを特徴とするプラントモデル作成方法。 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 model program source code connected to the software components, and executing a processing procedure in which addresses of variables that are not added or deleted are held when the model program is created. Plant model creation method.
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 JP2011034179A (en) | 2011-02-17 |
JP5254149B2 true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6101190B2 (en) * | 2013-10-29 | 2017-03-22 | 株式会社東芝 | Information processing apparatus, information processing method, and program |
Family Cites Families (8)
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 |
-
2009
- 2009-07-30 JP JP2009177585A patent/JP5254149B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2011034179A (en) | 2011-02-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Naujokat et al. | CINCO: a simplicity-driven approach to full generation of domain-specific graphical modeling tools | |
US8150673B1 (en) | Partitioning a model in modeling environments | |
Ziadi et al. | Software product line engineering with the UML: Deriving products | |
JP4482563B2 (en) | Simplified data signal support for diagramming environment languages | |
US7503027B1 (en) | Hardware description language code generation from a state diagram | |
CN106648662B (en) | Report generation device and method based on project cost calculation description language BCL | |
Nigischer et al. | Multi-domain simulation utilizing SysML: state of the art and future perspectives | |
US20090241088A1 (en) | Creating graphical models representing control flow of a program manipulating data resources | |
KR20070000732A (en) | Asadal : system for providing feature-oriented software product line engineering environment | |
US8046202B1 (en) | Generation of intermediate representations based on user specified elements in a graphical model that enable simulation, propagation and code generation | |
CN110262794A (en) | A kind of AADL behaviour expanding method and tool based on specification with description language | |
US11126408B2 (en) | Incremental code generation method | |
JP2005242569A (en) | Data processor design method and apparatus, and program | |
JP2009181446A (en) | Program generating device and block diagram generating apparatus | |
Sangiovanni-Vincentelli et al. | Metamodeling: An emerging representation paradigm for system-level design | |
Ermel et al. | Animated simulation of integrated UML behavioral models based on graph transformation | |
Edwards et al. | Automated analysis and code generation for domain-specific models | |
CN113934429A (en) | Design draft conversion method and device, computer equipment and storage medium | |
KR100994070B1 (en) | A Reserved Component Container Based Software Development Method and Apparatus | |
JP5254149B2 (en) | Plant model creation system and plant model creation method | |
CN116909553A (en) | Page online development and local compiling operation system | |
Wen et al. | “Integrare”, a collaborative environment for behavior-oriented design | |
CN112784417B (en) | Avionics distributed joint simulation method and system based on SysML | |
Crégut et al. | Generative technologies for model animation in the TopCased platform | |
Gonçalves et al. | ReFlO: An interactive tool for pipe-and-filter domain specification and program generation |
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 |