JPH0675937A - Simulation model generating device - Google Patents

Simulation model generating device

Info

Publication number
JPH0675937A
JPH0675937A JP2278392A JP2278392A JPH0675937A JP H0675937 A JPH0675937 A JP H0675937A JP 2278392 A JP2278392 A JP 2278392A JP 2278392 A JP2278392 A JP 2278392A JP H0675937 A JPH0675937 A JP H0675937A
Authority
JP
Japan
Prior art keywords
model
editing
expression
editor
node
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.)
Pending
Application number
JP2278392A
Other languages
Japanese (ja)
Inventor
Hisatada Nakamura
中村久肇
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.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
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 Fuji Xerox Co Ltd filed Critical Fuji Xerox Co Ltd
Priority to JP2278392A priority Critical patent/JPH0675937A/en
Publication of JPH0675937A publication Critical patent/JPH0675937A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To independently generate/edit a model by means of different expression and to convert the generation/editing of the model from certain expression into the expression of the other model so as to reflect it. CONSTITUTION:A simulation model generation device which interactively generates or edits the simulation model is provided with plural editing means 2-1 to 2-n having a model alteration indication part 2-1 a analyzing input on model editing and converting an indication into that on the generation/editing of the model and a model expression system conversion part 2-2b converting the alteration of the model into the expression system of oneself, and consisting of different model expression system and with a management means 1 receiving the indication on the generation/editing of the model from the editing means 2-r to 2-n, updating the model and informing the other editing means of a processing content when a generation or editing processing is executed. The generation/editing of the model from certain expression is converted into the other model expression and it is reflected. Thus, the simulation model is interactively generated/edited by different expression.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、数式の集合で表現され
るようなシミュレーションモデルを対話的に作成/編集
するシミュレーションモデル作成装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a simulation model creating apparatus for interactively creating / editing a simulation model represented by a set of mathematical expressions.

【0002】[0002]

【従来の技術】数式でモデルを表現するシミュレーショ
ン装置では、通常、特定の文法に従って数式を順次追
加、編集することによってモデルを作成していく。例え
ば、表計算装置(スプレッドシート)では各セルに他の
セルとの関係を数式として記述することにより、シミュ
レーションモデルを作成しており(特願平2−1704
48)、また特に、数式入力を容易にするためのエディ
タを持つものもある。しかし、数式によるモデル表現
は、ある変数の値に直接影響する変数はどれかなど、変
数間の関係を把握しにくい問題がある。
2. Description of the Related Art In a simulation apparatus that expresses a model with mathematical expressions, a model is usually created by sequentially adding and editing mathematical expressions in accordance with a specific grammar. For example, in a spreadsheet device (spreadsheet), a simulation model is created by describing the relationship between each cell and other cells as a mathematical formula (Japanese Patent Application No. 2-1704).
48), and in particular, some have editors to facilitate entering mathematical expressions. However, the model expression by the mathematical formula has a problem that it is difficult to grasp the relation between variables such as which variables directly influence the value of a certain variable.

【0003】本発明はかかる事情に鑑みてなされたもの
で、数式表現やグラフ表現のような異なる表現によりそ
れぞれ独立にモデルの作成/編集可能であり、さらに、
ある表現からのモデルの作成/編集を他のモデル表現へ
変換/反映させることができ、ユーザの都合のよい表現
によるモデルの作成/編集が行えるようにしたシミュレ
ーションモデル作成装置を提供することを目的とする。
The present invention has been made in view of such circumstances, and it is possible to independently create / edit a model by different expressions such as mathematical expressions and graph expressions.
An object of the present invention is to provide a simulation model creation device capable of converting / reflecting a model creation / editing from a certain expression to another model expression so that a model can be created / edited by a convenient expression for a user. And

【0004】[0004]

【課題を解決するための手段】本発明のシミュレーショ
ンモデル作成装置は、図1に示すように、シミュレーシ
ョンモデルを対話的に作成または編集するシミュレーシ
ョンモデル作成装置において、モデル編集に関する入力
を解析し、モデルの作成/編集に関する指示に変換する
モデル変更指示部2ー1a、2ー2a……2ーna、及
びモデルの変更を自身の表現形式に変換するモデル表現
形式変換部2ー1b、2ー2b……2ーnbを有する異
なるモデル表現形式の複数の編集手段2ー1、2ー2…
…2ーnと、前記編集手段からモデルの作成/編集に関
する指示を受取り、モデルを更新するとともに、モデル
の作成/編集処理が行われた際に前記処理内容を他の編
集手段に通知する管理手段1とを備え、ある表現からの
モデルの作成/編集を他のモデル表現へ変換/反映さ
せ、異なる表現により対話的にシミュレーションモデル
の作成/編集を行うことを特徴とする。
As shown in FIG. 1, a simulation model creating apparatus of the present invention analyzes a model editing input in a simulation model creating apparatus for interactively creating or editing a simulation model, Model change instructing section 2-1a, 2-2a ... 2-na for converting to creation / editing instruction, and model expression format converting section 2-1b, 2-2b for converting model change into its own expression format. ... A plurality of editing means 2-1 with different model representation formats having 2-nb, 2-1 ...
2 -n and management for receiving an instruction regarding model creation / editing from the editing means, updating the model, and notifying other editing means of the processing contents when the model creation / editing processing is performed Means for converting / reflecting model creation / editing from one expression into another model expression, and interactively creating / editing a simulation model with different expressions.

【0005】[0005]

