Commit 46fbe879 authored by Ioannis Papagiannopoulos's avatar Ioannis Papagiannopoulos Committed by Sebastien Robin

Test for LineClearance added

parent f17ae973
{
"_class": "Dream.Simulation",
"edges": {
"0": [
"S1",
"Q1",
{}
],
"1": [
"Q1",
"BD1",
{}
],
"2": [
"BD1",
"M1",
{}
],
"3": [
"M1",
"Q2",
{}
],
"4": [
"Q2",
"M2",
{}
],
"5": [
"M2",
"BR1",
{}
],
"6": [
"BR1",
"M3",
{}
],
"7": [
"M3",
"E1",
{}
]
},
"general": {
"_class": "Dream.Configuration",
"confidenceLevel": "0.95",
"maxSimTime": "1440",
"numberOfReplications": "1",
"trace": "No"
},
"nodes": {
"S1": {
"_class": "Dream.BatchSource",
"entity": "Batch",
"batchNumberOfUnits": 100,
"interarrivalTime": {
"distributionType": "Fixed",
"mean": "1.5"
},
"left": 0.6968085106382979,
"name": "Source",
"top": 0.9545454545454546
},
"Q1": {
"_class": "Dream.Queue",
"capacity": "100000",
"left": 0.6968085106382979,
"name": "StartQueue",
"top": 0.7727272727272727
},
"Q2": {
"_class": "Dream.LineClearance",
"capacity": "2",
"left": 0.6968085106382979,
"name": "Queue1",
"top": 0.7727272727272727
},
"M1": {
"_class": "Dream.Machine",
"left": 0.4414893617021277,
"name": "Station1",
"failures": {
},
"processingTime": {
"distributionType": "Fixed",
"mean": "0.5"
},
"top": 0.5909090909090908
},
"M2": {
"_class": "Dream.Machine",
"left": 0.4414893617021277,
"name": "Station2",
"failures": {
},
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"top": 0.5909090909090908
},
"M3": {
"_class": "Dream.Machine",
"left": 0.4414893617021277,
"name": "Station3",
"failures": {
},
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"top": 0.5909090909090908
},
"BD1": {
"_class": "Dream.BatchDecomposition",
"left": 0.4414893617021277,
"name": "Batch_Decomposition",
"numberOfSubBatches": 4,
"processingTime": {
"distributionType": "Fixed",
"mean": "1"
},
"top": 0.5909090909090908
},
"BR1": {
"_class": "Dream.BatchReassembly",
"left": 0.4414893617021277,
"name": "Batch_Reassembly",
"numberOfSubBatches": 4,
"processingTime": {
"distributionType": "Fixed",
"mean": "0"
},
"top": 0.5909090909090908
},
"E1": {
"_class": "Dream.Exit",
"left": 0.2978723404255319,
"name": "Stock",
"top": 0.045454545454545414
}
}
}
\ No newline at end of file
......@@ -75,6 +75,7 @@ from SubBatch import SubBatch
from BatchSource import BatchSource
from BatchDecomposition import BatchDecomposition
from BatchReassembly import BatchReassembly
from LineClearance import LineClearance
import ExcelHandler
import time
......@@ -139,6 +140,7 @@ def createObjects():
G.BatchDecompositionList=[]
G.BatchSourceList=[]
G.BatchReassemblyList=[]
G.LineClearanceList=[]
# -----------------------------------------------------------------------
# loop through all the model resources
......@@ -395,6 +397,17 @@ def createObjects():
G.BatchReassemblyList.append(BR)
G.ObjList.append(BR)
elif objClass=='Dream.LineClearance':
id=element.get('id', 'not found')
name=element.get('name', 'not found')
capacity=int(element.get('capacity', '1'))
isDummy=bool(int(element.get('isDummy', '0')))
schedulingRule=element.get('schedulingRule', 'FIFO')
LC=LineClearance(id, name, capacity, isDummy, schedulingRule=schedulingRule)
LC.nextIds=getSuccessorList(id)
G.LineClearanceList.append(LC)
G.ObjList.append(LC)
# -----------------------------------------------------------------------
# loop through all the core objects
# to read predecessors
......
{
"elementList": [
{
"_class": "Dream.Exit",
"id": "E1",
"results": {
"throughput": 359,
"takt_time": 4.006963788300836,
"lifespan": 454.0
}
},
{
"_class": "Dream.Machine",
"id": "M1",
"results": {
"working_ratio": 50.03472222222222,
"blockage_ratio": 49.861111111111114,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M2",
"results": {
"working_ratio": 99.89583333333333,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 0.10416666666666667
}
},
{
"_class": "Dream.Machine",
"id": "M3",
"results": {
"working_ratio": 24.930555555555557,
"blockage_ratio": 0.0,
"failure_ratio": 0.0,
"waiting_ratio": 75.06944444444444
}
}
],
"_class": "Dream.Simulation",
"general": {
"_class": "Dream.Configuration"
}
}
\ No newline at end of file
......@@ -66,7 +66,7 @@ class SimulationTopology(TestCase):
self.assertEquals(stable_result, dump_result, "outputs are different")
# Automatically create a test method for every topology
for x in range(1, 23):
for x in range(1, 24):
def getTestTopology():
filename = "Topology%02i" % x
def test_topology(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment