ManPyシミュレーションエンジンを実行しようとしています。私はすべての依存関係をインストールし、DREAMモジュールをインストールしました。今、私はManPyのウェブサイト(http://www.manpy-simulation.org)から簡単なサーバーの例を実行しようとしています:DREAM:ManPyシンプルサーバーの例が動作しない
from dream.simulation.imports import Source, Queue, Machine, Exit
from dream.simulation.Globals import runSimulation
#define the objects of the model
S=Source('S1','Source',interarrivalTime={'distributionType':'Fixed','mean':0.5}, entity='Dream.Part')
Q=Queue('Q1','Queue', capacity=1)
M=Machine('M1','Machine', processingTime={'distributionType':'Fixed','mean':0.25})
E=Exit('E1','Exit')
#define predecessors and successors for the objects
S.defineRouting(successorList=[Q])
Q.defineRouting(predecessorList=[S],successorList=[M])
M.defineRouting(predecessorList=[Q],successorList=[E])
E.defineRouting(predecessorList=[M])
# call the runSimulation giving the objects and the length of the experiment
runSimulation(objectList=[S,Q,M,E], maxSimTime=1440.0)
# calculate metrics
working_ratio = (M.totalWorkingTime/1440.0)*100
#print the results
print "the system produced", E.numOfExits, "parts"
print "the total working ratio of the Machine is", working_ratio, "%"'
期待される結果を、ウェブサイトによると
システムは、2880個の部品
生産されますマシンの総稼働率は50.0%です
これに対して、私がスクリプトを実行すると、私はstatを受け取りますement:システム1440個の部分
マシンの総加工度を生成
は、製造される部品の数は単に秒で最大シミュレーション時間である0.0%
あります。
同じ問題が発生した場合は、