【作用】本発明は、数式編集エディタ、グラフ編集エデ
ィタのような異なる表現形式による編集手段を使用し、
ユーザからのある表現形式による作成/編集指令を受け
取ると編集内容を解析し、モデル変更の指示へ変換す
る。入力が不適切な場合、例えば数式が構文に合わな
い、変数同士をリンク付けしようとしたような場合は、
エラーメッセージが表示される。モデル管理部では、各
編集手段からのモデル編集指示に応じて、モデル構造の
書き換えを行うとともに、入力された編集手段ではない
他の表現形式の編集手段に対して新しいモデルに応じて
表示更新を実行するように通知し、その結果新しいモデ
ル表現に変更され、入力された編集手段では、編集作業
が行われたときに表示が更新される。こうして順次モデ
ルの編集が行われ、他の表現形式の編集手段にも自動的
にモデルの更新が反映される。
The present invention uses editing means having different expression formats such as a formula editing editor and a graph editing editor,
Upon receiving a creation / editing command from a user in a certain expression format, the editing content is analyzed and converted into a model change instruction. If the input is incorrect, for example if the formula doesn't match the syntax or you try to link variables together,
Error message is displayed. The model management unit rewrites the model structure according to the model editing instruction from each editing unit, and updates the display of the editing unit other than the input editing unit according to the new model according to the new model. The execution is notified, the result is changed to the new model representation, and the input editing means updates the display when the editing work is performed. In this way, the model is sequentially edited, and the model update is automatically reflected in the editing means of other expression formats.

【0006】[0006]

【実施例】図2は図1で示した本発明の機能ブロック図
に対応した装置構成を示す図であり、図1のモデル管理
手段1、編集手段2ー1、2ー2……2ーnは、図2に
おけるCPU10のモデル管理部10a、編集部10b
ー1、10bー2……10bーnに相当し、編集に必要
なデータは主メモリ11に記憶されているデータ11a
に相当し、また編集に必要な入力はキーボード、マウス
等からなる入力部13より行い、編集結果はディスプレ
イ12に表示される。なお、外部メモリ14は磁気ディ
スク等の補助記憶装置である。
FIG. 2 is a diagram showing an apparatus configuration corresponding to the functional block diagram of the present invention shown in FIG. 1. The model managing means 1, the editing means 2-1 and 2-2 ... n is a model management unit 10a and an editing unit 10b of the CPU 10 in FIG.
-1, 10b-2 ... 10b-n, and the data required for editing is the data 11a stored in the main memory 11.
In addition, the input necessary for editing is performed through the input unit 13 including a keyboard, a mouse, etc., and the editing result is displayed on the display 12. The external memory 14 is an auxiliary storage device such as a magnetic disk.

【0007】以下では、Smalltalk−80を用
いて実装した簡単なシステムを例にして説明する。以下
の例では、モデルを数式形式で表現して編集する数式編
集エディタと、モデルをグラフ構造で表現して編集する
グラフ編集エディタを使用する例について説明するが、
他の表現形式による編集エディタをさらに追加するよう
にしてもよい。
Below, a simple system implemented using Smalltalk-80 will be described as an example. In the following example, we will explain an example of using the formula edit editor that expresses and edits the model in the formula format and the graph edit editor that expresses and edits the model in the graph structure.
You may make it add the edit editor by another expression form further.

【0008】図3は数式編集エディタを説明する図であ
る。数式編集エディタは、シミュレーションモデルを数
式形式に変換して表示するエディタであり、ユーザの数
式の編集に関する入力を構文に合わせて解析し、モデル
の作成/編集に関する指示に変換し、通常のテキストに
対する編集の要領で行うことができるようにしたもので
ある。
FIG. 3 is a diagram for explaining the formula editing editor. The formula edit editor is an editor that displays the simulation model after converting it into a formula format. It analyzes the user's input for editing the formula according to the syntax, converts it into instructions for creating / editing the model, and converts it into ordinary text. It is designed to be editable.

【0009】数式編集でエディタをメニュー選択する
と、ウインドウ20が開く。数式表示領域21におい
て、数式の追加、削除、変更をメニュー選択すると、編
集用のウインドウが開き、テキストの要領で編集され、
入力を行うと、数式の構文が解析され、モデル編集指示
に変換される。このように数式に関する編集は、各ウィ
ンドウのメニュー選択で実行され、基本的にはテキスト
を編集する要領で入力/変更により行っていく。構文解
析の一例について説明すると、図4に示すように、ファ
クタは単純ファクタまたは演算子(−,∂)が付いた単
純ファクタか(図4(a))、項はファクタまたはファ
クタ同士が演算子(*,/)で結合されたものか(図4
(b))、単純数式は項自体または項が演算子(+,
−)で結合されたものか(図4(c))、数式は単純数
式または単純数式が演算子(=,∝+,∝−)で結合さ
れたものか(図4(d))というように行い、例えば単
純式と単純式とが結合されないままの数式であったり、
変数同士をリンク付けしようとした場合にはエラーメッ
セージが表示されるようになっている。
When the editor is selected from the menu by editing the formula, the window 20 is opened. In the mathematical expression display area 21, when selecting addition, deletion, or modification of a mathematical expression from the menu, a window for editing opens, and the text is edited in the same manner as the text.
When input, the syntax of the mathematical expression is analyzed and converted into a model edit instruction. In this way, the editing related to the mathematical formula is executed by the menu selection of each window, and basically, the editing / editing is performed by inputting / changing in the manner of editing the text. An example of parsing will be described. As shown in FIG. 4, a factor is a simple factor or a simple factor with an operator (−, ∂) (FIG. 4 (a)), or a term is an operator between factors or factors. Whether they are joined by (*, /) (Fig. 4
(B)), in the simple mathematical expression, the term itself or the term is an operator (+,
-) Is connected (Fig. 4 (c)), or the formula is a simple formula or a combination of simple formulas with operators (=, ∝ +, ∝-) (Fig. 4 (d)). For example, a simple expression and a simple expression are not combined,
If you try to link variables together, an error message will be displayed.

【0010】また、ウインドウ20は変数表示領域22
を有しており、この領域で変数の追加、削除が行われ、
また変数を選択し、その変数が値をもっている場合に
は、値表示領域23にその値が表示され、表示された変
数の値を変更できる。図では、「A+B=C−D*
E」、「∂(B+C)∝+A/E」という2つの式が表
示されている。
The window 20 has a variable display area 22.
The variables are added and deleted in this area.
When a variable is selected and the variable has a value, the value is displayed in the value display area 23, and the value of the displayed variable can be changed. In the figure, “A + B = C−D *
Two expressions, "E" and "∂ (B + C) ∝ + A / E" are displayed.

