internal M_Operation[] Init(MasterDBContext context) { var operations = new M_Operation[] { BODENPLATTE_BOHREN, BODENPLATTE_ZUSAMMENBAUEN, ABLAGE_ZUSAMMENBAUEN, DECKPLATTE_BOHREN, SEITENWAND_BOHREN, RÜCKWAND_ZUSAMMENBAUEN, SCHRANKTÜR_BOHREN, SCHRANKTÜR_ZUSAMMENBAUEN, RAHMEN_ZUSAMMENBAUEN, RÜCKWAND_MONTIEREN, REGAL_DÜBEL_ANBRINGEN, REGAL_ABLAGEN_EINBAUEN, SCHRANK_KLEIDERSTANGENHALTERUNGEN_ANBRINGEN, SCHRANK_KLEIDERSTANGE_EINBAUEN, SCHRANKTÜR_BEFESTIGEN }; context.Operations.AddRange(entities: operations); context.SaveChanges(); return(operations); }
/// <summary> /// TODO: Fulfill Creator /// </summary> /// <param name="operation"></param> /// <param name="dueTime"></param> /// <param name="productionAgent"></param> /// <param name="lastLeaf"></param> /// <param name="firstOperation"></param> /// <param name="currentTime"></param> /// <returns></returns> public static FOperation ToOperationItem(this M_Operation operation , long dueTime , IActorRef productionAgent , bool firstOperation , long currentTime) { var prioRule = Extension.CreateFunc( // Lamda zur Func. func: (time) => dueTime - operation.Duration - time // ENDE ); return(new FOperation(key: Guid.NewGuid() , dueTime: dueTime , creationTime: currentTime , forwardStart: 0 , forwardEnd: 0 , backwardStart: dueTime - operation.Duration , backwardEnd: dueTime , end: 0 , start: 0 , startConditions: new FStartCondition(preCondition: firstOperation, articlesProvided: false) , priority: prioRule.ToFSharpFunc() , resourceAgent: ActorRefs.NoSender , hubAgent: ActorRefs.NoSender , productionAgent: productionAgent , operation: operation , tool: operation.ResourceTool , proposals: new List <FProposal>())); }
/// <summary> /// Fulfill Creator /// </summary> /// <param name="operation"></param> /// <param name="dueTime"></param> /// <param name="productionAgent"></param> /// <param name="firstOperation"></param> /// <param name="currentTime"></param> /// <returns></returns> public static FOperation ToOperationItem(this M_Operation m_operation , long dueTime , long customerDue , IActorRef productionAgent , bool firstOperation , long currentTime , long remainingWork) { var prioRule = Extension.CreateFunc( // Lamda zur Func. func: (time) => (customerDue - time) - m_operation.Duration - remainingWork // ENDE ); return(new FOperation(key: Guid.NewGuid() , dueTime: dueTime , customerDue: customerDue , creationTime: currentTime , forwardStart: currentTime , forwardEnd: currentTime + m_operation.Duration + m_operation.AverageTransitionDuration , backwardStart: dueTime - m_operation.Duration - m_operation.AverageTransitionDuration , backwardEnd: dueTime , remainingWork: remainingWork , end: 0 , start: 0 , startConditions: new FStartCondition(preCondition: firstOperation, articlesProvided: false) , priority: prioRule.ToFSharpFunc() , setupKey: -1 // unset , isFinished: false , hubAgent: ActorRefs.NoSender , productionAgent: productionAgent , operation: m_operation , requiredCapability: m_operation.ResourceCapability , bucket: String.Empty)); }
public void GenerateOperations(List <Dictionary <long, Node> > nodesPerLevel, TransitionMatrix transitionMatrix, TransitionMatrixInput inputTransitionMatrix, MasterTableResourceCapability resourceCapabilities, XRandom rng) { Prepare(transitionMatrix, inputTransitionMatrix, rng); List <TEnumerator <M_ResourceCapability> > tools = resourceCapabilities.ParentCapabilities.Select(x => new TEnumerator <M_ResourceCapability>(x.ChildResourceCapabilities.ToArray())).ToList(); for (var i = 0; i < nodesPerLevel.Count - 1; i++) { foreach (var article in nodesPerLevel[i].Values) { var hierarchyNumber = 0; var currentWorkingMachine = inputTransitionMatrix.ExtendedTransitionMatrix ? DetermineNextWorkingMachine(0, rng) : rng.Next(tools.Count); var lastOperationReached = false; var operationCount = 0; var correction = inputTransitionMatrix.ExtendedTransitionMatrix ? 1 : 0; do { int duration; do { duration = _machiningTimeDistributions[currentWorkingMachine].Sample(); } while (duration == 0); hierarchyNumber += 10; var operation = new M_Operation { ArticleId = article.Article.Id, Name = "Operation " + (operationCount + 1) + " for [" + article.Article.Name + "]", Duration = duration, ResourceCapabilityId = tools[currentWorkingMachine].GetNext().Id, HierarchyNumber = hierarchyNumber }; article.Operations.Add(new Operation { MOperation = operation }); currentWorkingMachine = DetermineNextWorkingMachine(currentWorkingMachine + correction, rng); operationCount++; if (inputTransitionMatrix.ExtendedTransitionMatrix) { lastOperationReached = _matrixSize == currentWorkingMachine + 1; } else { lastOperationReached = article.WorkPlanLength == operationCount; } } while (!lastOperationReached); } } }
private static M_ArticleBom[] CreateArticleBoms(M_Article[] articles, M_Operation[] operations) { M_Operation operationDesk = operations.Single(x => x.Name.Equals(OPERATION_DESK)); M_Operation operationLeg1 = operations.Single(x => x.Name.Equals(OPERATION_DESK_LEG_1)); M_Operation operationLeg2 = operations.Single(x => x.Name.Equals(OPERATION_DESK_LEG_2)); return(new M_ArticleBom[] { // Tisch new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_DESK_SURFACE).Id, Name = ARTICLE_DESK_SURFACE, Quantity = 1, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK).Id, OperationId = operationDesk.Id }, new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_DESK_LEG).Id, Name = ARTICLE_DESK_LEG, Quantity = 4, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK).Id, OperationId = operationDesk.Id }, new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_SCREWS).Id, Name = ARTICLE_SCREWS, Quantity = 16, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK).Id, OperationId = operationDesk.Id }, // Tischbein new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_MOUNTING_PLATE).Id, Name = ARTICLE_MOUNTING_PLATE, Quantity = 1, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK_LEG).Id, OperationId = operationLeg1.Id }, new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_STEEL_PIPE).Id, Name = ARTICLE_STEEL_PIPE, Quantity = 1, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK_LEG).Id, OperationId = operationLeg1.Id }, new M_ArticleBom { ArticleChildId = articles.Single(a => a.Name == ARTICLE_FELT_GLIDERS).Id, Name = ARTICLE_FELT_GLIDERS, Quantity = 1, ArticleParentId = articles.Single(a => a.Name == ARTICLE_DESK_LEG).Id, OperationId = operationLeg2.Id }, }); }
/// <summary> /// /// </summary> /// <param name="articles"></param> /// <param name="resourceSkills"></param> /// <param name="resourceTools"></param> /// <returns></returns> private static M_Operation[] CreateOperations(M_Article[] articles, M_ResourceSkill[] resourceSkills, M_ResourceTool[] resourceTools) { var operations = new M_Operation[] { // Final Product Tisch new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLE).Id, Name = OPERATION_ASSEMBLY_TABLE, Duration = 5, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_ASSEBMLY_SCREW), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_SCREWDRIVERCROSS2), HierarchyNumber = 10 }, new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLE).Id, Name = OPERATION_SCREW_TOGETHER_TABLE, Duration = 20, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_ASSEBMLY_SCREW), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_SCREWDRIVERCROSS2), HierarchyNumber = 20 }, // Bom For Tischbein new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLE_LEG).Id, Name = OPERATION_CUT_TABLE_LEG, Duration = 10, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_CUT), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_SAWSMALL), HierarchyNumber = 10 }, new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLE_LEG).Id, Name = OPERATION_DRILL_TABLE_LEG, Duration = 5, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_DRILL), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_M6), HierarchyNumber = 20 }, // Bom For Tischplatte new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLETOP).Id, Name = OPERATION_CUT_TABLETOP, Duration = 20, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_CUT), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_SAWBIG), HierarchyNumber = 10 }, new M_Operation { ArticleId = articles.Single(predicate: a => a.Name == ARTICLE_TABLETOP).Id, Name = OPERATION_DRILL_TABLETOP, Duration = 5, ResourceSkill = resourceSkills.Single(predicate: s => s.Name == RESCOURCESKILL_DRILL), ResourceTool = resourceTools.Single(predicate: t => t.Name == RESCOURCETOOL_M6), HierarchyNumber = 20 }, }; return(operations); }
internal M_Operation[] Init(MasterDBContext context) { var operations = new M_Operation[] { DUMP_TRUCK_WEDDING, GLUE_TRUCK_BED, RACE_TRUCK_WEDDING, GLUE_RACE_WING, DUMP_TRUCK_ASSEMBLE_LAMPS, DUMP_TRUCK_MOUNT_ENGINE, RACE_TRUCK_ASSEMBLE_LAMPS, RACE_TRUCK_MOUNT_ENGINE_EXTENSION, RACE_TRUCK_MOUNT_ENGINE, MOUNT_AXIS, SCREW_WHEELS, GLUE_SEMITRAILER, GLUE_SIDEWALLS, MOUNT_HATCHBACK, RACE_WING_CUT, RACE_WING_DRILL, RACE_EXTENSION_CUT, RACE_EXTENSION_DRILL, SIDEWALL_LONG_CUT, SIDEWALL_LONG_DRILL, SIDEWALL_SHORT_CUT, SIDEWALL_SHORT_DRILL, BASEPLATE_TRUCK_BED_CUT, BASEPLATE_TRUCK_BED_DRILL, ENGINE_BLOCK_CUT, ENGINE_BLOCK_DRILL, CABIN_CUT, CABIN_DRILL, BASE_PLATE_CUT, BASE_PLATE_DRILL }; context.Operations.AddRange(entities: operations); context.SaveChanges(); return(operations); }
public static FOperation CreateJobItem(string jobName, int jobDuration, bool preCondition = true, int dueTime = 50, string skillName = "Sewing", M_ArticleBom bom = null) { var operation = new M_Operation() { ArticleId = 10, AverageTransitionDuration = 20, Duration = jobDuration, HierarchyNumber = 10, Id = 1, Name = jobName, ArticleBoms = new List <M_ArticleBom> { bom }, ResourceSkill = new M_ResourceSkill() { Name = skillName } }; return(operation.ToOperationItem(dueTime: 50, productionAgent: ActorRefs.Nobody, firstOperation: preCondition, currentTime: 0)); }
public static FOperation CreateDummyFOperationItem(string jobName, int jobDuration, int averageTransitionDuration = 20, bool preCondition = true, bool materialsProvide = true, int dueTime = 50, long customerDue = 100L, M_ResourceCapability capability = null, M_ArticleBom bom = null, long currentTime = 0L) { var operation = new M_Operation() { ArticleId = 10, AverageTransitionDuration = averageTransitionDuration, Duration = jobDuration, HierarchyNumber = 10, Id = 1, Name = jobName, ArticleBoms = new List <M_ArticleBom> { bom }, ResourceCapability = new M_ResourceCapability { Name = "Cutting" } }; return(MessageFactory.ToOperationItem(operation, dueTime: dueTime, customerDue: customerDue, productionAgent: ActorRefs.Nobody, firstOperation: preCondition, currentTime: currentTime, remainingWork: 0)); }
internal MasterTableOperation(MasterTableArticle articles , MasterTableResourceSkill resourceSkill , MasterTableResourceTool resourceTool) { DUMP_TRUCK_WEDDING = new M_Operation { ArticleId = articles.DUMP_TRUCK.Id, Name = "Dump-Truck: Wedding", Duration = 15, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; GLUE_TRUCK_BED = new M_Operation { ArticleId = articles.DUMP_TRUCK.Id, Name = "Glue Truck-Bed", Duration = 10, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; // assemble Truck RACE_TRUCK_WEDDING = new M_Operation { ArticleId = articles.RACE_TRUCK.Id, Name = "Race-Truck: Wedding", Duration = 15, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; GLUE_RACE_WING = new M_Operation { ArticleId = articles.RACE_TRUCK.Id, Name = "Glue Race Wing", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; // assemble chassie Dump-Truck DUMP_TRUCK_ASSEMBLE_LAMPS = new M_Operation { ArticleId = articles.CHASSIS_TYPE_DUMP.Id, Name = "Dump-Truck: Assemble Lamps", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; DUMP_TRUCK_MOUNT_ENGINE = new M_Operation { ArticleId = articles.CHASSIS_TYPE_DUMP.Id, Name = "Dump-Truck: Mount Engine to Cabin", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; // assemble chassie Race Truck RACE_TRUCK_ASSEMBLE_LAMPS = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Race-Truck: Assemble Lamps", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; RACE_TRUCK_MOUNT_ENGINE_EXTENSION = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Mount Engine Extension", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; RACE_TRUCK_MOUNT_ENGINE = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Race-Truck: Mount Engine to Cabin", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 30 }; // assemble Skeleton MOUNT_AXIS = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "mount poles with wheels to Skeleton", Duration = 10, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; SCREW_WHEELS = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "Screw wheels onto poles", Duration = 10, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; GLUE_SEMITRAILER = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "Glue Semitrailer", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 30 }; // assemble Truck Bed GLUE_SIDEWALLS = new M_Operation { ArticleId = articles.TRUCK_BED.Id, Name = "Glue side walls and base plate together", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 10 }; MOUNT_HATCHBACK = new M_Operation { ArticleId = articles.TRUCK_BED.Id, Name = "Mount hatchback", Duration = 5, ResourceSkillId = resourceSkill.ASSEMBLING.Id, ResourceToolId = resourceTool.ASSEMBLY_SCREWDRIVER.Id, HierarchyNumber = 20 }; // assemble Race Wing RACE_WING_CUT = new M_Operation { ArticleId = articles.RACE_WING.Id, Name = "Race Wing: Cut shape", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_BIG.Id, HierarchyNumber = 10 }; RACE_WING_DRILL = new M_Operation { ArticleId = articles.RACE_WING.Id, Name = "Race Wing: Drill Mount Holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; // Engine Race Extension RACE_EXTENSION_CUT = new M_Operation { ArticleId = articles.ENGINE_RACE_EXTENSION.Id, Name = "Engine Race Extension: Cut shape", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_BIG.Id, HierarchyNumber = 10 }; RACE_EXTENSION_DRILL = new M_Operation { ArticleId = articles.ENGINE_RACE_EXTENSION.Id, Name = "Engine Race Extension: Drill Mount Holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; // side Walls for Truck-bed SIDEWALL_LONG_CUT = new M_Operation { ArticleId = articles.SIDEWALL_LONG.Id, Name = "Side wall long: Cut long side", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_SMALL.Id, HierarchyNumber = 10 }; SIDEWALL_LONG_DRILL = new M_Operation { ArticleId = articles.SIDEWALL_LONG.Id, Name = "Side wall long: Drill mount holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; SIDEWALL_SHORT_CUT = new M_Operation { ArticleId = articles.SIDEWALL_SHORT.Id, Name = "Side wall short: Cut short side", Duration = 5, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_SMALL.Id, HierarchyNumber = 10 }; SIDEWALL_SHORT_DRILL = new M_Operation { ArticleId = articles.SIDEWALL_SHORT.Id, Name = "Side wall short: Drill mount holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; BASEPLATE_TRUCK_BED_CUT = new M_Operation { ArticleId = articles.BASEPLATE_TRUCK_BED.Id, Name = "Base plate Truck-Bed: Cut Base plate Truck-Bed", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_BIG.Id, HierarchyNumber = 10 }; BASEPLATE_TRUCK_BED_DRILL = new M_Operation { ArticleId = articles.BASEPLATE_TRUCK_BED.Id, Name = "Base plate Truck-Bed: Drill mount holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; // Eengin Block ENGINE_BLOCK_CUT = new M_Operation { ArticleId = articles.ENGINE_BLOCK.Id, Name = "Engine-Block: Cut Engine-Block", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_BIG.Id, HierarchyNumber = 10 }; ENGINE_BLOCK_DRILL = new M_Operation { ArticleId = articles.ENGINE_BLOCK.Id, Name = "Engine-Block: Drill mount holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M6.Id, HierarchyNumber = 20 }; // cabin CABIN_CUT = new M_Operation { ArticleId = articles.CABIN.Id, Name = "Cabin: Cut Cabin", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_SMALL.Id, HierarchyNumber = 10 }; CABIN_DRILL = new M_Operation { ArticleId = articles.CABIN.Id, Name = "Cabin: Drill mount holes", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M4.Id, HierarchyNumber = 20 }; // Base Plate BASE_PLATE_CUT = new M_Operation { ArticleId = articles.BASE_PLATE.Id, Name = "Base plate: Cut Base plate", Duration = 10, ResourceSkillId = resourceSkill.CUTTING.Id, ResourceToolId = resourceTool.SAW_BLADE_BIG.Id, HierarchyNumber = 10 }; BASE_PLATE_DRILL = new M_Operation { ArticleId = articles.BASE_PLATE.Id, Name = "Base plate: drill holes for axis mount", Duration = 5, ResourceSkillId = resourceSkill.DRILLING.Id, ResourceToolId = resourceTool.DRILL_HEAD_M4.Id, HierarchyNumber = 20 }; }
internal OperationData(ArticleData articles, MasterTableResourceCapability resourceCapability) { SawTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.CUTTING.Name)) .ChildResourceCapabilities.ToArray()); DrillTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.DRILLING.Name)) .ChildResourceCapabilities.ToArray()); AssemblyTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.ASSEMBLING.Name)) .ChildResourceCapabilities.ToArray()); BODENPLATTE_BOHREN = new M_Operation { ArticleId = articles.BODENPLATTE.Id, Name = "Bodenplatte bohren", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 10 }; BODENPLATTE_ZUSAMMENBAUEN = new M_Operation { ArticleId = articles.BODENPLATTE.Id, Name = "Bodenplatte zusammenbauen", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; ABLAGE_ZUSAMMENBAUEN = new M_Operation { ArticleId = articles.ABLAGE.Id, Name = "Ablage zusammenbauen", Duration = 1, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; DECKPLATTE_BOHREN = new M_Operation { ArticleId = articles.DECKPLATTE.Id, Name = "Deckplatte bohren", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 10 }; SEITENWAND_BOHREN = new M_Operation { ArticleId = articles.SEITENWAND.Id, Name = "Seitenwand bohren", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 10 }; RÜCKWAND_ZUSAMMENBAUEN = new M_Operation { ArticleId = articles.RÜCKWAND.Id, Name = "Rückwand zusammenbauen", Duration = 1, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; SCHRANKTÜR_BOHREN = new M_Operation { ArticleId = articles.SCHRANKTÜR.Id, Name = "Schranktür bohren", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 10 }; SCHRANKTÜR_ZUSAMMENBAUEN = new M_Operation { ArticleId = articles.SCHRANKTÜR.Id, Name = "Schranktür zusammenbauen", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; RAHMEN_ZUSAMMENBAUEN = new M_Operation { ArticleId = articles.RAHMEN.Id, Name = "Rahmen zusammenbauen", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; RÜCKWAND_MONTIEREN = new M_Operation { ArticleId = articles.RAHMEN_MIT_RÜCKWAND.Id, Name = "Rückenwand montieren", Duration = 20, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; REGAL_DÜBEL_ANBRINGEN = new M_Operation { ArticleId = articles.REGAL.Id, Name = "Regal: Dübel anbringen", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; REGAL_ABLAGEN_EINBAUEN = new M_Operation { ArticleId = articles.REGAL.Id, Name = "Regal: Ablagen einbauen", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; SCHRANK_KLEIDERSTANGENHALTERUNGEN_ANBRINGEN = new M_Operation { ArticleId = articles.SCHRANK.Id, Name = "Schrank: Kleiderstangenhalterungen anbringen", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; SCHRANK_KLEIDERSTANGE_EINBAUEN = new M_Operation { ArticleId = articles.SCHRANK.Id, Name = "Schrank: Kleiderstange einbauen", Duration = 2, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; SCHRANKTÜR_BEFESTIGEN = new M_Operation { ArticleId = articles.SCHRANK.Id, Name = "Schrank: Tür befestigen", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 30 }; }
internal MasterTableOperation(MasterTableArticle articles , MasterTableResourceCapability resourceCapability , bool distributeSetupsExponentially) { SawTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.CUTTING.Name)).ChildResourceCapabilities.ToArray() , expDistributed: distributeSetupsExponentially); DrillTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.DRILLING.Name)).ChildResourceCapabilities.ToArray() , expDistributed: distributeSetupsExponentially); AssemblyTools = new TEnumerator <M_ResourceCapability>( obj: resourceCapability.Capabilities.Single(x => x.Name.Equals(resourceCapability.ASSEMBLING.Name)).ChildResourceCapabilities.ToArray() , expDistributed: distributeSetupsExponentially); DUMP_TRUCK_WEDDING = new M_Operation { ArticleId = articles.DUMP_TRUCK.Id, Name = "Dump-Truck: Wedding", Duration = 15, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; GLUE_TRUCK_BED = new M_Operation { ArticleId = articles.DUMP_TRUCK.Id, Name = "Glue Truck-Bed", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; // assemble Truck RACE_TRUCK_WEDDING = new M_Operation { ArticleId = articles.RACE_TRUCK.Id, Name = "Race-Truck: Wedding", Duration = 15, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; GLUE_RACE_WING = new M_Operation { ArticleId = articles.RACE_TRUCK.Id, Name = "Glue Race Wing", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; // assemble chassie Dump-Truck DUMP_TRUCK_ASSEMBLE_LAMPS = new M_Operation { ArticleId = articles.CHASSIS_TYPE_DUMP.Id, Name = "Dump-Truck: Assemble Lamps", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; DUMP_TRUCK_MOUNT_ENGINE = new M_Operation { ArticleId = articles.CHASSIS_TYPE_DUMP.Id, Name = "Dump-Truck: Mount Engine to Cabin", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; // assemble chassie Race Truck RACE_TRUCK_ASSEMBLE_LAMPS = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Race-Truck: Assemble Lamps", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; RACE_TRUCK_MOUNT_ENGINE_EXTENSION = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Mount Engine Extension", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; RACE_TRUCK_MOUNT_ENGINE = new M_Operation { ArticleId = articles.CHASSIS_TYPE_RACE.Id, Name = "Race-Truck: Mount Engine to Cabin", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 30 }; // assemble Skeleton MOUNT_AXIS = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "mount poles with wheels to Skeleton", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; SCREW_WHEELS = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "Screw wheels onto poles", Duration = 10, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; GLUE_SEMITRAILER = new M_Operation { ArticleId = articles.SKELETON.Id, Name = "Glue Semitrailer", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 30 }; // assemble Truck Bed GLUE_SIDEWALLS = new M_Operation { ArticleId = articles.TRUCK_BED.Id, Name = "Glue side walls and base plate together", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 10 }; MOUNT_HATCHBACK = new M_Operation { ArticleId = articles.TRUCK_BED.Id, Name = "Mount hatchback", Duration = 5, ResourceCapabilityId = AssemblyTools.GetNext().Id, HierarchyNumber = 20 }; // assemble Race Wing RACE_WING_CUT = new M_Operation { ArticleId = articles.RACE_WING.Id, Name = "Race Wing: Cut shape", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; RACE_WING_DRILL = new M_Operation { ArticleId = articles.RACE_WING.Id, Name = "Race Wing: Drill Mount Holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; // Engine Race Extension RACE_EXTENSION_CUT = new M_Operation { ArticleId = articles.ENGINE_RACE_EXTENSION.Id, Name = "Engine Race Extension: Cut shape", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; RACE_EXTENSION_DRILL = new M_Operation { ArticleId = articles.ENGINE_RACE_EXTENSION.Id, Name = "Engine Race Extension: Drill Mount Holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; // side Walls for Truck-bed SIDEWALL_LONG_CUT = new M_Operation { ArticleId = articles.SIDEWALL_LONG.Id, Name = "Side wall long: Cut long side", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; SIDEWALL_LONG_DRILL = new M_Operation { ArticleId = articles.SIDEWALL_LONG.Id, Name = "Side wall long: Drill mount holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; SIDEWALL_SHORT_CUT = new M_Operation { ArticleId = articles.SIDEWALL_SHORT.Id, Name = "Side wall short: Cut short side", Duration = 5, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; SIDEWALL_SHORT_DRILL = new M_Operation { ArticleId = articles.SIDEWALL_SHORT.Id, Name = "Side wall short: Drill mount holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; BASEPLATE_TRUCK_BED_CUT = new M_Operation { ArticleId = articles.BASEPLATE_TRUCK_BED.Id, Name = "Base plate Truck-Bed: Cut Base plate Truck-Bed", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; BASEPLATE_TRUCK_BED_DRILL = new M_Operation { ArticleId = articles.BASEPLATE_TRUCK_BED.Id, Name = "Base plate Truck-Bed: Drill mount holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; // Eengin Block ENGINE_BLOCK_CUT = new M_Operation { ArticleId = articles.ENGINE_BLOCK.Id, Name = "Engine-Block: Cut Engine-Block", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; ENGINE_BLOCK_DRILL = new M_Operation { ArticleId = articles.ENGINE_BLOCK.Id, Name = "Engine-Block: Drill mount holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; // cabin CABIN_CUT = new M_Operation { ArticleId = articles.CABIN.Id, Name = "Cabin: Cut Cabin", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; CABIN_DRILL = new M_Operation { ArticleId = articles.CABIN.Id, Name = "Cabin: Drill mount holes", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; // Base Plate BASE_PLATE_CUT = new M_Operation { ArticleId = articles.BASE_PLATE.Id, Name = "Base plate: Cut Base plate", Duration = 10, ResourceCapabilityId = SawTools.GetNext().Id, HierarchyNumber = 10 }; BASE_PLATE_DRILL = new M_Operation { ArticleId = articles.BASE_PLATE.Id, Name = "Base plate: drill holes for axis mount", Duration = 5, ResourceCapabilityId = DrillTools.GetNext().Id, HierarchyNumber = 20 }; }