Commit 40fbe338 authored by Sebastien Robin's avatar Sebastien Robin

PartJobShop: fixed issue when the Decomposition was two times in a route

parent cebd739a
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
var isVisibleStation = function (station) { var isVisibleStation = function (station) {
// we should be able to define in the backend which station is visible // we should be able to define in the backend which station is visible
return ["CAM", "CAD", "MIL", "EDM", "ASSM"].indexOf( return ["CAM", "CAD", "MILL", "EDM", "MASS", "IM"].indexOf(
station.substring(0, station.length - 1)) !== -1; station.substring(0, station.length - 1)) !== -1;
}; };
...@@ -543,7 +543,6 @@ ...@@ -543,7 +543,6 @@
var job_schedule_spreadsheet = $('#job_schedule_spreadsheet'); var job_schedule_spreadsheet = $('#job_schedule_spreadsheet');
// Sort the spreadsheet data to an order convenient for end users // Sort the spreadsheet data to an order convenient for end users
spreadsheet_data.sort() spreadsheet_data.sort()
console.log("here the sum", spreadsheet_header + spreadsheet_data);
if (configuration['Dream-Configuration'].gui.job_schedule_spreadsheet){ if (configuration['Dream-Configuration'].gui.job_schedule_spreadsheet){
job_schedule_spreadsheet.show(); job_schedule_spreadsheet.show();
job_schedule_spreadsheet.handsontable({ job_schedule_spreadsheet.handsontable({
......
...@@ -59,13 +59,43 @@ ...@@ -59,13 +59,43 @@
"QIM", "QIM",
"IM2", "IM2",
{} {}
],
"con_65": [
"QMASS",
"MASS1",
{}
],
"con_70": [
"QMASS",
"MASS2",
{}
],
"con_75": [
"QMASS",
"MASS3",
{}
],
"con_80": [
"MASS3",
"QIM",
{}
],
"con_85": [
"MASS2",
"QIM",
{}
],
"con_90": [
"MASS1",
"QIM",
{}
] ]
}, },
"general": { "general": {
"confidenceLevel": "0.95", "confidenceLevel": "0.95",
"currentDate": "", "currentDate": "",
"maxSimTime": "-1", "maxSimTime": "-1",
"numberOfAntsPerGenerations": "3", "numberOfAntsPerGenerations": "1",
"numberOfGenerations": "3", "numberOfGenerations": "3",
"numberOfReplications": "1", "numberOfReplications": "1",
"numberOfSolutions": "4", "numberOfSolutions": "4",
...@@ -207,6 +237,60 @@ ...@@ -207,6 +237,60 @@
"stdev": "0.1" "stdev": "0.1"
} }
}, },
"MASS1": {
"_class": "Dream.MachineManagedJob",
"element_id": "DreamNode_19",
"failures": {
"MTTF": "40",
"MTTR": "10",
"failureDistribution": "No",
"repairman": "None"
},
"name": "MASS1",
"processingTime": {
"distributionType": "Fixed",
"max": "1",
"mean": "0.9",
"min": "0.1",
"stdev": "0.1"
}
},
"MASS2": {
"_class": "Dream.MachineManagedJob",
"element_id": "DreamNode_20",
"failures": {
"MTTF": "40",
"MTTR": "10",
"failureDistribution": "No",
"repairman": "None"
},
"name": "MASS2",
"processingTime": {
"distributionType": "Fixed",
"max": "1",
"mean": "0.9",
"min": "0.1",
"stdev": "0.1"
}
},
"MASS3": {
"_class": "Dream.MachineManagedJob",
"element_id": "DreamNode_21",
"failures": {
"MTTF": "40",
"MTTR": "10",
"failureDistribution": "No",
"repairman": "None"
},
"name": "MASS3",
"processingTime": {
"distributionType": "Fixed",
"max": "1",
"mean": "0.9",
"min": "0.1",
"stdev": "0.1"
}
},
"MILL1": { "MILL1": {
"_class": "Dream.MachineManagedJob", "_class": "Dream.MachineManagedJob",
"element_id": "DreamNode_12", "element_id": "DreamNode_12",
...@@ -277,6 +361,14 @@ ...@@ -277,6 +361,14 @@
"name": "QIM", "name": "QIM",
"schedulingRule": "FIFO" "schedulingRule": "FIFO"
}, },
"QMASS": {
"_class": "Dream.QueueManagedJob",
"capacity": "1",
"element_id": "DreamNode_22",
"isDummy": "0",
"name": "QMASS",
"schedulingRule": "FIFO"
},
"QMILL": { "QMILL": {
"_class": "Dream.QueueManagedJob", "_class": "Dream.QueueManagedJob",
"capacity": "-1", "capacity": "-1",
...@@ -325,12 +417,24 @@ ...@@ -325,12 +417,24 @@
"top": 0.9220848382145941 "top": 0.9220848382145941
}, },
"IM1": { "IM1": {
"left": 0.6878756647676925, "left": 0.8751810178550912,
"top": 0.5861061267844359 "top": 0.6049810252492097
}, },
"IM2": { "IM2": {
"left": 0.687865147184475, "left": 0.8845462397808385,
"top": 0.8371557737021322 "top": 0.8560412718675537
},
"MASS1": {
"left": 0.5486473277825593,
"top": 0.5247930837013548
},
"MASS2": {
"left": 0.5441103624829352,
"top": 0.7115787006319392
},
"MASS3": {
"left": 0.5501964991975471,
"top": 0.9108024938023543
}, },
"MILL1": { "MILL1": {
"left": 0.1877564659501795, "left": 0.1877564659501795,
...@@ -357,8 +461,12 @@ ...@@ -357,8 +461,12 @@
"top": 0.9193157852349616 "top": 0.9193157852349616
}, },
"QIM": { "QIM": {
"left": 0.47434314600632216, "left": 0.7084640625588505,
"top": 0.7257734856183408 "top": 0.7069073434280151
},
"QMASS": {
"left": 0.38256911560405105,
"top": 0.7012616778705337
}, },
"QMILL": { "QMILL": {
"left": 0.024330940806924675, "left": 0.024330940806924675,
...@@ -405,7 +513,7 @@ ...@@ -405,7 +513,7 @@
"Mould1 Design", "Mould1 Design",
"Design", "Design",
"CAD", "CAD",
"2", "6",
null null
], ],
[ [
...@@ -415,8 +523,8 @@ ...@@ -415,8 +523,8 @@
null, null,
"Part1", "Part1",
"Basic", "Basic",
"CAM", "CAM-MILL-EDM-MILL-IM",
"3", "8-4-2-8-12",
null null
], ],
[ [
...@@ -426,8 +534,19 @@ ...@@ -426,8 +534,19 @@
null, null,
"Part2", "Part2",
"Basic", "Basic",
"CAM", "CAM-MILL-EDM-CAM-IM",
"2", "20-15-8-4-13",
""
],
[
"",
"",
"",
"",
"Assemble",
"Basic",
"MASS-IM",
"8-12",
"" ""
], ],
[ [
...@@ -439,7 +558,7 @@ ...@@ -439,7 +558,7 @@
"Design", "Design",
"CAD", "CAD",
"2", "2",
null ""
], ],
[ [
"", "",
...@@ -450,7 +569,7 @@ ...@@ -450,7 +569,7 @@
"Basic", "Basic",
"CAM", "CAM",
"4", "4",
null ""
], ],
[ [
"", "",
...@@ -461,7 +580,7 @@ ...@@ -461,7 +580,7 @@
"Basic", "Basic",
"CAM", "CAM",
"3", "3",
null ""
], ],
[ [
"Order 3", "Order 3",
......
...@@ -97,10 +97,17 @@ class Simulation(ACO.Simulation): ...@@ -97,10 +97,17 @@ class Simulation(ACO.Simulation):
return predecessor_list return predecessor_list
def getRouteList(self, sequence_list, processing_time_list, prerequisite_list): def getRouteList(self, sequence_list, processing_time_list, prerequisite_list):
# use to record which predecessor has been already done, used to avoid doing
# two times Decomposition
predecessor_set = set()
route_list = [] route_list = []
route_counter = 0 route_counter = 0
for j, sequence_step in enumerate(sequence_list): for j, sequence_step in enumerate(sequence_list):
for predecessor_step in self.getNotMachineNodePredecessorList(sequence_step): for predecessor_step in self.getNotMachineNodePredecessorList(sequence_step):
# We avoid having two time Decomposition in the route. XXX Is this correct ?
if predecessor_step == "Decomposition" and predecessor_step in predecessor_set:
continue
predecessor_set.add(predecessor_step)
route = {"stationIdsList": [predecessor_step], route = {"stationIdsList": [predecessor_step],
"stepNumber": "%i" % route_counter "stepNumber": "%i" % route_counter
} }
......
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