【0011】なお、 シミュレーションモデルは、後述
するように内部ではトリー構造として表現して伝達して
いる。また本実施例では、数式の一部の変更は元の数式
を「削除」し、新しい数式を「追加」することで実現し
ている。
The simulation model is internally expressed and transmitted as a tree structure as described later. Further, in the present embodiment, a part of the mathematical expression is changed by “deleting” the original mathematical expression and “adding” a new mathematical expression.

【0012】図5、図6はグラフ編集エディタを説明す
る図である。グラフ編集エディタは、シミュレーション
モデルをグラフ構造に変換して表示するエディタであ
り、ユーザのグラフ構造(変数/演算子をノードとする
グラフ)の編集に関する入力を解析し、シミュレーショ
ンモデルの作成/編集に関する指示に変換する。ただ
し、数式編集エディタでの入力には、グラフ表示に必要
な位置情報はないので、グラフ編集エディタが持ってい
るレイアウト・アルゴリズムによって配置され、マウス
操作により、ノードの位置を移動でき、この時連結され
ているリンクもノードの新しい位置に対応して書き換え
られる。また、グラフ構造を自動的にレイアウトするこ
ともできる。
5 and 6 are diagrams for explaining the graph editing editor. The graph editing editor is an editor for converting a simulation model into a graph structure and displaying the graph structure. The graph editing editor analyzes inputs of a user's graph structure (a graph having variables / operators as nodes) and relates to creation / editing of a simulation model. Convert to instructions. However, since the position information necessary for displaying the graph is not included in the input in the formula edit editor, it is arranged by the layout algorithm of the graph edit editor, and the position of the node can be moved by mouse operation. The existing links are also rewritten according to the new position of the node. Also, the graph structure can be automatically laid out.

【0013】グラフ編集エディタをメニュー選択する
と、ウインドウ30が開く。ウインドウ30には演算子
ノード31により演算子のタイプが表示される。また、
各ノード間はリンク32によって結合されていることが
表示され、また変数ノード33には変数名、値が表示さ
れる。図5では、数式エディタと同じ「A+B=C−D
*E」、「∂(B+C)∝+A/E」という2つの式を
表示したものであり、変数33(A、B、C、D、E)
がリンク32によって演算子ノード31によって結合さ
れていることを示している。例えば、変数A、Bはリン
ク付けされて演算子ノード(+)で結合され(A+
B)、一方変数C、D、Eは演算子ノード(−,*)で
結合され(C−D*E)、これらが2項演算子ノード
(=)で結合されてA+B=C−D*Eという数式が表
現されている。
When the graph edit editor is selected from the menu, the window 30 opens. The operator type is displayed in the window 30 by the operator node 31. Also,
It is displayed that the nodes are connected by the link 32, and the variable name and the value are displayed in the variable node 33. In FIG. 5, "A + B = C-D", which is the same as the formula editor,
* E ”and“ ∂ (B + C) ∝ + A / E ”are displayed, and variable 33 (A, B, C, D, E)
Are linked by an operator node 31 by a link 32. For example, variables A and B are linked and combined at the operator node (+) (A +
B), on the other hand, variables C, D, and E are connected by an operator node (-, *) (C-D * E), and these are connected by a binary operator node (=), and A + B = C-D *. The mathematical expression E is expressed.

【0014】ノードの編集用テンプレートは、例えば図
6に示すようなものであり、演算子、変数名を表すノー
ド上でマウスをダブルクリックすることにより開く。図
6(a)に示す演算子ノードテンプレートは、加減算用
の演算子(+,−)、乗除算用の演算子(*,/)、時
間微分を行う単項演算子「∂」、二項演算子(=、「∝
+」(「∝−」))等からなっている。なお、二項演算
子「∝+」(「∝−」)は単調増加、単調減少を表して
いる。変数ノードテンプレートは図6(b)に示すよう
に、変数名と値とが表示され、変数を選択すると変数名
の欄に選択された変数が表示され、値の欄にはその値も
表示され、このテンプレートで変数の変更、値の変更を
行えるようになっている。
The node editing template is, for example, as shown in FIG. 6, and is opened by double-clicking the mouse on a node representing an operator or a variable name. The operator node template shown in FIG. 6A is for addition / subtraction operators (+, −), multiplication / division operators (*, /), time differential unary operator “∂”, and binary operation. Child (=, "∝
+ ”(“ ∝ − ”)) etc. The binary operator “∝ +” (“∝−”) represents monotonic increase and monotonic decrease. As shown in FIG. 6B, the variable node template displays variable names and values. When a variable is selected, the selected variable is displayed in the variable name column, and the value is also displayed in the value column. , This template allows you to change variables and values.

【0015】ノードの編集は、ノード上でマウスをダブ
ルクリックしてテンプレートを開いて編集を行い、変数
名や値の変更、演算子のタイプの指定/変更を行う。変
数、演算子の追加/削除は、グラフ上にノードを追加/
削除することで行う。リンクの編集は、変数ノード、演
算子ノード間のリンクを追加/削除することで、数式に
対応するグラフ構造を編集し、また、リンクを示す線
は、ドラッグで線を移動し、例えば演算子ノード(+)
と変数ノードAを結ぶ線を指定して移動させ、演算子ノ
ード(+)と変数ノードCとをリンク付けすることがで
きる。
The node is edited by double-clicking the mouse on the node to open the template for editing, changing the variable name and value, and specifying / changing the operator type. Add / delete variables and operators by adding nodes on the graph /
This is done by deleting. Links can be edited by adding / deleting links between variable nodes and operator nodes to edit the graph structure corresponding to mathematical expressions. Also, the line indicating the link can be moved by dragging, for example, the operator. Node (+)
And the variable node A can be specified and moved to link the operator node (+) and the variable node C.

【0016】以上のようにして各エディタで行われた編
集は、以下のモデル編集の組合せとしてモデルに伝達さ
れ実行される。
The editing performed by each editor as described above is transmitted to the model and executed as the following combination of model editing.

