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 @@
var isVisibleStation = function (station) {
// 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;
};
......@@ -543,7 +543,6 @@
var job_schedule_spreadsheet = $('#job_schedule_spreadsheet');
// Sort the spreadsheet data to an order convenient for end users
spreadsheet_data.sort()
console.log("here the sum", spreadsheet_header + spreadsheet_data);
if (configuration['Dream-Configuration'].gui.job_schedule_spreadsheet){
job_schedule_spreadsheet.show();
job_schedule_spreadsheet.handsontable({
......
......@@ -59,13 +59,43 @@
"QIM",
"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": {
"confidenceLevel": "0.95",
"currentDate": "",
"maxSimTime": "-1",
"numberOfAntsPerGenerations": "3",
"numberOfAntsPerGenerations": "1",
"numberOfGenerations": "3",
"numberOfReplications": "1",
"numberOfSolutions": "4",
......@@ -207,6 +237,60 @@
"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": {
"_class": "Dream.MachineManagedJob",
"element_id": "DreamNode_12",
......@@ -277,6 +361,14 @@
"name": "QIM",
"schedulingRule": "FIFO"
},
"QMASS": {
"_class": "Dream.QueueManagedJob",
"capacity": "1",
"element_id": "DreamNode_22",
"isDummy": "0",
"name": "QMASS",
"schedulingRule": "FIFO"
},
"QMILL": {
"_class": "Dream.QueueManagedJob",
"capacity": "-1",
......@@ -325,12 +417,24 @@
"top": 0.9220848382145941
},
"IM1": {
"left": 0.6878756647676925,
"top": 0.5861061267844359
"left": 0.8751810178550912,
"top": 0.6049810252492097
},
"IM2": {
"left": 0.687865147184475,
"top": 0.8371557737021322
"left": 0.8845462397808385,
"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": {
"left": 0.1877564659501795,
......@@ -357,8 +461,12 @@
"top": 0.9193157852349616
},
"QIM": {
"left": 0.47434314600632216,
"top": 0.7257734856183408
"left": 0.7084640625588505,
"top": 0.7069073434280151
},
"QMASS": {
"left": 0.38256911560405105,
"top": 0.7012616778705337
},
"QMILL": {
"left": 0.024330940806924675,
......@@ -405,7 +513,7 @@
"Mould1 Design",
"Design",
"CAD",
"2",
"6",
null
],
[
......@@ -415,8 +523,8 @@
null,
"Part1",
"Basic",
"CAM",
"3",
"CAM-MILL-EDM-MILL-IM",
"8-4-2-8-12",
null
],
[
......@@ -426,8 +534,19 @@
null,
"Part2",
"Basic",
"CAM",
"2",
"CAM-MILL-EDM-CAM-IM",
"20-15-8-4-13",
""
],
[
"",
"",
"",
"",
"Assemble",
"Basic",
"MASS-IM",
"8-12",
""
],
[
......@@ -439,7 +558,7 @@
"Design",
"CAD",
"2",
null
""
],
[
"",
......@@ -450,7 +569,7 @@
"Basic",
"CAM",
"4",
null
""
],
[
"",
......@@ -461,7 +580,7 @@
"Basic",
"CAM",
"3",
null
""
],
[
"Order 3",
......
......@@ -97,10 +97,17 @@ class Simulation(ACO.Simulation):
return predecessor_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_counter = 0
for j, sequence_step in enumerate(sequence_list):
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],
"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