我試圖運行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%
生產的零件的數目是簡單地以秒爲單位的最大仿真時間。
任何建議或任何人有同樣的問題?