【0017】・「数式」に対応するモデル表現を「追
加」する。 ・「数式」に対応するモデル表現を「削除」する。 ・「変数」に対応するモデル表現を「追加」する。 ・「変数」に対応するモデル表現を「削除」する。 ・「変数の値」を書き換える。 実行されたモデルの更新結果は、入力されたエディタ以
外のエディタに対して伝達され、モデル表現の更新が行
われることになる。
"Add" a model expression corresponding to a "mathematical expression". -"Delete" the model expression corresponding to the "mathematical formula". -"Add" a model expression corresponding to a "variable". -"Delete" the model expression corresponding to the "variable". -Rewrite "variable value". The executed model update result is transmitted to an editor other than the input editor, and the model expression is updated.

【0018】なお、本発明はスプレッドシートの表現形
式との連結を行うようにしてもよい。スプレッドシート
は、シミュレーション装置であり、また、数式や変数の
登録、変数の値の代入のエディタやシミュレーション結
果を表現する機能を持っている。そして、スプレッドシ
ートも数式入力が基本であり、そのエディタとモデル間
の変換/表示機能の構築は本実施例と同じで、ただシミ
ュレーション装置がエディタと融合している点が本発明
と異なっているが、シミュレーション結果、すなわち、
変数の値の決定もモデルの変更とすることにより、その
表示も本発明と同様にとらえることが可能である。ただ
し、スプレッドシートの表現では、各セルに数式を対応
させなければならないので、スプレッドシート以外のモ
デル・エディタから入力する場合には、本実施例で説明
したような入力以外に、ある変数や数式がどのセルに対
応するかを入力する必要がある。その場合、モデルに必
要な情報を各エディタで対応させればよく、本実施例で
も、数式エディタからの入力をグラフに反映させるため
には、グラフ上での位置情報が必要となり、内部のアル
ゴリズムに従って配置することで対応している。
Note that the present invention may be connected with the representation format of the spreadsheet. The spreadsheet is a simulation device, and also has a function of registering mathematical expressions and variables, an editor for substituting variable values, and a function of expressing simulation results. The spreadsheet is also based on the input of mathematical formulas, and the construction of the conversion / display function between the editor and the model is the same as that of the present embodiment, except that the simulation device is integrated with the editor. Is the simulation result, that is,
By determining the value of the variable by changing the model, the display can be grasped as in the present invention. However, in the expression of the spreadsheet, it is necessary to make a formula correspond to each cell. Therefore, when inputting from a model editor other than the spreadsheet, in addition to the input as described in this embodiment, a certain variable or formula is used. You need to enter which cell corresponds to. In that case, it suffices that the information necessary for the model be associated with each editor. In this embodiment as well, in order to reflect the input from the formula editor in the graph, position information on the graph is required, and the internal algorithm is used. It corresponds by arranging according to.

【0019】図7はシミュレーションモデルの内部表現
を説明する図であり、「A+B=C−D*E」、「∂
(B+C)∝+A/E」の二つの式からなる場合の内部
表現を示している。モデル管理部におけるシミュレーシ
ョンモデルは、図7に示すように木構造で表現されてお
り、また、モデル管理手段では木構造そのものの情報以
外に以下の情報を持っている。すなわち、 ・一つの数式に対応する木構造のルートとなるノード
(図の場合、node1とnode5をルートノードと
して持っており、本実施例で想定している数式モデルに
おいては、等号を表すノードと単調増加/単調減少を表
すノードのみがルートノードとなり得る。) ・どのノードが演算子であるのか、変数であるのかの情
報 ・変数ノードが全数式(すなわち木構造全体)に含まれ
る数(例えば、図の場合、node9,node10な
どは2個含まれいているので2、node12は1個だ
けであるので1であり、この数が0になった場合、その
変数はどの式にも用いられないことになり、木構造から
削除される。すなわち、この情報は同じ名前の変数を複
数の数式で共有して用いるための情報である。) ・変数ノードの変数名(テキスト)とその値 ・演算子ノードのラベル(すなわち、“+”,“*”,
“=”、等) 次に編集処理の流れについて説明する。図8は編集処理
全体の流れを説明するための図である。編集処理が開始
すると、数式編集エディタまたはグラフ編集エディタに
対する編集入力を受け取り、編集内容を解析してモデル
変更の指示へ変換する(ステップ101,102)。次
いでユーザの入力は構文に合っているか否かみて(ステ
ップ103)、入力が不適切な場合(数式か構文に合わ
ない、変数同士をリンク付けしようとしたなど)は、エ
ラーメッセージを表示して終了する(ステップ10
4)。
FIG. 7 is a diagram for explaining the internal representation of the simulation model, which is "A + B = C-D * E", "∂".
(B + C) ∝ + A / E ”shows the internal representation. The simulation model in the model management unit is represented by a tree structure as shown in FIG. 7, and the model management unit has the following information in addition to the information on the tree structure itself. That is, the node that is the root of the tree structure corresponding to one mathematical expression (in the figure, it has node1 and node5 as root nodes, and in the mathematical model assumed in this embodiment, a node that represents an equal sign. And only a node representing monotonous increase / monotonic decrease can be the root node.)-Information on which node is an operator or a variable-Number of variable nodes included in all mathematical expressions (that is, the entire tree structure) ( For example, in the case of the figure, since two nodes 9 and 10 are included, the number is 2, and since there is only one node 12, the number is 1, and when this number becomes 0, the variable is used in any expression. It is not present and is deleted from the tree structure, that is, this information is information for sharing a variable with the same name in multiple mathematical expressions.) ・ Variable name of variable node (Text) and its value-Label of operator node (ie "+", "*",
“=”, Etc.) Next, the flow of the editing process will be described. FIG. 8 is a diagram for explaining the flow of the entire editing process. When the editing process is started, the editing input to the mathematical expression editing editor or the graph editing editor is received, the edited contents are analyzed and converted into a model change instruction (steps 101 and 102). Then, the user's input is checked whether it matches the syntax (step 103), and if the input is incorrect (it does not match the formula or the syntax, trying to link variables, etc.), an error message is displayed. End (step 10)
4).

