Commit 6ae44a72 authored by Jérome Perrin's avatar Jérome Perrin

make Machine use consisitent format for setupTime and loadTime

parent 8acb32e5
...@@ -127,9 +127,9 @@ class Simulation(ACO.Simulation): ...@@ -127,9 +127,9 @@ class Simulation(ACO.Simulation):
route_list.append(route) route_list.append(route)
route = {"stationIdsList": list(self.getMachineNameSet(sequence_step)), route = {"stationIdsList": list(self.getMachineNameSet(sequence_step)),
"processingTime": {"distributionType": "Fixed", "processingTime": {"distributionType": "Fixed",
"mean": "%i" % int(processing_time_list[j])}, "mean": int(processing_time_list[j])},
"setupTime": {"setupDistribution": "Fixed", "setupTime": {"distributionType": "Fixed",
"setupMean": "0.5"}, # XXX hardcoded value "mean": .5}, # XXX hardcoded value
} }
if prerequisite_list: if prerequisite_list:
route["prerequisites"] = prerequisite_list route["prerequisites"] = prerequisite_list
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
"M1": { "M1": {
"_class": "Dream.Machine", "_class": "Dream.Machine",
"loadTime": { "loadTime": {
"loadDistribution": "Fixed", "distributionType": "Fixed",
"loadMean": "0" "mean": 0.0
}, },
"name": "Machine1", "name": "Machine1",
"operationType": "MT-Load-Processing", "operationType": "MT-Load-Processing",
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
"_class": "Dream.Machine", "_class": "Dream.Machine",
"failures": {}, "failures": {},
"loadTime": { "loadTime": {
"loadDistribution": "Fixed", "distributionType": "Fixed",
"loadMean": "0" "mean": 0.0
}, },
"name": "Machine2", "name": "Machine2",
"operationType": "MT-Load-Setup-Processing", "operationType": "MT-Load-Setup-Processing",
...@@ -66,8 +66,8 @@ ...@@ -66,8 +66,8 @@
"mean": 2.0 "mean": 2.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.25" "mean": 0.25
} }
}, },
"O1": { "O1": {
......
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
"operationType": "MT-Setup-Processing", "operationType": "MT-Setup-Processing",
"processingTime": {}, "processingTime": {},
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0" "mean": 0.0
} }
}, },
"M3": { "M3": {
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
"operationType": "MT-Setup-Processing", "operationType": "MT-Setup-Processing",
"processingTime": {}, "processingTime": {},
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0" "mean": 0.0
} }
}, },
"O1": { "O1": {
......
...@@ -75,8 +75,8 @@ ...@@ -75,8 +75,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "2" "mean": 2.0
}, },
"stationIdsList": [ "stationIdsList": [
"M2" "M2"
...@@ -116,8 +116,8 @@ ...@@ -116,8 +116,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"M2" "M2"
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
"mean": 0.25 "mean": 0.25
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"M1" "M1"
...@@ -111,8 +111,8 @@ ...@@ -111,8 +111,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"M2" "M2"
......
...@@ -118,8 +118,8 @@ ...@@ -118,8 +118,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -199,8 +199,8 @@ ...@@ -199,8 +199,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -237,8 +237,8 @@ ...@@ -237,8 +237,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -285,8 +285,8 @@ ...@@ -285,8 +285,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -315,8 +315,8 @@ ...@@ -315,8 +315,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
...@@ -118,8 +118,8 @@ ...@@ -118,8 +118,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -199,8 +199,8 @@ ...@@ -199,8 +199,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -237,8 +237,8 @@ ...@@ -237,8 +237,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -285,8 +285,8 @@ ...@@ -285,8 +285,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -315,8 +315,8 @@ ...@@ -315,8 +315,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
...@@ -123,8 +123,8 @@ ...@@ -123,8 +123,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -142,8 +142,8 @@ ...@@ -142,8 +142,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -161,8 +161,8 @@ ...@@ -161,8 +161,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -204,8 +204,8 @@ ...@@ -204,8 +204,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -223,8 +223,8 @@ ...@@ -223,8 +223,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -242,8 +242,8 @@ ...@@ -242,8 +242,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -290,8 +290,8 @@ ...@@ -290,8 +290,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -320,8 +320,8 @@ ...@@ -320,8 +320,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
...@@ -355,8 +355,8 @@ ...@@ -355,8 +355,8 @@
"mean": "0.3" "mean": "0.3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -374,8 +374,8 @@ ...@@ -374,8 +374,8 @@
"mean": "3" "mean": "3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "1.2" "mean": "1.2"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -393,8 +393,8 @@ ...@@ -393,8 +393,8 @@
"mean": "0.9" "mean": "0.9"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -436,8 +436,8 @@ ...@@ -436,8 +436,8 @@
"mean": "0.8" "mean": "0.8"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.2" "mean": "0.2"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -455,8 +455,8 @@ ...@@ -455,8 +455,8 @@
"mean": "0.4" "mean": "0.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -474,8 +474,8 @@ ...@@ -474,8 +474,8 @@
"mean": "1.4" "mean": "1.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -522,8 +522,8 @@ ...@@ -522,8 +522,8 @@
"mean": "0.7" "mean": "0.7"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -552,8 +552,8 @@ ...@@ -552,8 +552,8 @@
"mean": 1.4 "mean": 1.4
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.7" "mean": 0.7
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
...@@ -118,8 +118,8 @@ ...@@ -118,8 +118,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -137,8 +137,8 @@ ...@@ -137,8 +137,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -156,8 +156,8 @@ ...@@ -156,8 +156,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -199,8 +199,8 @@ ...@@ -199,8 +199,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -218,8 +218,8 @@ ...@@ -218,8 +218,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -237,8 +237,8 @@ ...@@ -237,8 +237,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -285,8 +285,8 @@ ...@@ -285,8 +285,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -315,8 +315,8 @@ ...@@ -315,8 +315,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
...@@ -350,8 +350,8 @@ ...@@ -350,8 +350,8 @@
"mean": "0.3" "mean": "0.3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -369,8 +369,8 @@ ...@@ -369,8 +369,8 @@
"mean": "3" "mean": "3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "1.2" "mean": "1.2"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -388,8 +388,8 @@ ...@@ -388,8 +388,8 @@
"mean": "0.9" "mean": "0.9"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -431,8 +431,8 @@ ...@@ -431,8 +431,8 @@
"mean": "0.8" "mean": "0.8"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.2" "mean": "0.2"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -450,8 +450,8 @@ ...@@ -450,8 +450,8 @@
"mean": "0.4" "mean": "0.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -469,8 +469,8 @@ ...@@ -469,8 +469,8 @@
"mean": "1.4" "mean": "1.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -517,8 +517,8 @@ ...@@ -517,8 +517,8 @@
"mean": "0.7" "mean": "0.7"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -547,8 +547,8 @@ ...@@ -547,8 +547,8 @@
"mean": 1.4 "mean": 1.4
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.7" "mean": 0.7
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -138,8 +138,8 @@ ...@@ -138,8 +138,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -157,8 +157,8 @@ ...@@ -157,8 +157,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -200,8 +200,8 @@ ...@@ -200,8 +200,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -219,8 +219,8 @@ ...@@ -219,8 +219,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -238,8 +238,8 @@ ...@@ -238,8 +238,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -286,8 +286,8 @@ ...@@ -286,8 +286,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -317,8 +317,8 @@ ...@@ -317,8 +317,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
...@@ -352,8 +352,8 @@ ...@@ -352,8 +352,8 @@
"mean": "0.3" "mean": "0.3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -371,8 +371,8 @@ ...@@ -371,8 +371,8 @@
"mean": "3" "mean": "3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "1.2" "mean": "1.2"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -390,8 +390,8 @@ ...@@ -390,8 +390,8 @@
"mean": "0.9" "mean": "0.9"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -433,8 +433,8 @@ ...@@ -433,8 +433,8 @@
"mean": "0.8" "mean": "0.8"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.2" "mean": "0.2"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -452,8 +452,8 @@ ...@@ -452,8 +452,8 @@
"mean": "0.4" "mean": "0.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -471,8 +471,8 @@ ...@@ -471,8 +471,8 @@
"mean": "1.4" "mean": "1.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -519,8 +519,8 @@ ...@@ -519,8 +519,8 @@
"mean": "0.7" "mean": "0.7"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -550,8 +550,8 @@ ...@@ -550,8 +550,8 @@
"mean": 1.4 "mean": 1.4
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.7" "mean": 0.7
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
...@@ -119,8 +119,8 @@ ...@@ -119,8 +119,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -138,8 +138,8 @@ ...@@ -138,8 +138,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -157,8 +157,8 @@ ...@@ -157,8 +157,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -200,8 +200,8 @@ ...@@ -200,8 +200,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -219,8 +219,8 @@ ...@@ -219,8 +219,8 @@
"mean": "4" "mean": "4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.4" "mean": "0.4"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -238,8 +238,8 @@ ...@@ -238,8 +238,8 @@
"mean": "1" "mean": "1"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.6" "mean": "0.6"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -286,8 +286,8 @@ ...@@ -286,8 +286,8 @@
"mean": "2" "mean": "2"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": "0.5"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -317,8 +317,8 @@ ...@@ -317,8 +317,8 @@
"mean": 1.0 "mean": 1.0
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.5" "mean": 0.5
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
...@@ -352,8 +352,8 @@ ...@@ -352,8 +352,8 @@
"mean": "0.3" "mean": "0.3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -371,8 +371,8 @@ ...@@ -371,8 +371,8 @@
"mean": "3" "mean": "3"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "1.2" "mean": "1.2"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -390,8 +390,8 @@ ...@@ -390,8 +390,8 @@
"mean": "0.9" "mean": "0.9"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -433,8 +433,8 @@ ...@@ -433,8 +433,8 @@
"mean": "0.8" "mean": "0.8"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.2" "mean": "0.2"
}, },
"stationIdsList": [ "stationIdsList": [
"CAM1", "CAM1",
...@@ -452,8 +452,8 @@ ...@@ -452,8 +452,8 @@
"mean": "0.4" "mean": "0.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"MILL1", "MILL1",
...@@ -471,8 +471,8 @@ ...@@ -471,8 +471,8 @@
"mean": "1.4" "mean": "1.4"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.3" "mean": "0.3"
}, },
"stationIdsList": [ "stationIdsList": [
"EDM" "EDM"
...@@ -519,8 +519,8 @@ ...@@ -519,8 +519,8 @@
"mean": "0.7" "mean": "0.7"
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.1" "mean": "0.1"
}, },
"stationIdsList": [ "stationIdsList": [
"IM" "IM"
...@@ -550,8 +550,8 @@ ...@@ -550,8 +550,8 @@
"mean": 1.4 "mean": 1.4
}, },
"setupTime": { "setupTime": {
"setupDistribution": "Fixed", "distributionType": "Fixed",
"setupMean": "0.7" "mean": 0.7
}, },
"stationIdsList": [ "stationIdsList": [
"CAD1", "CAD1",
......
This diff is collapsed.
...@@ -49,22 +49,32 @@ class Machine(CoreObject): ...@@ -49,22 +49,32 @@ class Machine(CoreObject):
def __init__(self, id, name, capacity=1, processingTime=None, def __init__(self, id, name, capacity=1, processingTime=None,
failureDistribution='No', MTTF=0, MTTR=0, availability=0, repairman='None',\ failureDistribution='No', MTTF=0, MTTR=0, availability=0, repairman='None',\
operatorPool='None',operationType='None',\ operatorPool='None',operationType='None',\
loadDistribution="No",loadMean=0, loadStdev=0, loadMin=0, loadMax=10, setupTime=None, loadTime=None,
setupDistribution="No",setupMean=0, setupStdev=0, setupMin=0, setupMax=10,
isPreemptive=False, resetOnPreemption=False): isPreemptive=False, resetOnPreemption=False):
CoreObject.__init__(self, id, name) CoreObject.__init__(self, id, name)
self.type="Machine" #String that shows the type of object self.type="Machine" #String that shows the type of object
if not processingTime: if not processingTime:
processingTime = {'distributionType': 'Fixed', processingTime = { 'distributionType': 'Fixed',
'mean': 1, 'mean': 1, }
'stdev': 0,
'min': 0,
}
if processingTime['distributionType'] == 'Normal' and\ if processingTime['distributionType'] == 'Normal' and\
processingTime.get('max', None) is None: processingTime.get('max', None) is None:
processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev'] processingTime['max'] = processingTime['mean'] + 5 * processingTime['stdev']
if not setupTime:
setupTime = { 'distributionType': 'Fixed',
'mean': 1, }
if setupTime['distributionType'] == 'Normal' and\
setupTime.get('max', None) is None:
setupTime['max'] = setupTime['mean'] + 5 * setupTime['stdev']
if not loadTime:
loadTime = { 'distributionType': 'Fixed',
'mean': 1, }
if loadTime['distributionType'] == 'Normal' and\
loadTime.get('max', None) is None:
loadTime['max'] = loadTime['mean'] + 5 * loadTime['stdev']
# holds the capacity of the machine # holds the capacity of the machine
self.capacity=capacity self.capacity=capacity
# define the distribution types of the processing and failure times respectively # define the distribution types of the processing and failure times respectively
...@@ -103,21 +113,11 @@ class Machine(CoreObject): ...@@ -103,21 +113,11 @@ class Machine(CoreObject):
# boolean to check whether the machine is being operated # boolean to check whether the machine is being operated
self.toBeOperated = False self.toBeOperated = False
# define the load times # define the load times
self.loadDistType=loadDistribution self.loadRng = RandomNumberGenerator(self, **loadTime)
self.loadRng=RandomNumberGenerator(self, self.loadDistType)
self.loadRng.mean=loadMean
self.loadRng.stdev=loadStdev
self.loadRng.min=loadMin
self.loadRng.max=loadMax
# variable that informs on the need for setup # variable that informs on the need for setup
self.setUp=True self.setUp=True
# define the setup times # define the setup times
self.setupDistType=setupDistribution self.stpRng = RandomNumberGenerator(self, **setupTime)
self.stpRng=RandomNumberGenerator(self, self.setupDistType)
self.stpRng.mean=setupMean
self.stpRng.stdev=setupStdev
self.stpRng.min=setupMin
self.stpRng.max=setupMax
# examine if there are multiple operation types performed by the operator # examine if there are multiple operation types performed by the operator
# there can be Setup/Processing operationType # there can be Setup/Processing operationType
# or the combination of both (MT-Load-Setup-Processing) # or the combination of both (MT-Load-Setup-Processing)
......
...@@ -85,8 +85,8 @@ class MachineJobShop(Machine): ...@@ -85,8 +85,8 @@ class MachineJobShop(Machine):
self.procTime=float(processingTime.get('mean', 0)) self.procTime=float(processingTime.get('mean', 0))
setupTime=activeEntity.remainingRoute[0].get('setupTime',{}) setupTime=activeEntity.remainingRoute[0].get('setupTime',{})
self.distType=setupTime.get('setupDistribution','Fixed') self.distType=setupTime.get('distributionType','Fixed')
self.setupTime=float(setupTime.get('setupMean', 0)) self.setupTime=float(setupTime.get('mean', 0))
import Globals import Globals
# read the list of next stations # read the list of next stations
...@@ -237,8 +237,8 @@ class MachineJobShop(Machine): ...@@ -237,8 +237,8 @@ class MachineJobShop(Machine):
self.giver.sortEntities() self.giver.sortEntities()
activeEntity=self.giver.getActiveObjectQueue()[0] activeEntity=self.giver.getActiveObjectQueue()[0]
loadTime=activeEntity.remainingRoute[0].get('loadTime',{}) loadTime=activeEntity.remainingRoute[0].get('loadTime',{})
self.distType=loadTime.get('loadDistribution','Fixed') self.distType=loadTime.get('distributionType','Fixed')
self.loadTime=float(loadTime.get('loadMean', 0)) self.loadTime=float(loadTime.get('mean', 0))
# ======================================================================= # =======================================================================
# removes an entity from the Machine # removes an entity from the Machine
......
...@@ -44,13 +44,18 @@ class OperatedMachine(Machine): ...@@ -44,13 +44,18 @@ class OperatedMachine(Machine):
# ======================================================================= # =======================================================================
# initialise the id the capacity, of the resource and the distribution # initialise the id the capacity, of the resource and the distribution
# ======================================================================= # =======================================================================
def __init__(self, id, name, capacity=1, distribution='Fixed', mean=1, stdev=0, min=0, max=10,\ def __init__(self, id, name, capacity=1, processingTime=None,
failureDistribution='No', MTTF=0, MTTR=0, availability=0, repairman='None',\ failureDistribution='No', MTTF=0, MTTR=0, availability=0, repairman='None',\
operatorPool='None',operationType='None',\ operatorPool='None',operationType='None',
loadDistribution="No",loadMean=0, loadStdev=0, loadMin=0, loadMax=10, setupTime=None, loadTime=None):
setupDistribution="No",setupMean=0, setupStdev=0, setupMin=0, setupMax=10): Machine.__init__(self, id, name, capacity=capacity,
Machine.__init__(self, id, name, capacity, distribution, mean, stdev, min, max,\ processingTime=processingTime,
failureDistribution, MTTF, MTTR, availability, repairman) failureDistribution=failureDistribution, MTTF=MTTF,
MTTR=MTTR, availability=availability,
repairman=repairman, operatorPool=operatorPool,
operationType=operationType, setupTime=setupTime,
loadTime=loadTime,)
# type of the machine # type of the machine
self.type = "OperatedMachine" self.type = "OperatedMachine"
# sets the operator resource of the Machine # sets the operator resource of the Machine
...@@ -76,22 +81,7 @@ class OperatedMachine(Machine): ...@@ -76,22 +81,7 @@ class OperatedMachine(Machine):
self.operationType=operationType self.operationType=operationType
# boolean to check weather the machine is being operated # boolean to check weather the machine is being operated
self.toBeOperated = False self.toBeOperated = False
# define the load times
self.loadDistType=loadDistribution
self.loadRng=RandomNumberGenerator(self, self.loadDistType)
self.loadRng.mean=loadMean
self.loadRng.stdev=loadStdev
self.loadRng.min=loadMin
self.loadRng.max=loadMax
# variable that informs on the need for setup
self.setUp=True
# define the setup times
self.setupDistType=setupDistribution
self.stpRng=RandomNumberGenerator(self, self.setupDistType)
self.stpRng.mean=setupMean
self.stpRng.stdev=setupStdev
self.stpRng.min=setupMin
self.stpRng.max=setupMax
# examine if there are multiple operation types performed by the operator # examine if there are multiple operation types performed by the operator
# there can be Setup/Processing operationType # there can be Setup/Processing operationType
# or the combination of both (MT-Load-Setup-Processing) # or the combination of both (MT-Load-Setup-Processing)
......
...@@ -57,6 +57,14 @@ def positionGraph(g): ...@@ -57,6 +57,14 @@ def positionGraph(g):
def format(m): def format(m):
for node in m['nodes'].values(): for node in m['nodes'].values():
if 'setupTime' in node:
setupTime = node['setupTime']
if 'mean' in setupTime:
setupTime['mean'] = float(setupTime['mean'])
if 'loadTime' in node:
loadTime = node['loadTime']
if 'mean' in loadTime:
loadTime['mean'] = float(loadTime['mean'])
if 'processingTime' in node: if 'processingTime' in node:
processingTime = node['processingTime'] processingTime = node['processingTime']
if 'mean' in processingTime: if 'mean' in processingTime:
...@@ -75,6 +83,14 @@ def format(m): ...@@ -75,6 +83,14 @@ def format(m):
processingTime = r['processingTime'] processingTime = r['processingTime']
if 'mean' in processingTime: if 'mean' in processingTime:
processingTime['mean'] = float(processingTime['mean']) processingTime['mean'] = float(processingTime['mean'])
if 'loadTime' in r:
loadTime = r['loadTime']
if 'mean' in loadTime:
loadTime['mean'] = float(loadTime['mean'])
if 'setupTime' in r:
setupTime = r['setupTime']
if 'mean' in setupTime:
setupTime['mean'] = float(setupTime['mean'])
for component in job.get('componentsList', []): for component in job.get('componentsList', []):
for r in component['route']: for r in component['route']:
r.pop("stepNumber", None) r.pop("stepNumber", None)
......
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