Exemple #1
0
 public MasterTableResource(MasterTableResourceCapability capability)
 {
     _capability = capability;
 }
        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
            };
        }