【0020】入力が構文に合っている場合、モデル管理
部で、エディタからのモデル編集指示に応じたモデル構
造の書き換えを行うとともに、入力されたエディタでは
ないエディタへ、新しいモデルに応じて表示更新を実行
するように指示する(ステップ105,106)。この
指示により、数式編集エディタの場合には、モデルの数
式への変換を行って表示構造を更新し、グラフ編集エデ
ィタの場合には、モデルをグラフ構造/空間的レイアウ
トへ変換して表示構造を更新する(ステップ107)。
そして編集した新しいモデル表現をユーザに対して表示
する(ステップ108)。
When the input matches the syntax, the model management unit rewrites the model structure according to the model editing instruction from the editor, and updates the display to the editor other than the input editor according to the new model. Is instructed to be executed (steps 105 and 106). By this instruction, in the case of the formula editing editor, the model is converted into the formula and the display structure is updated, and in the case of the graph editing editor, the model is converted into the graph structure / spatial layout to display the display structure. Update (step 107).
Then, the edited new model representation is displayed to the user (step 108).

【0021】次に、エディタにおける編集指示からモデ
ル変更指示への変換処理について説明する。図9は数式
編集エディタにおける変換処理を説明するフローであ
る。本実施例においては、アルゴリズムを簡単化するた
め、ある数式の編集はもとの数式に対応する木構造を削
除し、新しい数式に対応する木構造を追加することで対
応している。
Next, the conversion process from the editing instruction in the editor to the model change instruction will be described. FIG. 9 is a flow chart for explaining the conversion process in the formula editing editor. In the present embodiment, in order to simplify the algorithm, a certain mathematical expression is edited by deleting the tree structure corresponding to the original mathematical expression and adding the tree structure corresponding to the new mathematical expression.

【0022】例えば、「A+B=C−D*E」を「A+
B=C−D/E」に編集した場合、“*”演算子を
“/”演算子に変えるのではなく、数式「A+B=C−
D*E」を削除し、新たに数式「A+B=C−D/E」
を追加する。そのために、数式編集エディタは、各数式
に対応する木構造のルートノード(図7)へのポインタ
を保持している。また、前述したように、数式を記述し
たテキストから木構造を作成する簡単な構文解析機能を
持っており、編集が行われた場合、削除する木構造のル
ートノード、新しく追加する木構造を求めモデル管理部
に伝達する。またエディタで変数の値の代入/変更を行
った場合、変数名と新しい値をモデル管理部に伝達す
る。
For example, "A + B = C-D * E" becomes "A +
When edited to “B = C−D / E”, instead of changing the “*” operator to the “/” operator, the mathematical expression “A + B = C−” is used.
“D * E” is deleted and a new formula “A + B = C−D / E” is added.
To add. Therefore, the formula editing editor holds a pointer to the root node (FIG. 7) of the tree structure corresponding to each formula. In addition, as described above, it has a simple parsing function that creates a tree structure from the text in which mathematical expressions are described.When editing, the root node of the tree structure to be deleted and the tree structure to be newly added are calculated. Inform the model management department. Further, when the value of the variable is substituted / changed by the editor, the variable name and the new value are transmitted to the model management unit.

【0023】図9において、エディタに対するユーザの
編集指示を受け取ると、編集指示からどの数式の編集
か、新しい数式を表すテキストに関する情報を得、新し
いテキストの構文解析を行って木構造を作成する(ステ
ップ111,112,113)。構文解析が成功しない
場合にはエラーメッセージを表示して終了し(ステップ
114,115)、構文解析が成功した場合には、編集
した以前の数式の表す木構造のルートノードを検索し、
検索したルートノードと作成した木構造をモデル管理部
に伝達する(ステップ116,117)。なお、この処
理フローにおいては、単純な数式の追加、削除、変数の
値の代入/変更を行う場合は省略している。)図10は
グラフ編集エディタの処理フローを説明する図である。
本実施例では、グラフ編集エディタにおいても、ある数
式に対応するグラフの編集はもとの数式に対応する木構
造を削除し、新しい数式に対応する木構造を追加するこ
とで対応している。したがって、モデル管理部に伝達す
る情報は、数式編集エディタと同様に、削除する木構造
のルートノードと新しく追加する木構造である。
In FIG. 9, when a user's editing instruction to the editor is received, information on which mathematical expression is to be edited and text relating to the new mathematical expression is obtained from the editing instruction, and the new text is parsed to create a tree structure ( Steps 111, 112, 113). If the parsing is not successful, an error message is displayed and the process ends (steps 114 and 115). If the parsing is successful, the root node of the tree structure represented by the edited previous mathematical expression is searched,
The searched root node and the created tree structure are transmitted to the model management unit (steps 116 and 117). Note that this processing flow is omitted when simple mathematical expressions are added, deleted, and variable values are substituted / changed. ) FIG. 10 is a diagram for explaining the processing flow of the graph editing editor.
In the present embodiment, also in the graph editing editor, the editing of the graph corresponding to a certain mathematical expression is supported by deleting the tree structure corresponding to the original mathematical expression and adding the tree structure corresponding to the new mathematical expression. Therefore, the information transmitted to the model management unit is the root node of the tree structure to be deleted and the tree structure to be newly added, as in the formula editing editor.

