JP3943909B2 - Simulation device based on extended Petri net - Google Patents
Simulation device based on extended Petri net Download PDFInfo
- Publication number
- JP3943909B2 JP3943909B2 JP2001352271A JP2001352271A JP3943909B2 JP 3943909 B2 JP3943909 B2 JP 3943909B2 JP 2001352271 A JP2001352271 A JP 2001352271A JP 2001352271 A JP2001352271 A JP 2001352271A JP 3943909 B2 JP3943909 B2 JP 3943909B2
- Authority
- JP
- Japan
- Prior art keywords
- token
- transition
- place
- input
- simulation
- 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.)
- Expired - Lifetime
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、トラックの配送や工場における製品の流れのような離散事象システムをシミュレーションするための拡張ペトリネットに基づくシミュレーション装置に関するものである。
【0002】
【従来の技術】
トラックの配送や工場における製品の流れは、一般に離散事象システムとして表わされる。離散事象システムをモデル化する手法としてペトリネットが知られている。
ペトリネット(Petri Net)は、1962年ドイツのC.A.Petriによって提案され、非同期的かつ並列的に振舞う離散事象システムをグラフィカルにモデル化・解析する手法である。ペトリネットは、「トークン」、「プレース」、「トランジション」、および「アーク」と呼ばれる簡単な4つの構成要素からなり、製品、置場、機械、およびルートにそれぞれ対応していると考えられる。トランジションがトークンを生成・消滅させる事象は「発火」と呼ばれている。
【0003】
基本的な発火ルールは、トランジションから見て入力側に接続されているプレース(以下、「入力プレース」と記載する。)にアーク本数以上のトークンが揃った時に発火し、入力プレースからアーク本数のトークンが消滅して、出力側に接続されているプレース(以下、「出力プレース」と記載する。)にアーク本数のトークンが生成される、というものである。例えば、図2に示すペトリネットでは、トランジションT1から見て入力側に接続されているプレースP1に1個以上、プレースP2に2個以上のトークンが存在しているため発火が起こり、図3に示すように、プレースP1から1個、プレースP2から2個のトークンが消滅して、プレースP3に3個、プレースP4に1個のトークンが生成される。このような単純なペトリネットは、特に、「単純ペトリネット」あるいは「基本ペトリネット」と呼ばれている。
【0004】
このような単純ペトリネットでは、工場の生産ラインのような複雑な物流システムを記述することは困難であるため、最近では、さまざまな拡張がなされたペトリネットが提案されている。このようなペトリネットを、総称して「拡張ペトリネット」と呼ぶ。
【0005】
「Design/CPN」と呼ばれるソフトウェアや特開平4−13095号公報、特開平6−149773号公報、および特開平10−334075号公報に記載されている拡張ペトリネットでは、トークンに属性を持たせることができ、トークン属性を用いて発火ルールをユーザが自由に記述することができる。さらに、トークンが生成されてから、次に発火するまでの遅延時間を定義することもできる。
【0006】
特開平10−334075号公報に記載の拡張ペトリネットでは、発火処理手段において、作成されたペトリネットを基にシミュレーションを実行し、トークンの生成・消滅を行っている。上記発火処理手段の動作を示すフローチャートを図4に示す。
メモリ初期化処理401で、シミュレーションに必要なメモリの確保と初期化を行う。発火処理手段が管理するメモリを表1に示す。
【0007】
【表1】
【0008】
上記表1に示すメモリを確保して、シミュレーション時刻を初期時刻に設定し、トークン組み合わせのリストを空にし、作成されたペトリネットからプレースリストとトランジションリストとを作成する。
また、各プレースと各トランジションに対して、それぞれ表2、表3に示すようなメモリを確保し、作成されたペトリネットに基づき初期化する。
【0009】
【表2】
【0010】
【表3】
【0011】
ただし、上記表2に示すメモリのトークンリストは空に初期化する。
初期マーキング処理402では、全プレースに対して設定されているトークンを生成し、上記表2に示すメモリのトークンリストに追加する。
【0012】
発火可能トランジション検索処理403の処理を示すフローチャートを図5に示す。まず、入力アーク処理501において、トランジションの入力アークに設定されているカラー名(トークンの種別を表す名称)を持つトークンを対応する入力プレースから探し、対応する入力トークン変数とする。このトークンを発火可能トークンと呼ぶ。
【0013】
全ての入力アークにおいて発火可能トークンが存在していれば(502)、発火ルール処理503において、出力アークに設定されているカラー名を持つトークンを作成して出力トークン変数とし、トランジション毎に設定されている発火ルールを実行する。この際、“0”以外の値が返された(returnされた)ときには(504)、発火可能と判断し、トークン組み合わせリスト登録処理505において、表4に示すトークン組み合わせデータを発火処理手段が管理する上記表1に示したメモリに登録する。この際、優先順位を示す変数priorityに値が設定されている時には、表4の優先順位にそのまま書き込み、値が設定されていないときには、乱数により適当な値を決めて、それを表4の優先順位に書き込む。
【0014】
【表4】
【0015】
そして、次組み合わせ作成処理506において、今までに処理していない入力トークンの組み合わせを求め、全ての入力トークンの組み合わせを処理していなかった場合には(507)、再度入力アーク処理501に戻り、全ての入力トークンの組み合わせが処理されるまで上記処理501〜506を繰り返す。
【0016】
【発明が解決しようとする課題】
さて、図6に示すように1台の無人搬送台車(以下、「AGV」と記載する。)により製品を搬送する物流システムを拡張ペトリネットで記述することを考える。図6において、スキッドskid1〜skid4は荷積み・荷降し場であり、AGVの走行路はゾーンzone1〜zone5に分割管理されている。特開平10−334075号公報に記載の拡張ペトリネットで図6に示す物流システムを記述すると図7に示すようになる。
【0017】
ここで、ステートプレースstateは、本来1つであるが、アークの重なりを防ぐために別々に4つ記載している。また、矢印が両側に付いているアークは、接続しているトランジションが発火しても、トークンが入力プレースから削除されないことを意味している(矢印が片側だけ付いているアークは、単純ペトリネットと同様に、トランジションが発火したら、トークンが入力プレースから削除される)。トークンは、AGVトークンとステートトークン(以下、「Stateトークン」と記載する。)との2種類が存在し、その属性を表5と表6にそれぞれ示す。
【0018】
【表5】
【0019】
【表6】
【0020】
図7において、各ゾーンプレースzone1〜zone5とスキッドプレースskid1〜skid4にはAGVトークンのみ入り、ステートプレースstateにはStateトークンが入る。各トランジションの詳細な発火ルールは省略するが、例えば、トランジションmove3であれば、AGVの行先がスキッドプレースskid2のみ発火可能となるように発火ルールを設定する必要がある。
【0021】
図7に示すトランジションload1の入力アークのみに発火可能なトークンが斜体で記載してある。すなわち、トランジションload1の発火には、スキッドプレースskid1に1つのAGVトークンと、ステートプレースstateに1つのStateトークンとを必要とする。トランジションload2、load3、load4の入力アークには発火可能なトークンを記載していないが、トランジションの発火には同様に、1つのAGVトークンと1つのStateトークンとを必要とする。
【0022】
次に、特開平10−334075号公報に記載の拡張ペトリネットにおける発火処理手段の問題点を説明する。当該発火処理手段では、図5に示した入力アーク処理501において、全てのトランジションの全ての入力プレースに発火可能なトークンが存在するか否かを調べている。すなわち、全てのトランジションに対して、発火可能性の判断を行う必要がある。例えば、図7に示す例では、トランジションload1〜load4、unload1〜unload4、move1〜move8の計16個のトランジションに対して、発火可能性を判断する必要がある。図7は非常に単純なケースであるが、大規模なケースになると、かなりの計算時間を要するという欠点がある。
【0023】
そこで、本発明は、上記の欠点を解消し、少ない計算時間でシミュレーション可能とする手段を提供することを目的としている。
【0024】
【課題を解決するための手段】
本発明の拡張ペトリネットに基づくシミュレーション装置は、離散事象システムをシミュレーションするためのコンピュータシステムを用いた拡張ペトリネットに基づくシミュレーション装置であって、シミュレーションに必要な情報および命令を入力する入力手段と、上記入力手段に対するユーザの操作に基づいた上記入力手段からの入力に従って、プレース、トランジション、およびアークを入力して離散事象システムの拡張ペトリネットモデルを作成するモデル作成手段と、上記モデル作成手段により作成された拡張ペトリネットモデルを出力装置に表示する表示手段と、上記モデル作成手段により作成された拡張ペトリネットモデルを記録装置に記録する記録手段と、上記記録装置に記録された拡張ペトリネットモデルのシミュレーションを実行するシミュレーション計算手段と、上記シミュレーション計算手段により実行したシミュレーションの実行結果を上記出力装置および記録装置の少なくとも一方に出力する出力手段と、を備え、上記出力装置はディスプレイを含み、上記記録装置はメモリおよびディスクを含み、上記モデル作成手段は、さらに、トークン毎に上記入力手段を介してユーザからトークン変数名および属性名の指定を受け属性を定義するとともに、定義されたトークンの属性を用いてトランジションの発火ルールを設定し、かつ、トランジション発火時に、入力プレースに存在するトークンを削除するか否かを、当該入力プレースに接続するアークの種類に応じてプレース毎に設定する手段を有し、上記シミュレーション計算手段は、上記トークンを削除する設定を行っている入力プレースに接続するアークと、上記トークンを削除しない設定を行っている入力プレースに接続するアークとが共に入力アークとして1つのトランジションに接続されているとき、アークを介して当該トランジションに接続された上記トークンを削除する設定を行っている入力プレースの少なくとも1つに発火可能なトークンが存在しない場合には、当該トランジションと上記トークンを削除しない設定を行っている入力プレースとの関連を切断し、アークを介して当該トランジションに接続された上記トークンを削除する設定を行っているすべての入力プレースに発火可能なトークンが存在する場合には、当該トランジションと上記トークンを削除しない設定を行っている入力プレースとの関連を接続する自動切断接続手段を有し、シミュレーション進行時には、通常のトランジション発火処理に加えて、上記自動切断接続手段により上記トランジションと上記入力プレースとの関連を切断あるいは接続する切断・接続処理を実行し、発火可能なトランジションがなくなるまで当該発火処理と当該切断・接続処理とを繰り返してシミュレーションの実行結果を求めることを特徴とする。
【0026】
【発明の実施の形態】
以下、本発明の一実施形態を図面に基づいて説明する。
本発明の実施形態の一例を図1に示す。なお、図1は、本発明を実施する際に必要となる装置、機能のみを記載しており、プリンターやテープドライブなどの周辺装置を付加しても、実施形態としての違いは無い。
【0027】
図1において、コンピュータ本体101は、CPU106とメモリ107等を有する汎用コンピュータであり、本実施形態では本発明はメモリ107上に記録されたソフトウェアとして実施される。本発明のシミュレーション装置は、キーボード103やポインティングデバイス104を用いて、拡張ペトリネット形式でシミュレーションモデルをモデル作成手段116に入力する。
【0028】
モデル作成手段116は、ペトリネット図編集手段117によりプレース・トランジション・アークを入力してペトリネット図を作成し、初期マーキング設定手段121によりシミュレーション開始時のトークンの配置を設定する。さらに、モデル作成手段116は、発火ルール設定手段118によりトランジションの発火ルールを設定し、発火優先順位設定手段110により発火の優先順位を設定する。
【0029】
作成された拡張ペトリネットは、モデル記録手段120によりメモリ107内に記録され、モデル表示手段119によりディスプレイ102に表示される。シミュレーション計算手段114は、メモリ107に記録された拡張ペトリネットに基づきシミュレーションを実行し、その実行結果をメモリ107やディスク105に記録するとともに、トークンの動き回る様子をディスプレイ102に表示する。
【0030】
シミュレーション計算手段114において、図中の「●」は複数の関連があることを意味している。例えば、発火処理手段111とトランジション108との間におけるトランジションの「●」は、複数のトランジションが存在し、発火処理手段111は複数のトランジションと関連があることを示している。
【0031】
アーク関連自動切断・接続手段122は、現在のトークン配置からトランジションと入力プレースとの関連を切断・接続する。具体的には、アーク関連自動切断・接続手段122は、全てのトークン113からトークンが存在する全てのプレース109を求め、さらに、それらのプレースを入力プレースとする全てのトランジション108を求める。それらの各トランジション108に対し、発火ルール設定手段118で設定された発火ルールと、発火優先順位設定手段110で設定された発火の優先順位とに基づいて所定の処理を行い、全ての発火可能トークンの組み合わせ112を作成する。発火処理手段111は、計算により得られた発火優先順位の高い順番にトランジションを発火させ、入力プレースからトークンを削除し、出力プレースにトークンを送る。上述した処理を繰り返し行うことにより、拡張ペトリネットのシミュレーションを行う。
【0032】
以下、図面を参照して本発明の実施例について詳細に説明する。
なお、以下では、図6に示したAGVを用いて製品を搬送する物流システムと、図6の物流システムを拡張ペトリネットで記述した図7とを一例として説明する。
【0033】
本発明による拡張ペトリネットに基づくシミュレーション装置を実行(起動)すると、図8に示すようなウィンドウ801がディスプレイ102に表示される。ウィンドウ801は、ウィンドウ801の移動や拡大縮小を行うためのタイトルバー802と、さまざまな操作を行うためのメニューボタンを有するメニューバー803と、ペトリネットを作成したり表示したりするためのキャンバス804と、キャンバス804を上下左右にスクロールさせるためのスクロールバー814と、ペトリネット部品を選択するための部品リスト805とから構成される。
【0034】
メニューバー803は、ファイルの入出力や印刷等を行うための「File」メニューボタン806と、ブロックやアークの移動およびカット&ペースト(切り取って貼り付ける操作)等を行うための「Edit」メニューボタン807と、シミュレーションの実行開始や停止、再開等を行うための「Simulation」メニューボタン808と、トークンの属性定義を行うための「Color」メニューボタン809とから構成されている。
【0035】
部品リスト805は、ペトリネット部品として、プレース部品810と、トランジション部品811と、単方向アーク部品812と、双方向アーク部品813とから構成されている。ここで、あるトランジションが発火した際、単方向アーク部品812で接続されている入力プレースからはトークンが削除され、双方向アーク部品813で接続されている入力プレースからはトークンは削除されない。
【0036】
ペトリネットを作成するときには、部品リスト805からペトリネット部品を選択し、選択した状態でキャンバス804に移動させる、つまりキャンバス804にドラッグ&ドロップすることにより行う。部品の移動およびカット&ペーストなどは、市販のドローツールのような操作方法で行うことができる。このような操作を行うことにより、図7に示すようなペトリネットをキャンバス804上に作成することができる。
【0037】
次に、トークンの属性を定義(以下、「カラー定義」とも呼ぶ。)する方法について説明する。
図8に示す「Color」メニューボタン809を選択すると、図9に示すような空の(まったく何も入力されていない)カラー定義ウィンドウが表示される。このカラー定義ウィンドウ内には、任意の文字を入力することができ、ユーザは次の書式でトークンの属性を定義する。
カラー名(属性1の型 属性1の名前,属性2の型 属性2の名前,...);
【0038】
ここで、カラー名とは異なる種類のトークン同士を識別するための名前である(例えば、図7においては“AGV”または“State”)。図7に示すペトリネットの場合には、AGVトークンとStateトークンとは、表5・表6の属性をそれぞれ持つので、カラー定義ウィンドウに
AGV(String to);
State(String cur[8], String next[8]);
のように設定する。
【0039】
ここで、「String」は、文字列型(データ)を表す属性である。「to」は、AGVが行先(移動中)もしくは現在位置(停止中)を表す属性である。「cur[8]」は、各製品の搬送元(搬送前)もしくは搬送先(搬送中および搬送後)を表す属性、「next[8]」は、各製品の搬送先を表す属性である。製品は全部で8つあり、i番目の製品の搬送元(搬送中および搬送後は搬送先)は、Stateトークンの「cur[i]」、搬送先はStateトークンの「next[i]」で表される。
【0040】
シミュレーションを実行する際には、初期マーキング(シミュレーション開始時のトークン配置)を設定する必要がある。初期マーキングは、プレース毎に行う。キャンバス804上に表示された各プレース部品をダブルクリックすると、図10に示すような空のプレース定義ウィンドウが表示される。このプレース定義ウィンドウ内には、任意の文字を入力することができ、ユーザは次の書式でそのプレースの初期マーキングを指定することができる。
個数*カラー名(属性値1,属性値2,....);
【0041】
図7に示すペトリネットの場合には、初期マーキングは、スキッドプレースskid1にAGVトークン、ステートプレースstateにStateトークンであるため、スキッドプレースskid1のプレース定義ウィンドウには、以下の初期マーキングを設定するものとする。
1*AGV("skid1");
また、ステートプレースstate(図7に示すペトリネットにおいては、見掛け上4つあるが実体は1つである)のプレース定義ウィンドウには、以下の初期マーキングを設定するものとする。
1*State(["skid1", "skid1", "skid2", "skid2", "skid3", "skid3", "skid4", "skid4"],
["skid2", "skid3", "skid3", "skid4", "skid4", "skid1", "skid2", "skid3"]);
【0042】
ここで、この例では、図6に示すように製品は8つあり、それぞれ搬送先が指定されている。例えば、製品1は搬送元がスキッドプレースskid1で、搬送先がスキッドプレースskid2である。
【0043】
最後に、トランジションの発火ルールを設定する。各トランジションの発火ルールの設定は、アーク定義とトランジション定義とにより行う。
アーク定義とは、各トランジションの入力側に接続されているアークと出力側に接続されているアークとに、そのトランジションで発火する入出力トークンの個数およびカラー名と、トークンを参照するためのトークン変数名とを設定するものである。キャンバス804上に表示された設定したいアークをダブルクリックすると、図11に示すような空のアーク定義ウィンドウが表示され、アーク定義ウィンドウ内に、以下のような書式で、接続されているトランジションで発火するトークンの個数、カラー名およびトークン変数名を指定する。
個数*カラー名 トークン変数名
【0044】
ここで、トークン変数名とは、発火ルールを記述する際に複数のトークンを区別するための識別名である。特に、入力アークに設定されたトークン変数を「入力トークン変数」、出力アークに設定されたトークン変数を「出力トークン変数」と呼ぶこととする。
【0045】
例えば、図7に示すトランジションload1が発火するには、スキッドプレースskid1にAGVトークンが1つ存在し、ステートプレースstateにStateトークンが1つ存在する必要があるので、トランジションload1とスキッドプレースskid1とを結ぶアークのアーク定義ウィンドウに、
1*AGV agv1
と設定する。同様に、トランジションload1とステートプレースstateとを結ぶアークのアーク定義ウィンドウに、
1*State state
と設定する。
【0046】
また、トランジションload1が発火した際には、ゾーンプレースzone1にはAGVトークンが発生する必要があるので、トランジションload1とゾーンプレースzone1とを結ぶアークのアーク定義ウィンドウに、
1*AGV agv2
と設定する。このように、AGVトークンは入力側と出力側とで異なるトークン変数名を付けて区別している。
【0047】
トランジション定義により、トランジションの発火ルールの詳細を記述できる。また、トランジション定義は発火優先順位設定手段110も同時に兼ねている。キャンバス804上に表示された各トランジションをダブルクリックすると、図12に示すようなトランジション定義ウィンドウが表示され、トランジション定義ウィンドウ内に、文字入力で任意のトランジションの発火ルールを記述することができる。
【0048】
トランジション定義ではC++言語と同じ書式を利用することができ、例えば、戻り値として“0”が返される(“0”の値がreturnされる)と、発火条件が成立しないことを意味し、戻り値として“0”以外が返される(“0”以外の値がreturnされる)と、発火条件が成立したことを意味する。また、特別な変数として「priority」があり、「priority」に本発明に係わる発火優先順位を設定することができる。ただし、「priority」に優先順位を代入(設定)しなくても良く、この場合には暗黙的に乱数が代入されたとみなす。
【0049】
図7に示すペトリネットの場合には、トランジションload1のトランジション定義ウィンドウには、
と記述する。このように、トークンの属性は
トークン変数名.属性名
の形式でアクセスすることができる。
【0050】
完成したペトリネットを図13に示す。ここでは、図7に示すような簡単なペトリネットに関して説明したが、複雑なペトリネットでも同様の操作を行うことにより作成することができる。
【0051】
次に、発火処理手段111について説明する。
発火処理手段111は、作成されたペトリネットを基にシミュレーションを実行してトークンの生成および消滅を行う。発火処理手段111の動作を示すフローチャートを図14に示す。
メモリ初期化処理401では、シミュレーションに必要なメモリの確保と初期化を行う。発火処理手段111が管理するメモリを表7に示す。
【0052】
【表7】
【0053】
上記表7に示すメモリは、上記表1に示した発火処理手段管理メモリと比べて、トークンのリスト(以下、「トークンリスト」と呼ぶ。)が追加されている。上記表7に示すメモリを確保して、シミュレーション時刻を初期時刻に設定し、トークン組み合わせリストとトークンリストとをそれぞれ空にし、作成されたペトリネットからプレースリストとトランジションリストとを作成する。
また、各プレースと各トランジションに対して、上記表2に示すプレース管理メモリ、上記表3に示すトランジション管理メモリ、および表8に示すトークン管理メモリをそれぞれ確保し、作成されたペトリネットに基づき初期化する。
【0054】
【表8】
【0055】
ただし、表2に示すプレース管理メモリ内のトークンリストは空に初期化する。また、表8に示すトークン管理メモリは、トークンが存在するプレースをトークン毎に記述している。
上記図7に示す例の場合には、発火処理手段111管理メモリは表9に示すようになり、プレース管理メモリは表10に示すようになり、トランジション管理メモリは表11に示すようになる。
【0056】
【表9】
【0057】
【表10】
【0058】
【表11】
【0059】
初期マーキング処理402では、全プレースに対してプレース定義ウィンドウに設定されたトークン個数、カラー名および属性に基づいてトークンを生成し、上記表7に示した発火処理手段111管理メモリ内のトークンリストと、上記表2に示したプレース管理メモリ内のトークンリストに追加する。また、各トークンが存在するプレースを表8に示したトークン管理メモリに追加する。
上記図7に示す例では、上記表2に示したプレース管理メモリは表12に示すようになり、上記表8に示したトークン管理メモリは表13に示すようになる。
【0060】
【表12】
【0061】
【表13】
【0062】
このように、表10に示すプレース管理メモリに比べて、表12に示すプレース管理メモリでは、ステートプレースstateにStateトークン、スキッドプレースskid1にAGVトークンが追加されている。
【0063】
アーク関連自動切断・接続処理1401では、トークンが存在するプレースを入力プレースとするトランジションが、双方向アーク部品813で接続されているときには、そのトランジションの他のアークを調べ、単方向アーク部品812でプレースと接続されているときには、そのプレースにトークンがなければ、双方向アーク部品813で接続されているプレースのプレース管理メモリ(表2)の出力トランジションリストから、そのトランジションを削除する。
例えば、図7に示す例の場合には、プレース管理メモリは表12から表14に示すように変化する。
【0064】
【表14】
【0065】
このように、ステートプレースstateの出力トランジションから、トランジションload2、load3およびload4が削除されている。すなわち、ステートプレースstateとトランジションload2〜load4との関連が削除されている。
【0066】
発火可能トランジション検索処理403は、図15に示すフローチャートに従って実施される。
まず、処理1501では、トークンが存在するプレースを入力プレースとするトランジション(以下、「発火可能性を調べるトランジション」と記載する。)を1つ選択する。本実施例の場合、トークン管理メモリは表13に示すようになっているため、トークンが存在するプレースは、スキッドプレースskid1とステートプレースstateとの2つであることがわかる。また、プレース管理メモリは表14に示すようになっており、スキッドプレースskid1とステートプレースstateとの出力トランジションには共にトランジションload1が設定されているので、発火可能性を調べるトランジションはトランジションload1のみになる。
【0067】
ここで、もし、アーク関連自動切断・接続処理1401を用いていない場合には、プレース管理メモリは表12に示されるままである。したがって、ステートプレースstateに関連する出力トランジションは、トランジションload1、load2、load3、およびload4であり、スキッドプレースskid1に関連する出力トランジションはトランジションload1であるため、発火可能性を調べるトランジションはトランジションload1、load2、load3、およびload4の4つとなってしまう。
【0068】
次に、処理1502では、処理1501にて選択された発火可能性を調べるトランジションに対して、トランジションの入力アークのアーク定義ウィンドウに記述されているカラー名を持つトークンを対応する入力プレースから探し、対応する入力トークン変数とする。このトークンを発火可能トークンと呼ぶ。
【0069】
全ての入力アークにおいて発火可能トークンが存在していれば(1503)、発火ルール処理503において、出力アークのアーク定義ウィンドウに記述されているカラー名を持つトークンを作成して出力トークン変数とし、トランジション定義ウィンドウに記述されている発火ルールを実行する。この際、戻り値として“0”以外が返されたときには(504)、発火可能と判断し、トークン組み合わせリスト登録処理505において、表4に示すトークン組み合わせデータを発火処理手段111が管理する上記表7に示すトークン組み合わせリストに登録する。この際、優先順位を示す変数priorityに値が設定されているときには、表4の優先順位にそのまま書き込み、値が設定されていないときには、乱数により適当な値を決めて、それを表4の優先順位に書き込む。
【0070】
複数のトークンが入力プレースに存在する場合には、別のトークンの組み合わせも存在するため、次組み合わせ作成処理506にて、次のトークンの組み合わせを求め、処理1502に戻り上述した処理と同様の処理を行う。
【0071】
1つの発火可能性を調べるトランジションに対して、全てのトークンの組み合わせが得られた場合には(507)、発火可能性を調べるトランジションが残っているか否かを調べる。その結果、発火可能性を調べるトランジションがある場合には、処理1501に戻り、発火可能性を調べるトランジションがなくなるまで、上述した処理と同様の処理を繰り返す。
【0072】
例えば、図7に示すペトリネットの場合には、トランジションload1が発火可能となり、表15に示すようなトークン組み合わせが、表7に示す発火処理手段111管理メモリ内のトークン組み合わせリストに登録されることになる。
【0073】
【表15】
【0074】
ここで、図7に示す例では、優先順位が指定されていないため、乱数で優先順位が選ばれる。したがって、乱数系列によっては、上記表15に示すようになるとは限らない。
図14に戻り、トークン組み合わせ並べ替え処理404では、上記表15のトークン組み合わせリストを優先順位が高い順番(降順)に並べ替える。上記表15を並べ替えると表16に示すようになる。
【0075】
【表16】
【0076】
マーキング変更処理405では、トークン組み合わせ並べ替え処理404により優先順位が高い順に並べ替えられたトークン組み合わせリストの先頭から順番に、リストに登録されているトランジションの入力プレースから入力トークンを削除して、出力プレースへ出力トークンを発生させる。入力プレースはトークンリストから削除すべきトークンを検索して、そのトークンをトークンリストから抜き出し、使用していたメモリを解放する。出力プレースでは新たに送られたトークンをトークンリストに登録する。
【0077】
トークンを削除する際、トークン組み合わせリストを調べ、その結果、削除するトークンがそのリストに登録されているときには、その要素をリストからも削除する。さらに、表7に示す発火処理手段111管理メモリ内のトークンリストの更新も同時に行う。このような処理をトークン組み合わせリストが空になるまで繰り返すことにより、マーキングの変更を行う。
【0078】
例えば、表16に示すトークン組み合わせリストの最初の行を処理する。つまり、トランジションload1が発火して、AGV("skid1")がスキッドプレースskid1から削除され、AGV("skid3")がゾーンプレースzone1に出力される。また、Stateトークンの属性は、以下のように変化する。AGVが製品2を搬送してスキッドプレースskid3へと移動することになったため、cur[2]が、“skid1”から“skid3”に変わる。
State(["skid1", "skid3", "skid2", "skid2", "skid3", "skid3", "skid4", "skid4"],
["skid2", "skid3", "skid3", "skid4", "skid4", "skid1", "skid2", "skid3"]);
【0079】
AGVトークンがスキッドプレースskid1からゾーンプレースzone1に移ったことにより、表16に示すトークン組み合わせリストは空になる。また、表14に示すプレース管理メモリは、表17に示すようになる。表14に示したプレース管理メモリと比較すると、AGVトークンがスキッドプレースskid1からゾーンプレースzone1に移っている。
【0080】
【表17】
【0081】
また、表13に示したトークン管理メモリは、表18に示すようになる。
【0082】
【表18】
【0083】
マスキング変更処理405を行った後、再度、アーク関連自動切断・接続処理1401に戻り、上述した処理と同じ処理を行う。上述した例では、トランジションload1の入力プレースであるスキッドプレースskid1にトークンがなくなったため、自動的にステートプレースstateとトランジションload1との関連が切断され、表17に示すプレース管理メモリは表19に示すようになる。このように、ステートプレースstateの出力トランジションは空となる。
【0084】
【表19】
【0085】
以降、同様の処理を繰り返し、発火可能トランジションがなくなるまで繰り返す。
【0086】
シミュレーションの途中で、AGVがスキッドプレースskid3に到着すると、アーク関連自動切断・接続処理1401により、トークンが存在するプレースを入力プレースとするトランジションが、双方向アーク部品813で接続されているときには、そのトランジションの他のアークを調べ、単方向アーク部品812でプレースと接続されているときには、そのプレースに発火可能トークンがあれば、双方向アーク部品813で接続されているプレースのプレース管理メモリ(表2)の出力トランジションリストに、そのトランジションを登録する。図7に示す例では、AGVがスキッドプレースskid3に到着した後のプレース管理メモリは表20に示すようになる。
【0087】
【表20】
【0088】
表20においては、ステートプレースstateとトランジションload3との関連が接続されている。この場合、発火可能トランジション検索処理403で調べるトランジションは、トランジションload3のみとなる。
【0089】
以上説明したペトリネットでは時間の概念は存在せず、新たに生成されたトークンはすぐに発火可能となる。なお、時間の概念を導入することも可能であり、トークンが生成されてからユーザが指定したある時間後に発火可能となるような、発火遅延時間を持つ拡張ペトリネットとすることも容易にできる。例えば、ある時刻で発火可能なトランジションがなくなると、発火不可となっているトークンが発火可能に変わる時刻の中で、最も小さい時刻までシミュレーション時刻を進め(シミュレーション時刻更新処理406)、上記処理を繰り返し行い、最終的に終了時刻まで行えば良い。
【0090】
【発明の効果】
以上、説明したように、本発明によれば、シミュレーションにて発火可能性を判断する際、トークンがいずれの配置であったとしても、発火可能トランジションを適切に1つだけ選択し、1つのトランジションの発火可能性を判断するだけで済むので、少ない計算時間でシミュレーションを行うことができる。例えば、図7に示す実施例の場合には、従来においては、発火可能性を判断するために調べるトランジションは、トランジションload1〜load4、unload1〜unload4、move1〜move8の16個となるが、本発明では、1つのトランジションで済むので、計算時間を短縮することができる。特に、大規模なペトリネットになるほど、従来と比較して高い効果を得ることができる。
【図面の簡単な説明】
【図1】本発明による拡張ペトリネットに基づくシミュレーション装置のシステム構成例を示すブロック図である。
【図2】単純ペトリネット(発火前)の一例を示す図である。
【図3】単純ペトリネット(発火後)の一例を示す図である。
【図4】従来の発火処理手段の動作を示すフローチャートである。
【図5】従来の発火可能トランジション検索処理を示すフローチャートである。
【図6】無人搬送台車による物流システムの一例を示す図である。
【図7】図6に示した物流システムの拡張ペトリネットを示す図である。
【図8】本発明による拡張ペトリネットに基づくシミュレーション装置実行直後に表示されるウィンドウを示す図である。
【図9】カラー定義ウィンドウを示す図である。
【図10】プレース定義ウィンドウを示す図である。
【図11】アーク定義ウィンドウを示す図である。
【図12】トランジション定義ウィンドウを示す図である。
【図13】本発明によるシミュレーション装置で作成した拡張ペトリネットを示す図である。
【図14】図1に示した発火処理手段111の動作を示すフローチャートである。
【図15】図14に示す発火可能トランジション検索処理を示すフローチャートである。
【符号の説明】
101 コンピュータ本体
102 ディスプレイ
103 キーボード
104 ポインティングデバイス
105 ディスク
106 CPU
107 メモリ
108 トランジション
109 プレース
110 発火優先順位設定手段
111 発火処理手段
112 発火トークン組み合わせ
113 トークン
114 シミュレーション計算手段
115 トークン属性
116 モデル作成手段
117 ペトリネット図編集手段
118 発火ルール設定手段
119 モデル表示手段
120 モデル記録手段
121 初期マーキング設定手段
122 アーク関連自動切断・接続手段
401 メモリ初期化処理
402 初期マーキング処理
403 発火可能トランジション検索処理
404 トークン組み合わせ並べ替え処理
405 マーキング変更処理
406 シミュレーション時刻更新処理
501 入力アーク処理
503 発火ルール処理
505 トークン組み合わせリスト登録処理
506 次組み合わせ作成処理
801 拡張ペトリネットを作成・実行するウィンドウ
802 タイトルバー
803 メニューバー
804 キャンバス
805 部品リスト
806 「File」メニューボタン
807 「Edit」メニューボタン
808 「Simulation」メニューボタン
809 「Color」メニューボタン
810 プレース部品
811 トランジション部品
812 単方向アーク部品
813 双方向アーク部品
814 スクロールバー
1301 カラー定義ウィンドウ
1302 スキッドプレースskid1のプレース定義ウィンドウ
1303 ステートプレースstateのプレース定義ウィンドウ
1304 ステートプレースstateとトランジションload1とを結ぶアークのアーク定義ウィンドウ
1305 スキッドプレースskid1とトランジションload1とを結ぶアークのアーク定義ウィンドウ
1306 トランジションload1とゾーンプレースzone1とを結ぶアークのアーク定義ウィンドウ
1307 トランジションload1のトランジション定義ウィンドウ
1401 アーク関連自動切断・接続処理
1501 発火可能性を調べるトランジション選択処理
1502 入力アーク処理[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a simulation apparatus based on an extended Petri net for simulating discrete event systems such as truck delivery and product flow in factories.
[0002]
[Prior art]
Truck delivery and product flow in factories are generally represented as discrete event systems. Petri nets are known as a method for modeling discrete event systems.
Petri Net was founded in 1962 by German C.I. A. This is a technique for modeling and analyzing a discrete event system proposed by Petri and behaving asynchronously and in parallel. Petri nets are composed of four simple components called “tokens”, “places”, “transitions”, and “arcs”, and are considered to correspond to products, locations, machines, and routes, respectively. The event that a transition generates and extinguishes a token is called "ignition".
[0003]
The basic firing rule is to fire when more than the number of arcs is collected in the place connected to the input side (hereinafter referred to as “input place”) when viewed from the transition, and the number of arcs is determined from the input place. The token is extinguished and a token having the number of arcs is generated in a place connected to the output side (hereinafter referred to as “output place”). For example, in the Petri net shown in FIG. 2, since one or more tokens exist in the place P1 connected to the input side as viewed from the transition T1 and two or more tokens exist in the place P2, firing occurs, and FIG. As shown, one token from the place P1 and two tokens from the place P2 disappear, and three tokens are generated in the place P3 and one token in the place P4. Such a simple Petri net is particularly called a “simple Petri net” or a “basic Petri net”.
[0004]
In such a simple Petri net, it is difficult to describe a complicated physical distribution system such as a production line of a factory. Recently, Petri nets with various extensions have been proposed. Such Petri nets are collectively referred to as “extended Petri nets”.
[0005]
In the software called “Design / CPN” and the extended Petri net described in JP-A-4-13095, JP-A-6-149773, and JP-A-10-334075, the token has an attribute. The user can freely describe firing rules using token attributes. Furthermore, it is possible to define a delay time from when a token is generated until the next firing.
[0006]
In the extended Petri net described in Japanese Patent Application Laid-Open No. 10-334075, the ignition processing means executes a simulation based on the created Petri net, and generates and extinguishes tokens. A flowchart showing the operation of the ignition processing means is shown in FIG.
In the
[0007]
[Table 1]
[0008]
The memory shown in Table 1 is secured, the simulation time is set to the initial time, the token combination list is emptied, and the place list and transition list are created from the created Petri net.
In addition, for each place and each transition, a memory as shown in Table 2 and Table 3 is secured and initialized based on the created Petri net.
[0009]
[Table 2]
[0010]
[Table 3]
[0011]
However, the token list of the memory shown in Table 2 is initialized to be empty.
In the
[0012]
FIG. 5 is a flowchart showing the ignitable
[0013]
If there are fireable tokens in all the input arcs (502), the
[0014]
[Table 4]
[0015]
Then, in the next
[0016]
[Problems to be solved by the invention]
Now, as shown in FIG. 6, let us consider that a physical distribution system that transports products by one automatic guided vehicle (hereinafter referred to as “AGV”) is described by an extended Petri net. In FIG. 6, skids skid 1 to skid 4 are loading / unloading places, and the traveling path of AGV is divided and managed in
[0017]
Here, the number of state place states is originally one, but four are described separately in order to prevent arc overlap. Also, an arc with arrows on both sides means that the token is not deleted from the input place when the connected transition fires (an arc with only one side is a simple Petri net As well as the token is removed from the input place when the transition fires). There are two types of tokens, AGV tokens and state tokens (hereinafter referred to as “State tokens”), and their attributes are shown in Tables 5 and 6, respectively.
[0018]
[Table 5]
[0019]
[Table 6]
[0020]
In FIG. 7, only the AGV token is entered in each of the zone places zone1 to zone5 and the skid places skid1 to skid4, and the state token is entered in the state place state. Although detailed firing rules for each transition are omitted, for example, in the case of transition move3, it is necessary to set the firing rules so that only the AGV destination can fire the skid place skid2.
[0021]
The tokens that can be ignited only in the input arc of the
[0022]
Next, problems of the ignition processing means in the extended Petri net described in JP-A-10-334075 will be described. In the ignition processing means, in the
[0023]
Accordingly, an object of the present invention is to provide means for solving the above-described drawbacks and enabling simulation with a short calculation time.
[0024]
[Means for Solving the Problems]
The simulation device based on the extended Petri net of the present invention is a simulation device based on an extended Petri net using a computer system for simulating a discrete event system, an input means for inputting information and instructions necessary for the simulation, A model creation means for creating an extended Petri net model of a discrete event system by inputting places, transitions and arcs according to an input from the input means based on a user operation on the input means, and created by the model creation means Display means for displaying the extended Petri net model on the output device, recording means for recording the extended Petri net model created by the model creating means on the recording device, and an extended Petri net model recorded on the recording device. Simulation A simulation calculation means for executing a simulation, and an output means for outputting the execution result of the simulation executed by the simulation calculation means to at least one of the output device and the recording device, the output device including a display, The recording device includes a memory and a disk, and the model creation unit further defines an attribute by receiving a token variable name and attribute name designation from the user via the input unit for each token, and defines the attribute of the defined token. A means for setting a firing rule for a transition using, and at the time of firing a transition, whether to delete a token existing in the input place for each place according to the type of arc connected to the input place. The simulation calculation means has the token When an arc connected to an input place set to be deleted and an arc connected to an input place set not to delete the token are both connected to one transition as an input arc, If there is no ignitable token in at least one of the input places that are set to delete the token connected to the transition, the input place that is set not to delete the transition and the token If there is a token that can be fired in all input places that are set to delete the token connected to the transition via an arc, the transition and the token are deleted. The connection with the input place that is set to not When the simulation is in progress, in addition to the normal transition firing process, the automatic disconnection connection means disconnects / connects the connection between the transition and the input place by the automatic disconnection connection process. The ignition process and the disconnection / connection process are repeated until there are no possible transitions, and the simulation execution result is obtained.
[0026]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
An example of an embodiment of the present invention is shown in FIG. FIG. 1 shows only the devices and functions necessary for carrying out the present invention. Even if peripheral devices such as a printer and a tape drive are added, there is no difference as an embodiment.
[0027]
In FIG. 1, a computer
[0028]
The model creation means 116 inputs a place transition arc by the Petri net diagram editing means 117 to create a Petri net diagram, and the initial marking setting means 121 sets the token arrangement at the start of the simulation. Further, the
[0029]
The created extended Petri net is recorded in the
[0030]
In the simulation calculation means 114, “●” in the figure means that there are a plurality of relationships. For example, a transition “●” between the
[0031]
The arc-related automatic disconnection / connection means 122 disconnects / connects the association between the transition and the input place from the current token arrangement. Specifically, the arc-related automatic disconnection /
[0032]
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
In the following, the distribution system for transporting products using the AGV shown in FIG. 6 and FIG. 7 in which the distribution system in FIG. 6 is described by an extended Petri net will be described as an example.
[0033]
When the simulation apparatus based on the extended Petri net according to the present invention is executed (activated), a
[0034]
A
[0035]
The parts list 805 includes
[0036]
When creating a Petri net, a Petri net part is selected from the
[0037]
Next, a method for defining the attributes of the token (hereinafter also referred to as “color definition”) will be described.
When the “Color”
Color name (
[0038]
Here, the color name is a name for identifying different types of tokens (for example, “AGV” or “State” in FIG. 7). In the case of the Petri net shown in FIG. 7, the AGV token and the State token have the attributes shown in Tables 5 and 6, respectively.
AGV (String to);
State (String cur [8], String next [8]);
Set as follows.
[0039]
Here, “String” is an attribute representing a character string type (data). “To” is an attribute indicating that the AGV indicates a destination (moving) or a current position (stopped). “Cur [8]” is an attribute indicating the transfer source (before transfer) or transfer destination (during transfer and after transfer) of each product, and “next [8]” is an attribute indicating the transfer destination of each product. There are 8 products in total, and the i-th product's transfer source (during and after transfer) is the State token “cur [i]”, and the transfer destination is the State token “next [i]” expressed.
[0040]
When executing the simulation, it is necessary to set initial marking (token arrangement at the start of simulation). Initial marking is performed for each place. When each place part displayed on the
Number * color name (
[0041]
In the case of the Petri net shown in FIG. 7, since the initial marking is an AGV token in the skid place skid1 and a state token in the state place state, the following initial marking is set in the place definition window of the skid place skid1. And
1 * AGV ("skid1");
In addition, the following initial markings are set in the place definition window of the state place state (the apparent number is four in the Petri net shown in FIG. 7 but there is only one entity).
1 * State (["skid1", "skid1", "skid2", "skid2", "skid3", "skid3", "skid4", "skid4"],
["skid2", "skid3", "skid3", "skid4", "skid4", "skid1", "skid2", "skid3"]);
[0042]
Here, in this example, as shown in FIG. 6, there are eight products, each of which is designated as a transport destination. For example, the transport source of the
[0043]
Finally, set the firing rules for the transition. The firing rule for each transition is set by the arc definition and transition definition.
The arc definition is the number of I / O tokens and color names that are ignited in the transition connected to the input side of each transition and the arc connected to the output side, and a token for referencing the token. Variable name. When you double-click the arc you want to set displayed on the
Number * color name Token variable name
[0044]
Here, the token variable name is an identification name for distinguishing a plurality of tokens when describing the firing rule. In particular, the token variable set for the input arc is called “input token variable”, and the token variable set for the output arc is called “output token variable”.
[0045]
For example, in order for the transition load1 shown in FIG. 7 to fire, there must be one AGV token in the skid place skid1 and one State token in the state place state, so the transition load1 and skid place skid1 In the arc definition window of the connecting arc,
1 * AGV agv1
And set. Similarly, in the arc definition window of the arc connecting transition load1 and state place state,
1 * State state
And set.
[0046]
When transition load1 is ignited, it is necessary to generate an AGV token in zone place zone1, so in the arc definition window of the arc connecting transition load1 and zone place zone1,
1 * AGV agv2
And set. In this way, AGV tokens are distinguished by assigning different token variable names on the input side and output side.
[0047]
The transition definition can describe the details of the firing rules of the transition. The transition definition also serves as the firing priority setting means 110 at the same time. When each transition displayed on the
[0048]
The transition format can use the same format as the C ++ language. For example, if "0" is returned as the return value (the value of "0" is returned), it means that the firing condition is not met, and the return If a value other than “0” is returned (a value other than “0” is returned), it means that the firing condition is satisfied. Moreover, there is “priority” as a special variable, and the firing priority according to the present invention can be set in “priority”. However, it is not necessary to assign (set) the priority to “priority”. In this case, it is considered that a random number is implicitly substituted.
[0049]
In the case of the Petri net shown in FIG. 7, the transition definition window of
Is described. Thus, the token attribute is
Token variable name. Attribute name
Can be accessed in the form of
[0050]
The completed Petri net is shown in FIG. Although a simple Petri net as shown in FIG. 7 has been described here, a complex Petri net can be created by performing the same operation.
[0051]
Next, the
The
In the
[0052]
[Table 7]
[0053]
The memory shown in Table 7 has a list of tokens (hereinafter referred to as “token list”) added to the firing processing means management memory shown in Table 1 above. The memory shown in Table 7 is secured, the simulation time is set to the initial time, the token combination list and the token list are emptied, and a place list and a transition list are created from the created Petri net.
In addition, for each place and each transition, the place management memory shown in Table 2 above, the transition management memory shown in Table 3 above, and the token management memory shown in Table 8 are respectively secured, and the initial is based on the created Petri net. Turn into.
[0054]
[Table 8]
[0055]
However, the token list in the place management memory shown in Table 2 is initialized to be empty. The token management memory shown in Table 8 describes a place where a token exists for each token.
In the case of the example shown in FIG. 7, the ignition processing means 111 management memory is as shown in Table 9, the place management memory is as shown in Table 10, and the transition management memory is as shown in Table 11.
[0056]
[Table 9]
[0057]
[Table 10]
[0058]
[Table 11]
[0059]
In the
In the example shown in FIG. 7, the place management memory shown in Table 2 is shown in Table 12, and the token management memory shown in Table 8 is shown in Table 13.
[0060]
[Table 12]
[0061]
[Table 13]
[0062]
Thus, compared to the place management memory shown in Table 10, in the place management memory shown in Table 12, a State token is added to the state place state and an AGV token is added to the skid place skid1.
[0063]
In the arc-related automatic disconnection /
For example, in the example shown in FIG. 7, the place management memory changes as shown in Table 12 to Table 14.
[0064]
[Table 14]
[0065]
Thus, the transitions load2, load3, and load4 are deleted from the output transition of the state place state. That is, the relationship between the state place state and the transitions load2 to load4 is deleted.
[0066]
The ignitable
First, in the
[0067]
Here, if the arc-related automatic disconnection /
[0068]
Next, in
[0069]
If there are fireable tokens in all the input arcs (1503), in the
[0070]
If there are a plurality of tokens in the input place, there is another combination of tokens. Therefore, the next
[0071]
If all token combinations are obtained for one transition that examines the possibility of firing (507), it is examined whether or not there remains a transition that examines the possibility of firing. As a result, when there is a transition for checking the possibility of ignition, the process returns to the
[0072]
For example, in the case of the Petri net shown in FIG. 7, the transition load1 can be fired, and token combinations as shown in Table 15 are registered in the token combination list in the firing processing means 111 management memory shown in Table 7. become.
[0073]
[Table 15]
[0074]
Here, in the example shown in FIG. 7, since the priority order is not designated, the priority order is selected with a random number. Therefore, depending on the random number series, it is not always as shown in Table 15 above.
Returning to FIG. 14, in the token
[0075]
[Table 16]
[0076]
In the
[0077]
When deleting a token, the token combination list is examined. As a result, when the token to be deleted is registered in the list, the element is also deleted from the list. Furthermore, the token list in the firing processing means 111 management memory shown in Table 7 is also updated at the same time. The marking is changed by repeating such processing until the token combination list becomes empty.
[0078]
For example, the first line of the token combination list shown in Table 16 is processed. That is, the transition load1 is fired, AGV ("skid1") is deleted from the skid place skid1, and AGV ("skid3") is output to the zone place zone1. The attribute of the State token changes as follows. Since the AGV transports the product 2 and moves to the skid place skid3, cur [2] changes from “skid1” to “skid3”.
State (["skid1", "skid3", "skid2", "skid2", "skid3", "skid3", "skid4", "skid4"],
["skid2", "skid3", "skid3", "skid4", "skid4", "skid1", "skid2", "skid3"]);
[0079]
As the AGV token moves from the skid place skid1 to the zone place zone1, the token combination list shown in Table 16 becomes empty. The place management memory shown in Table 14 is as shown in Table 17. Compared with the place management memory shown in Table 14, the AGV token has moved from the skid place skid1 to the zone place zone1.
[0080]
[Table 17]
[0081]
Further, the token management memory shown in Table 13 is as shown in Table 18.
[0082]
[Table 18]
[0083]
After performing the masking
[0084]
[Table 19]
[0085]
Thereafter, the same processing is repeated until the transition that can be ignited disappears.
[0086]
When AGV arrives at skid place skid3 in the middle of the simulation, when a transition in which a place where a token exists is connected by
[0087]
[Table 20]
[0088]
In Table 20, the relationship between the state place state and the transition load3 is connected. In this case, the transition to be examined by the ignitable
[0089]
In the Petri net described above, there is no concept of time, and a newly generated token can be fired immediately. The concept of time can also be introduced, and an extended Petri net having a firing delay time that can be fired after a certain time specified by the user after the token is generated can be easily formed. For example, when there is no transition that can be fired at a certain time, the simulation time is advanced to the smallest time among the times when the token that cannot fire can be fired (simulation time update process 406), and the above process is repeated. This is done until the end time.
[0090]
【The invention's effect】
As described above, according to the present invention, when ignitability is judged by simulation, only one ignitable transition is selected appropriately regardless of the arrangement of tokens. Since it is only necessary to determine the possibility of ignition, simulation can be performed in a short calculation time. For example, in the case of the embodiment shown in FIG. 7, conventionally, the number of transitions to be examined to determine the possibility of ignition is 16 transitions load1 to load4, unload1 to unload4, and move1 to move8. Since only one transition is required, the calculation time can be shortened. In particular, the larger the Petri net, the higher the effect compared to the conventional one.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a system configuration example of a simulation apparatus based on an extended Petri net according to the present invention.
FIG. 2 is a diagram showing an example of a simple Petri net (before firing).
FIG. 3 is a diagram showing an example of a simple Petri net (after firing).
FIG. 4 is a flowchart showing the operation of a conventional ignition processing means.
FIG. 5 is a flowchart showing a conventional ignitable transition search process.
FIG. 6 is a diagram illustrating an example of a distribution system using an automatic guided vehicle.
7 is a diagram showing an extended Petri net of the physical distribution system shown in FIG. 6. FIG.
FIG. 8 is a diagram showing a window displayed immediately after execution of a simulation apparatus based on an extended Petri net according to the present invention.
FIG. 9 is a diagram illustrating a color definition window.
FIG. 10 is a diagram showing a place definition window.
FIG. 11 is a diagram showing an arc definition window.
FIG. 12 is a diagram showing a transition definition window.
FIG. 13 is a diagram showing an extended Petri net created by the simulation apparatus according to the present invention.
14 is a flowchart showing the operation of the
15 is a flowchart showing a ignitable transition search process shown in FIG. 14;
[Explanation of symbols]
101 Computer body
102 display
103 keyboard
104 pointing device
105 discs
106 CPU
107 memory
108 transition
109 places
110 Firing priority setting means
111 Ignition treatment means
112 firing token combination
113 tokens
114 Simulation calculation means
115 Token attribute
116 Model creation means
117 Editing means for Petri nets
118 firing rule setting means
119 Model display means
120 Model recording means
121 Initial marking setting means
122 Arc-related automatic disconnection and connection means
401 Memory initialization processing
402 Initial marking process
403 ignitable transition search process
404 Token combination sorting process
405 Marking change processing
406 Simulation time update processing
501 Input arc processing
503 firing rule processing
505 Token combination list registration process
506 Next combination creation process
801 Window for creating and executing extended Petri nets
802 Title bar
803 Menu bar
804 canvas
805 Parts list
806 “File” menu button
807 “Edit” menu button
808 "Simulation" menu button
809 “Color” menu button
810 Place parts
811 Transition parts
812 Unidirectional arc parts
813 Bidirectional arc parts
814 Scroll bar
1301 Color definition window
1302 Place definition window for skid place skid1
1303 Place definition window for state place state
1304 Arc definition window for arc connecting state place state and transition load1
1305 Arc definition window for arc connecting skid place skid1 and transition load1
1306 Arc definition window for arc connecting transition load1 and zone place zone1
1307 Transition definition window for transition load1
1401 Arc-related automatic disconnection and connection processing
1501 Transition selection process to check the possibility of ignition
1502 Input arc processing
Claims (1)
シミュレーションに必要な情報および命令を入力する入力手段と、
上記入力手段に対するユーザの操作に基づいた上記入力手段からの入力に従って、プレース、トランジション、およびアークを入力して離散事象システムの拡張ペトリネットモデルを作成するモデル作成手段と、
上記モデル作成手段により作成された拡張ペトリネットモデルを出力装置に表示する表示手段と、
上記モデル作成手段により作成された拡張ペトリネットモデルを記録装置に記録する記録手段と、
上記記録装置に記録された拡張ペトリネットモデルのシミュレーションを実行するシミュレーション計算手段と、
上記シミュレーション計算手段により実行したシミュレーションの実行結果を上記出力装置および記録装置の少なくとも一方に出力する出力手段と、を備え、
上記出力装置はディスプレイを含み、
上記記録装置はメモリおよびディスクを含み、
上記モデル作成手段は、さらに、トークン毎に上記入力手段を介してユーザからトークン変数名および属性名の指定を受け属性を定義するとともに、定義されたトークンの属性を用いてトランジションの発火ルールを設定し、かつ、トランジション発火時に、入力プレースに存在するトークンを削除するか否かを、当該入力プレースに接続するアークの種類に応じてプレース毎に設定する手段を有し、
上記シミュレーション計算手段は、
上記トークンを削除する設定を行っている入力プレースに接続するアークと、上記トークンを削除しない設定を行っている入力プレースに接続するアークとが共に入力アークとして1つのトランジションに接続されているとき、
アークを介して当該トランジションに接続された上記トークンを削除する設定を行っている入力プレースの少なくとも1つに発火可能なトークンが存在しない場合には、当該トランジションと上記トークンを削除しない設定を行っている入力プレースとの関連を切断し、
アークを介して当該トランジションに接続された上記トークンを削除する設定を行っているすべての入力プレースに発火可能なトークンが存在する場合には、当該トランジションと上記トークンを削除しない設定を行っている入力プレースとの関連を接続する自動切断接続手段を有し、
シミュレーション進行時には、通常のトランジション発火処理に加えて、上記自動切断接続手段により上記トランジションと上記入力プレースとの関連を切断あるいは接続する切断・接続処理を実行し、発火可能なトランジションがなくなるまで当該発火処理と当該切断・接続処理とを繰り返してシミュレーションの実行結果を求めることを特徴とする拡張ペトリネットに基づくシミュレーション装置。A simulation device based on an extended Petri net using a computer system for simulating a discrete event system,
An input means for inputting information and instructions necessary for the simulation;
Model creation means for creating an extended Petri net model of a discrete event system by inputting places, transitions, and arcs according to an input from the input means based on a user operation on the input means;
Display means for displaying the extended Petri net model created by the model creating means on an output device;
Recording means for recording the extended Petri net model created by the model creating means in a recording device;
Simulation calculation means for executing simulation of the extended Petri net model recorded in the recording device;
Output means for outputting the execution result of the simulation executed by the simulation calculation means to at least one of the output device and the recording device,
The output device includes a display,
The recording device includes a memory and a disk,
The model creation means further defines attributes by specifying the token variable name and attribute name from the user via the input means for each token, and sets a firing rule for the transition using the defined token attributes. And, at the time of transition firing, it has means for setting for each place whether or not to delete the token existing in the input place according to the type of arc connected to the input place,
The simulation calculation means is:
When an arc connected to an input place set to delete the token and an arc connected to an input place set not to delete the token are both connected to one transition as an input arc,
If there is no fireable token in at least one of the input places that are set to delete the token connected to the transition via the arc, set the transition and the token not to be deleted. Disconnect from the input place
Input that is set to not delete the transition and the token if there is a fireable token in all input places that are set to delete the token connected to the transition via the arc It has an automatic disconnection connection means to connect the association with the place,
When the simulation is in progress, in addition to the normal transition firing process, the automatic disconnection / connection means performs a disconnection / connection process for disconnecting or connecting the relation between the transition and the input place, and the ignition is performed until there are no more ignitable transitions. A simulation apparatus based on an extended Petri net characterized in that a simulation execution result is obtained by repeating the process and the disconnection / connection process.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001352271A JP3943909B2 (en) | 2001-11-16 | 2001-11-16 | Simulation device based on extended Petri net |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2001352271A JP3943909B2 (en) | 2001-11-16 | 2001-11-16 | Simulation device based on extended Petri net |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003150887A JP2003150887A (en) | 2003-05-23 |
| JP3943909B2 true JP3943909B2 (en) | 2007-07-11 |
Family
ID=19164475
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2001352271A Expired - Lifetime JP3943909B2 (en) | 2001-11-16 | 2001-11-16 | Simulation device based on extended Petri net |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3943909B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4612389B2 (en) * | 2004-10-08 | 2011-01-12 | 新日本製鐵株式会社 | Production and / or distribution plan creation device and method, process control device and method, and computer program |
| JP2007058447A (en) * | 2005-08-23 | 2007-03-08 | Kimura Unity Co Ltd | Modeling method of control target system based on extended Petri net and control device based on extended Petri net |
| CN101976964A (en) * | 2010-09-30 | 2011-02-16 | 天津理工大学 | Method for modeling single-phase bridge DC/AC convertor circuit based on hybrid Petri machine |
| CN110320798B (en) * | 2019-05-21 | 2021-09-24 | 西安电子科技大学 | A safety net-based controller structure simplification and behavior optimization method |
| KR102394033B1 (en) * | 2019-11-29 | 2022-05-04 | 부산대학교 산학협력단 | Collaborative coloured petri net and method for connecting coloured petri net models |
| CN119325580A (en) * | 2023-02-24 | 2025-01-17 | 宁德时代新能源科技股份有限公司 | Scheduling policy determination method, terminal device and computer readable storage medium |
-
2001
- 2001-11-16 JP JP2001352271A patent/JP3943909B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003150887A (en) | 2003-05-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN100547596C (en) | Product editing and simulation database system with user-interactive graphical tools | |
| US6366300B1 (en) | Visual programming method and its system | |
| US7073149B2 (en) | System for representing the logical and physical information of an integrated circuit | |
| JP3178721B2 (en) | The process of conceptually modeling expert knowledge in computer systems | |
| US8830266B1 (en) | Merging electronic diagrams | |
| US20050007383A1 (en) | System and method of visual grouping of elements in a diagram | |
| JP4870422B2 (en) | Method and computer system for interacting with a database | |
| KR20060070462A (en) | Process and system for rendering an object in a view using a product lifecycle management database | |
| CN113760261B (en) | Graphical building block programming method and terminal based on FGUI | |
| US20080222576A1 (en) | Design support apparatus, method for supporting design, and medium recording design support program | |
| WO2018027068A1 (en) | Story-driven game creation and publication system | |
| JP3943909B2 (en) | Simulation device based on extended Petri net | |
| CN112528608A (en) | Page editing method and device, electronic equipment and storage medium | |
| CN115581919A (en) | Game level editing method and device, electronic equipment and storage medium | |
| JP2007265031A (en) | Dictionary content processing apparatus, content display system, and content display method | |
| US7519935B2 (en) | Circuit diagram drafting system and method and computer program product | |
| CN107621951A (en) | A kind of method and device of view Hierarchical Optimization | |
| JP2765691B2 (en) | Simulation method | |
| JPH10334075A (en) | Simulation device based on extended Petri net | |
| JP2017045335A (en) | Program, recording medium, information processing apparatus, and control method | |
| JP3420785B2 (en) | Program construction equipment | |
| JP2007058447A (en) | Modeling method of control target system based on extended Petri net and control device based on extended Petri net | |
| JPS59189471A (en) | Wiring route searching system | |
| JP2937381B2 (en) | Integrated circuit design method and design apparatus | |
| CN121742885A (en) | Data configuration methods, data access methods, devices, equipment and storage media |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061024 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061225 |
|
| 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: 20070403 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070406 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 3943909 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: 20110413 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120413 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130413 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130413 Year of fee payment: 6 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130413 Year of fee payment: 6 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130413 Year of fee payment: 6 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140413 Year of fee payment: 7 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |