haorenhui
2023-10-30 6d6cc10d9e8e242661da7fd655dec155a09d676c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
import { DataHierarchyProvider } from '../../libappsop/datahierarchy';
 
/**
 * Different capacity types of unit. Generic and not tied to specific demo data.
 */
export enum DataUnitCapacityType {
  Quantity = 'Quantity',
  Time = 'Time',
  TimeAggregation = 'Time aggregation',
}
 
/**
 * Time Capacities related labels used for example in capacities matrix. Generic and not tied to specific demo data.
 */
export enum DataUnitTimeCapacityInfo {
  Efficiency = 'Efficiency',
}
 
/**
 * Quantity Capacities related labels used for example in capacities matrix. Generic and not tied to specific demo data.
 */
export enum DataUnitQuantityCapacityInfo {
  MaxCapacity = 'Max capacity',
}
 
// TODO: To turn this into a hierarchical structure to avoid duplication. Units should be defined here and not in data.navigation.ts.
export enum DataMetalBaseEntityName {
  QAluminum = 'QAluminum',
  Asia = 'Asia',
  QiYing = 'Qi-Ying',
  CasterQiYing = 'Caster (Qi-Ying)',
  Casthouse = 'Casthouse (Qi-Ying)',
  CRCQiYing = 'CRC (Qi-Ying)',
  IngotQiying = 'Ingot (Qi-Ying)',
  MeltingFurnaceQuilmes = 'Melting furnace (Quilmes)',
  SupplierUBCScrapAsia = 'Supplier UBC scrap (Asia)',
}
 
/**
 * Unit names for food demo
 */
export enum DataFoodBaseUnit {
  DETruckFleet = 'DE Truck Fleet',
  Transportation = 'Transportation',
}
 
export const dataFoodUnits = {
  Europe: { Name: 'Europe', NameKey: 'Europe', ParentKey: '' },
  DCAustria: { Name: 'DC - Austria', NameKey: 'DCAustria', ParentKey: 'Europe' },
  DCBulgaria: { Name: 'DC - Bulgaria', NameKey: 'DCBulgaria', ParentKey: 'Europe' },
  DEWarehouseRawMaterial: { Name: 'DE Warehouse Raw Material', NameKey: 'DEWarehouseRawMaterial', ParentKey: 'Europe' },
  Plants: { Name: 'Plants', NameKey: 'Plants', ParentKey: 'Europe' },
  DenmarkPlant: { Name: 'Denmark Plant', NameKey: 'DenmarkPlant', ParentKey: 'Plants' },
  FrancePlant: { Name: 'France Plant', NameKey: 'FrancePlant', ParentKey: 'Plants' },
  DEFermenter: { Name: 'DE Fermenter', NameKey: 'DEFermenter', ParentKey: 'DenmarkPlant' },
  DEFinishing: { Name: 'DE Finishing', NameKey: 'DEFinishing', ParentKey: 'DenmarkPlant' },
  DEPackaging: { Name: 'DE Packaging', NameKey: 'DEPackaging', ParentKey: 'DenmarkPlant' },
  DEStrainer: { Name: 'DE Strainer', NameKey: 'DEStrainer', ParentKey: 'DenmarkPlant' },
  Suppliers: { Name: 'Suppliers', NameKey: 'Suppliers', ParentKey: 'Europe' },
  DEDairySupplier: { Name: 'DE Dairy Supplier', NameKey: 'DEDairySupplier', ParentKey: 'Suppliers' },
  PackagingSupplier: { Name: 'Packaging Supplier', NameKey: 'PackagingSupplier', ParentKey: 'Suppliers' },
  Transportation: { Name: 'Transportation', NameKey: 'Transportation', ParentKey: 'Europe' },
  DETruckFleet: { Name: 'DE Truck Fleet', NameKey: 'DETruckFleet', ParentKey: 'Transportation' },
  EURail: { Name: 'EU Rail', NameKey: 'EURail', ParentKey: 'Transportation' },
  EUShip: { Name: 'EU Ship', NameKey: 'EUShip', ParentKey: 'Transportation' },
};
 
// Only need define OndrawImageName if parent-child has same name
export const dataMetalsUnits = {
  QAluminum: { Name: 'QAluminum', NameKey: 'QAluminum', ParentKey: '' },
  AsiaUnit: { Name: 'Asia', NameKey: 'AsiaUnit', ParentKey: 'QAluminum' },
  AsiaSP: { Name: 'Asia', NameKey: 'AsiaSP', ParentKey: 'AsiaUnit' },
  TransportInAsia: { Name: 'Transport in Asia', NameKey: 'TransportInAsia', ParentKey: 'AsiaUnit' },
  QiYing: { Name: 'Qi-Ying', NameKey: 'QiYing', ParentKey: 'AsiaUnit', OndrawImageName: 'PLANT' },
  QiYingSP: { Name: 'Qi-Ying', NameKey: 'QiYingSP', ParentKey: 'AsiaUnit', OndrawImageName: '_HIERARCHICAL_0' },
  ColdmillQiYing: { Name: 'Cold mill (Qi-Ying)', NameKey: 'ColdmillQiYing', ParentKey: 'QiYing' },
  Coldmill1QiYing: { Name: 'Coldmill 1 (Qi-Ying)', NameKey: 'Coldmill1QiYing', ParentKey: 'ColdmillQiYing' },
  Coldmill2QiYing: { Name: 'Coldmill 2 (Qi-Ying)', NameKey: 'Coldmill2QiYing', ParentKey: 'ColdmillQiYing' },
  Coldmill3QiYing: { Name: 'Coldmill 3 (Qi-Ying)', NameKey: 'Coldmill3QiYing', ParentKey: 'ColdmillQiYing' },
  CasthouseQiYing: { Name: 'Casthouse (Qi-Ying)', NameKey: 'CasthouseQiYing', ParentKey: 'QiYing' },
  NorthAmericaUnit: { Name: 'North America', NameKey: 'NorthAmericaUnit', ParentKey: 'QAluminum' },
  NorthAmericaSP: { Name: 'North America', NameKey: 'NorthAmericaSP', ParentKey: 'NorthAmericaUnit' },
  TransportInNA: { Name: 'Transport in NA', NameKey: 'TransportInNA', ParentKey: 'NorthAmericaUnit' },
  Quentin: { Name: 'Quentin', NameKey: 'Quentin', ParentKey: 'NorthAmericaUnit' },
  RecyclingFurnaceQiYing: { Name: 'Recycling furnace (Qi-Ying)', NameKey: 'RecyclingFurnaceQiYing', ParentKey: 'CasthouseQiYing' },
  SouthAmericaUnit: { Name: 'South America', NameKey: 'SouthAmericaUnit', ParentKey: 'QAluminum' },
  Quilmes: { Name: 'Quilmes', NameKey: 'Quilmes', ParentKey: 'SouthAmericaUnit' },
  CasthouseQuilmes: { Name: 'Casthouse (Quilmes)', NameKey: 'CasthouseQuilmes', ParentKey: 'Quilmes' },
  MeltingFurnaceQuilmes: { Name: 'Melting furnace (Quilmes)', NameKey: 'MeltingFurnaceQuilmes', ParentKey: 'CasthouseQuilmes' },
};
 
export const dataFoodUnitsProvider: DataHierarchyProvider = new DataHierarchyProvider(dataFoodUnits);
export const dataMetalsUnitsProvider: DataHierarchyProvider = new DataHierarchyProvider(dataMetalsUnits);