【0024】本実施例の数式編集エディタでは、数式を
テキストとして保持していて木構造へ変換するために前
述した構文解析を行う。グラフ編集エディタでは、いわ
ば内部表現の木構造(図7)をグラフとして視覚化して
いるのであり、グラフ構造と木構造の対応を取ること
(木構造からグラフ構造を、また、グラフ構造から木構
造を作成すること)は容易である。また、すべてのノー
ドやリンクに関するグラフ構造と木構造の対応関係を保
持する必要はなく、ルートノード同士の対応を保持して
いればよい。グラフ編集エディタでの基本的な編集操作
は、ノードの追加、削除、リンクの追加、削除である
が、この編集過程では、不完全な数式表現が生成され
る。そこで、本実施例では、このような不完全な数式の
内部表現を生成しないように、グラフ編集において完全
な数式に対応するグラフが作成された段階で、モデル管
理部に伝達する。なお、ノードの追加は、グラフ構造に
新しくノード表現を追加し、内部表現に関する操作は行
われず、変数ノード同士をリンク付しようとした場合、
演算子ノードの最大のリンク数を越えたリンクを付けよ
うとした場合にはエラーとなる。また、数式エディタと
同様、変数の値の代入/変更を行うことができ、この場
合変数名と新しい値をモデル管理部に伝達する。
The mathematical expression editing editor of this embodiment holds the mathematical expression as text and performs the above-described syntax analysis in order to convert it into a tree structure. In the graph editing editor, the tree structure of the internal representation (Fig. 7) is visualized as a graph, and the correspondence between the graph structure and the tree structure (corresponding to the graph structure from the graph structure, and from the graph structure to the tree structure is shown). Is easy to create). Further, it is not necessary to hold the correspondence between the graph structure and the tree structure for all the nodes and links, but it is sufficient to hold the correspondence between the root nodes. The basic editing operations in the graph editing editor are node addition, deletion, link addition, and deletion, but in this editing process, an incomplete mathematical expression is generated. Therefore, in this embodiment, in order not to generate such an incomplete internal expression of the mathematical formula, the graph is transmitted to the model management unit when the graph corresponding to the complete mathematical formula is created in the graph editing. In addition, when adding a node, a new node expression is added to the graph structure, the operation related to the internal expression is not performed, and when trying to link variable nodes to each other,
If you try to add more links than the maximum number of operator node links, an error will occur. Further, like the formula editor, the value of the variable can be substituted / changed, and in this case, the variable name and the new value are transmitted to the model management unit.

【0025】図10において、エディタに対するユーザ
の編集指示を受け取ると、構文解析により操作は正しい
か否か判断し(ステップ121,122)、構文解析が
成功しない場合にはエラーメッセージを表示して終了し
(ステップ123)、構文解析が成功した場合には、リ
ンク/ノードの削除か否かみて、削除であればリンク/
ノードを削除し(ステップ124,125)、リンクの
削除でなければリンクの追加か否かみて、追加であれば
リンクを追加し(ステップ126,127)、リンクの
追加でなければノード表現をグラフ構造に追加する(ス
テップ128)。
In FIG. 10, when a user's editing instruction to the editor is received, it is judged by syntax analysis whether or not the operation is correct (steps 121 and 122). If the syntax analysis is not successful, an error message is displayed and the processing ends. (Step 123), if the syntactic analysis is successful, it is determined whether the link / node is deleted. If it is deleted, the link / node is deleted.
The node is deleted (steps 124 and 125), and if the link is not deleted, it is determined whether or not the link is added. If the link is added, the link is added (steps 126 and 127). If the link is not added, the node expression is graphed. Add to structure (step 128).

【0026】図11はグラフ編集エディタにおけるリン
ク、ノードの削除処理フローを説明する図である。リン
ク、ノードの削除は、削除したリンク/ノードからグラ
フ構造のルートまでたどり、そのルートが対応している
木構造のルートノードを削除すべきものとして登録す
る。対応するルートノードが存在しなければ、対応する
木構造がまだ追加されていない段階であるので登録は行
わない。変数は複数の数式に含まれていることがあり、
そのような変数ノードを削除した場合は複数のルートノ
ードを登録することになる。また、ノードの削除の場
合、そこからのリンクも消えることになる。
FIG. 11 is a view for explaining the flow of processing for deleting links and nodes in the graph editing editor. To delete a link or node, the deleted link / node is traced to the root of the graph structure, and the root node of the tree structure corresponding to the root is registered as the one to be deleted. If the corresponding root node does not exist, the corresponding tree structure has not been added yet, so the registration is not performed. Variables may be included in multiple formulas,
If such a variable node is deleted, multiple root nodes will be registered. Also, if you delete a node, the links from it will also disappear.

【0027】図11において、削除するリンク/ノード
からグラフ構造をルートまでたどり(ステップ13
1)、そのルートノードが対応している木構造のルート
ノードを検索し(ステップ132)、対応するルートノ
ードがあればリストに登録する(ステップ133)。そ
して、削除がリンクの場合にはリンク表現をグラフ構造
から削除し(ステップ134,135)、リンクの削除
でなく、すなわちノードの削除の場合には、先ずノード
から出ているリンク表現をグラフ構造から削除し、次い
でノード表現をグラフ構造から削除する(ステップ13
6,137)。
In FIG. 11, the graph structure is traced from the link / node to be deleted to the root (step 13
1) The root node of the tree structure to which the root node corresponds is searched (step 132), and if there is a corresponding root node, it is registered in the list (step 133). Then, if the deletion is a link, the link expression is deleted from the graph structure (steps 134 and 135), and if the link is not deleted, that is, if the node is deleted, the link expression output from the node is first deleted. From the graph structure (step 13).
6, 137).

【0028】図12はリンクの追加処理フローを説明す
る図である。リンクの追加は、追加したリンクからグラ
フ構造をたどり、ルートからのグラフが数式として完璧
か否かをチェックする。完璧ならばそのルートからのグ
ラフ構造から木構造を作成し、削除すべきルートノード
が存在すればともにモデル管理部へ伝達する。完璧か否
かのチェックは、すべての演算子ノードのリンクの数が
必要かつ十分かで行う。すなわち2項演算子ならリンク
は2つ、3項演算子なら3つである。
FIG. 12 is a diagram for explaining the link addition processing flow. To add a link, follow the graph structure from the added link and check if the graph from the root is a perfect mathematical formula. If perfect, a tree structure is created from the graph structure from that root, and if there is a root node to be deleted, it is sent to the model management unit together. Checking for perfection is performed by checking that the number of links of all operator nodes is necessary and sufficient. That is, the binary operator has two links and the ternary operator has three links.

【0029】図12において、グラフ構造にリンク表現
を追加し、そのリンクからグラフ構造をルートノードま
でたどり、ルートノードからグラフ構造をたどる(ステ
ップ141,142,143)。その結果、演算子ノー
ドのリンクが不十分であれば処理は終了し、リンクの数
が十分であれば全てたどったことを条件にそのルートノ
ードの下部組織まであるグラフ構造から木構造を作成
し、(ステップ156)、木構造とルートノードがリス
トに登録されていれば、ともにモデル管理部へ伝達する
(ステップ157)。
In FIG. 12, a link expression is added to the graph structure, the graph structure is traced from the link to the root node, and the graph structure is traced from the root node (steps 141, 142, 143). As a result, if the operator nodes have insufficient links, the process ends, and if the number of links is sufficient, the tree structure is created from the graph structure that has the subordinate organization of the root node, provided that all of them have been followed. , (Step 156), if the tree structure and the root node are registered in the list, both are transmitted to the model management unit (step 157).

【0030】次に、表示形式の変換について説明する
と、数式編集エディタでは、木構造を受け取り、構文に
応じてテキストへ変換し、モデルの内部表現への変換と
逆の変換を行うことになる。グラフ編集エディタでは、
木構造を受け取り、その構造をグラフ構造へ変換する。
木構造からグラフへの変換はほとんど構造が類似してい
るので容易である。いずれの場合も、削除して追加する
場合、2つの数式のペアで指示されることになってい
る。したがって、その数式の対応を保持することで、数
式エディタでは編集の行われた数式の行が変わらないよ
うにしている。すなわち、グラフ編集エディタで編集さ
れた数式が数式編集エディタにおいて3行目の数式であ
った場合、その数式が削除された後に追加される数式は
3行目に挿入される。なお、グラフエディタでは、削除
したグラフのあとに新しいグラフを配置するようにして
もよく、本実施例では、異なる位置に新しい数式が挿入
される。
Next, the conversion of the display format will be explained. In the formula editing editor, the tree structure is received, converted into text according to the syntax, and the conversion reverse to the conversion into the internal representation of the model. In the graph editor,
Takes a tree structure and transforms it into a graph structure.
Converting a tree structure to a graph is easy because the structures are similar. In any case, when deleting and adding, it is instructed by a pair of two mathematical expressions. Therefore, by holding the correspondence of the formula, the formula editor keeps the line of the edited formula unchanged. That is, when the formula edited by the graph editing editor is the formula on the third line in the formula editing editor, the formula added after the formula is deleted is inserted on the third line. In the graph editor, a new graph may be arranged after the deleted graph, and in this embodiment, a new mathematical expression is inserted at a different position.

【0031】モデル管理部におけるモデルの変更は、数
式の編集を数式全体の削除/追加として扱っているの
で、モデル管理部で受け取る/送る指示は、数式の削除
については、 ・木構造のルート・ノードを受け取る。 ・ルート・ノードの下部構造である木構造を削除する。 ・ルート・ノードを登録から抹消する。 ・その変数ノードが全数式に含まれる数を1だけ引く。 ・もし0になれば、変数名とその値の登録を抹消する。
であり、数式の追加の場合には、 ・木構造を受け取る。 ・木構造を内部表現に追加する。 ・ルート・ノードを登録する。 ・新しい変数ノードの全数式に含まれる数を1加える。 ・新しい変数ノードの変数名と値を登録する。であり、
変数への値の代入の場合には、 ・変数名と新しい値を受け取る。 ・変数名に対応する値として、新しい値を登録する。
Since the model change in the model management section treats the editing of the mathematical expression as the deletion / addition of the entire mathematical expression, the instruction received / sent by the model management section is for deleting the mathematical expression: Receive a node. -Delete the tree structure that is the substructure of the root node. -Remove the root node from the registration. -Subtract the number whose variable node is included in all formulas by one.・ If it becomes 0, delete the registration of the variable name and its value.
And in the case of adding a mathematical expression: -Receive a tree structure. -Add a tree structure to the internal representation. -Register the root node. Add one to the number contained in all formulas of the new variable node. -Register the variable name and value of the new variable node. And
In the case of assigning a value to a variable: • Receive the variable name and new value. -Register a new value as the value corresponding to the variable name.

【0032】なお、本実施例では数式の編集を数式全体
の削除/追加として扱ったが、木構造の編集という形式
に翻訳できれば、エディタの編集オペレーションに応じ
た細かい指示も可能である。
In this embodiment, the editing of the mathematical expression is treated as the deletion / addition of the entire mathematical expression, but if it can be translated into the format of editing the tree structure, it is possible to give detailed instructions according to the editing operation of the editor.

【0033】[0033]

【発明の効果】以上のように本発明によれば、異なる表
現形式によりシミュレーションモデルの作成/編集が可
能であり、ある表現形式の作成/編集が他の表現形式の
編集手段に反映されるので、ユーザの都合のよい表現に
よるモデルの作成/編集を自由に行うことが可能とな
る。
As described above, according to the present invention, it is possible to create / edit a simulation model with different expression formats, and the creation / editing of a certain expression format is reflected in the editing means of another expression format. , It is possible to freely create / edit a model with an expression convenient for the user.

【図面の簡単な説明】[Brief description of drawings]

【図1】 本発明のシミュレーションモデル作成装置の
機能ブロック図である。
FIG. 1 is a functional block diagram of a simulation model creation device of the present invention.

【図2】 図1の装置構成を示す図である。FIG. 2 is a diagram showing a device configuration of FIG.

【図3】 数式編集エディタを説明する図である。FIG. 3 is a diagram illustrating a mathematical expression editing editor.

【図4】 構文解析の一例を示す図である。FIG. 4 is a diagram showing an example of syntax analysis.

【図5】 グラフ編集エディタを説明する図である。FIG. 5 is a diagram illustrating a graph edit editor.

【図6】 テンプレートを示す図である。FIG. 6 is a diagram showing a template.

【図7】 シミュレーションモデルの内部表現を説明す
る図である。
FIG. 7 is a diagram illustrating an internal representation of a simulation model.

【図8】 編集処理全体の流れを説明するための図であ
る。
FIG. 8 is a diagram for explaining the flow of the entire editing process.

【図9】 数式編集エディタにおける変換処理を説明す
る図である。
FIG. 9 is a diagram illustrating a conversion process in a mathematical expression editing editor.

【図10】 グラフ編集エディタの処理フローを説明す
る図である。
FIG. 10 is a diagram illustrating a processing flow of a graph editing editor.

【図11】 リンク、ノードの削除処理フローを説明す
る図である。
FIG. 11 is a diagram illustrating a link / node deletion processing flow.

【図12】 リンクの追加処理フローを説明する図であ
る。
FIG. 12 is a diagram illustrating a link addition processing flow.

【符号の説明】[Explanation of symbols]

1…管理手段、2ー1、2ー2……2ーn…編集手段、
3ー1、3ー2……3ーn…表現変換手段、20…数式
編集エディタのウインドウ、21…数式表示領域、22
…変数表示領域、23…変数値表示領域、30…グラフ
編集エディタのウインドウ、31…演算子ノード、32
…リンク、33…変数ノード。
1 ... Management means, 2-1, 2-2 ... 2-n ... Editing means,
3-1, 3-2 ... 3-n ... Expression conversion means, 20 ... Formula editing editor window, 21 ... Formula display area, 22
... variable display area, 23 ... variable value display area, 30 ... graph edit editor window, 31 ... operator node, 32
... Link, 33 ... Variable node.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 シミュレーションモデルを対話的に作成
または編集するシミュレーションモデル作成装置におい
て、 モデル編集に関する入力を解析し、モデルの作成/編集
に関する指示に変換するモデル変更指示部、及びモデル
の変更を自身の表現形式に変換するモデル表現形式変換
部を有する異なるモデル表現形式の複数の編集手段と、 前記編集手段からモデルの作成/編集に関する指示を受
取り、モデルを更新するとともに、モデルの作成/編集
処理が行われた際に前記処理内容を他の編集手段に通知
する管理手段とを備え、 ある表現からのモデルの作成/編集を他のモデル表現へ
変換/反映させ、異なる表現により対話的にシミュレー
ションモデルの作成/編集を行うことを特徴とするシミ
ュレーションモデル作成装置。
1. A simulation model creation device for interactively creating or editing a simulation model, which analyzes a model editing input and converts it into a model creation / editing instruction, and a model modification instruction itself. A plurality of editing means of different model expression formats having a model expression format conversion section for converting the model expression format, and receiving instructions from the editing means concerning model creation / editing, updating the model, and creating / editing the model Management means for notifying the other processing means of the processing contents when the processing is performed, converting / reflecting model creation / editing from one expression to another model expression, and interactively simulating with different expressions. A simulation model creation device characterized by creating / editing a model.
JP2278392A 1992-02-07 1992-02-07 Simulation model generating device Pending JPH0675937A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2278392A JPH0675937A (en) 1992-02-07 1992-02-07 Simulation model generating device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2278392A JPH0675937A (en) 1992-02-07 1992-02-07 Simulation model generating device

Publications (1)

Publication Number Publication Date
JPH0675937A true JPH0675937A (en) 1994-03-18

Family

ID=12092275

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2278392A Pending JPH0675937A (en) 1992-02-07 1992-02-07 Simulation model generating device

Country Status (1)

Country Link
JP (1) JPH0675937A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005011278A (en) * 2003-06-23 2005-01-13 Hitachi Ltd Management index calculating system
JP2006039847A (en) * 2004-07-26 2006-02-09 Canon Inc Data search method and device, program, and readable memory
JP2007535740A (en) * 2004-03-23 2007-12-06 アンヘル・パラショス・オルエタ Managing formulas
JP2008165739A (en) * 2000-08-24 2008-07-17 Xemplex Pty Ltd Method of graphically defining formula
JP2013015961A (en) * 2011-07-01 2013-01-24 Casio Comput Co Ltd Calculation device and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008165739A (en) * 2000-08-24 2008-07-17 Xemplex Pty Ltd Method of graphically defining formula
JP2005011278A (en) * 2003-06-23 2005-01-13 Hitachi Ltd Management index calculating system
JP2007535740A (en) * 2004-03-23 2007-12-06 アンヘル・パラショス・オルエタ Managing formulas
JP2006039847A (en) * 2004-07-26 2006-02-09 Canon Inc Data search method and device, program, and readable memory
JP2013015961A (en) * 2011-07-01 2013-01-24 Casio Comput Co Ltd Calculation device and program

Similar Documents

Publication Publication Date Title
Collard et al. srcml: An infrastructure for the exploration, analysis, and manipulation of source code: A tool demonstration
Eriksson et al. Generation of knowledge-acquisition tools from domain ontologies
US8429525B2 (en) Method and system for reversible design tree transformations
US20020178184A1 (en) Software system for biological storytelling
US20080276219A1 (en) Apparatus and method for providing a condition builder interface
JPH05324713A (en) Method and system for natural language processing
JPH0675937A (en) Simulation model generating device
Appeldorn et al. Delta-driven collaborative modeling.
JP2007011507A (en) Display method of program tree and program generation system
Grundy et al. Providing integrated support for multiple development notations
Blum Documentation for maintenance: a hypertext design
JP3759630B2 (en) Development support system for spiral object-oriented software
JPH11184687A (en) Software document preparation system using hierarchical structure and relationship of software document and operation method of the system
Wendel Position: Meeting the promise of blocks-as-AST-nodes editing with “Typeblocking”
JP3299259B2 (en) Program structure diagram editing processing method
JPH1153391A (en) Database access method
Jones An example-based introduction to graph grammars for modeling
Butting et al. Model and Data Differences in an Enterprise Low-Code Platform
Zündorf et al. Story driven modeling
Wang et al. The development of Phedias: a CASE Shell
Vysoký et al. INGRID: Creating Languages in MPS from ANTLR Grammars
US20050273329A1 (en) Speech recognition grammar creating apparatus, speech recognition grammar creating method, program for implementing the method, and storage medium storing the program
Johanna Generating Coding Exercises for Language Concepts by Searching, Simplifying, and Annotating Existing Code
JP3824468B2 (en) Data management system
JP3584204B2 (en) Automatic source program converter