# Fields used in LG data structures

# =========================
# ID fields
# =========================
LG_F_SUPPLY_CHAIN_LEVEL_ID = "supplyChainLevelID"  # string, int for defaults, GUID for custom.
LG_F_WAREHOUSE_ID = "warehouseID"
LG_F_EXIST_WAREHOUSE_TYPE_ID = "existWarehouseTypeID"
LG_F_NEW_WAREHOUSE_TYPE_ID = "newWarehouseTypeID"
LG_F_VEHICLE_TYPE_ID = "vehicleTypeID"
LG_F_WORKER_TYPE_ID = "workerTypeID"
LG_F_COLD_CHAIN_ID = "coldChainID"
LG_F_THIRD_PARTY_LOG_CONTRACT_ID = "thirdPartyLogContractID"

# =========================
# Common fields
# =========================
LG_F_NAME = "name"  # string
LG_F_STR_CONST = "stringConstant"  # string;  Defaults only.
LG_F_CUSTOM = "custom"  # bool
# Baseline
LG_F_UNIT_COST = "unitCost"  # int
LG_F_WORKING_LIFE_YEARS = "workingLifeInYears"
LG_F_AVG_AMOUNT_BY_LEVEL_AGGR = "avgAmountByLevelAggr"
LG_F_AVG_AMOUNT_BY_LEVEL_DISAG = "avgAmountByLevelDisag"
LG_F_AMOUNT_BY_WAREHOUSE_DISAG = "amountByWarehouseDisag"
LG_F_ANNUAL_WATER_COST = "annualWaterCost"  # int; If entering component operating costs
LG_F_ANNUAL_ELECTRICAL_COST = "annualElectricalCost"  # int; If entering component operating costs
LG_F_OTHER_OPERATING_COSTS = "otherOperatingCosts"  # int; If entering component operating costs
LG_F_TOTAL_OPERATING_COSTS = "totalOperatingCosts"  # int; If entering costs as a lump sum
# Target setting
LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR = "targetWarehouseStdByLevelAggr"  # dict: supplyChainLevelID
LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG = (
    "targetWarehouseStdByLevelDisag"  # dict by warehouseLevelID by supplyChainLevelID
)
LG_F_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG = "targetWarehouseStdByWarehouseDisag"  # dict by warehouseLevelID
LG_F_TARG_EXISTING_PLANS_BY_LEVEL_AGGR = "targetExistingPlansByLevelAggr"  # numNeededPerLevelAggr
LG_F_TARG_EXISTING_PLANS_BY_LEVEL_DISAG = "targetExistingPlansByLevelDisag"  # numNeededPerLevelDisag
LG_F_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG = "targetExistingPlansByWarehouseDisag"  # numNeededPerWarehouseDisag
LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR = "targetNumAvailableByLevelAggr"  # numAvailablePerLevelAggr
LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG = "targetNumAvailableByLevelDisag"  # numAvailablePerLevelDisag
LG_F_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG = "targetNumAvailableByWarehouseDisag"  # numAvailablePerWarehouseDisag
LG_F_NUM_BUILT_BY_YEAR = "numBuiltByYear"  # 1D list of int
LG_F_LAND_COST = "landCost"  # int
LG_F_TOTAL_CONSTRUCT_COSTS = "totalConstructionCosts"  # int
LG_F_COST_CONSTRUCT_SQ_M = "costOfConstructionPerSqM"  # int
LG_F_SIZE_SQ_M = "sizeInSqM"  # int
LG_F_REHAB_COST = "rehabCost"  # int
LG_F_NUM_REHAB_BY_YEAR = "numRehabByYear"  # 1D list of int
# Volume analytics
LG_F_NUM_RESUPPLY_VISITS_BY_YEAR = "numResupplyVisitsByYear"
LG_F_AVG_PERC_POP_SERVED = "avgPercPopServed"
LG_F_CAPACITY = "capacity"
LG_F_NUM_MONTHS_SAFETY_STOCK = "numMonthsSafetyStock"
LG_F_DISTANCE_TO_SUPPLYING_WAREHOUSE = "distanceToSupplyingWarehouse"

# =========================
# Supply chain level records
# =========================
LG_SUPPLY_CHAIN_LEVEL_ID = LG_F_SUPPLY_CHAIN_LEVEL_ID
LG_SUPPLY_CHAIN_LEVEL_NAME = LG_F_NAME
LG_SUPPLY_CHAIN_LEVEL_STR_CONST = LG_F_STR_CONST
LG_SUPPLY_CHAIN_LEVEL_CUSTOM = LG_F_CUSTOM
LG_SUPPLY_CHAIN_LEVEL_AMOUNT = "amount"  # int
# Baseline
LG_SUPPLY_CHAIN_LEVEL_ANNUAL_WATER_COST = LG_F_ANNUAL_WATER_COST
LG_SUPPLY_CHAIN_LEVEL_ANNUAL_ELECTRICAL_COST = LG_F_ANNUAL_ELECTRICAL_COST
LG_SUPPLY_CHAIN_LEVEL_OTHER_OPERATING_COSTS = LG_F_OTHER_OPERATING_COSTS
LG_SUPPLY_CHAIN_LEVEL_TOTAL_OPERATING_COSTS = LG_F_TOTAL_OPERATING_COSTS
# Target setting
LG_SUPPLY_CHAIN_LEVEL_LAND_COST = LG_F_LAND_COST
LG_SUPPLY_CHAIN_LEVEL_TOTAL_CONSTRUCT_COSTS = LG_F_TOTAL_CONSTRUCT_COSTS
LG_SUPPLY_CHAIN_LEVEL_COST_CONSTRUCT_SQ_M = LG_F_COST_CONSTRUCT_SQ_M
LG_SUPPLY_CHAIN_LEVEL_SIZE_SQ_M = LG_F_SIZE_SQ_M
LG_SUPPLY_CHAIN_LEVEL_NUM_BUILT_BY_YEAR = LG_F_NUM_BUILT_BY_YEAR
LG_SUPPLY_CHAIN_LEVEL_REHAB_COST = LG_F_REHAB_COST
LG_SUPPLY_CHAIN_LEVEL_NUM_REHAB_BY_YEAR = LG_F_NUM_REHAB_BY_YEAR
# Volume analytics
LG_SUPPLY_CHAIN_LEVEL_NUM_RESUPPLY_VISITS_BY_YEAR = LG_F_NUM_RESUPPLY_VISITS_BY_YEAR
LG_SUPPLY_CHAIN_LEVEL_CAPACITY = LG_F_CAPACITY
LG_SUPPLY_CHAIN_LEVEL_NUM_MONTHS_SAFETY_STOCK = LG_F_NUM_MONTHS_SAFETY_STOCK
LG_SUPPLY_CHAIN_LEVEL_DISTANCE_TO_SUPPLYING_WAREHOUSE = LG_F_DISTANCE_TO_SUPPLYING_WAREHOUSE


# =========================
# Warehouse records
# =========================
LG_WAREHOUSE_ID = LG_F_WAREHOUSE_ID
LG_WAREHOUSE_NAME = LG_F_NAME
LG_WAREHOUSE_PARENT_ID = "parentID"  # string
LG_WAREHOUSE_SUPPLY_CHAIN_LEVEL_ID = LG_F_SUPPLY_CHAIN_LEVEL_ID
LG_WAREHOUSE_CUSTOM = LG_F_CUSTOM
LG_WAREHOUSE_TYPE = "warehouseType"  # int
# Baseline
LG_WAREHOUSE_LEVEL_AMOUNTS = "amountsByLevelDisag"
LG_WAREHOUSE_AVG_OPERATING_COSTS_BY_LEVEL = "averageOperatingCostsByLevel"
LG_WAREHOUSE_AVG_CONSTRUCTION_COSTS_BY_LEVEL = "averageConstructionCostsByLevel"
LG_WAREHOUSE_ANNUAL_WATER_COST = LG_F_ANNUAL_WATER_COST
LG_WAREHOUSE_ANNUAL_ELECTRICAL_COST = LG_F_ANNUAL_ELECTRICAL_COST
LG_WAREHOUSE_OTHER_OPERATING_COSTS = LG_F_OTHER_OPERATING_COSTS
LG_WAREHOUSE_TOTAL_OPERATING_COSTS = LG_F_TOTAL_OPERATING_COSTS
# Target setting
LG_WAREHOUSE_LAND_COST = LG_F_LAND_COST
LG_WAREHOUSE_TOTAL_CONSTRUCT_COSTS = LG_F_TOTAL_CONSTRUCT_COSTS
LG_WAREHOUSE_COST_CONSTRUCT_SQ_M = LG_F_COST_CONSTRUCT_SQ_M
LG_WAREHOUSE_SIZE_SQ_M = LG_F_SIZE_SQ_M
LG_WAREHOUSE_NUM_BUILT_BY_YEAR = LG_F_NUM_BUILT_BY_YEAR
LG_WAREHOUSE_NUM_BUILT_BY_YEAR_BY_LEVEL = "numBuiltByYearByLevel"
LG_WAREHOUSE_REHAB_COST = LG_F_REHAB_COST
LG_WAREHOUSE_REHAB_COSTS_BY_LEVEL = "rehabCostsByLevel"
LG_WAREHOUSE_NUM_REHAB_BY_YEAR = LG_F_NUM_REHAB_BY_YEAR
LG_WAREHOUSE_NUM_REHAB_BY_YEAR_BY_LEVEL = "numRehabByYearByLevel"
LG_WAREHOUSE_NUM_MOVED = "numMoved"
LG_WAREHOUSE_NUM_MOVED_BY_LEVEL = "numMovedByLevel"
LG_WAREHOUSE_TARGET_TRANSFER_SOURCE = "targetTransferSource"
LG_WAREHOUSE_TARGET_TRANSFER_SOURCE_BY_LEVEL = "targetTransferSourceByLevel"
LG_WAREHOUSE_YEAR_MOVED = "yearMoved"
LG_WAREHOUSE_YEAR_MOVED_BY_LEVEL = "yearMovedByLevel"
# Volume analytics
LG_WAREHOUSE_NUM_RESUPPLY_VISITS_BY_YEAR = LG_F_NUM_RESUPPLY_VISITS_BY_YEAR
LG_WAREHOUSE_NUM_RESUPPLY_VISITS_BY_YEAR_BY_LEVEL = "numResupplyVisitsByYearByLevel"
LG_WAREHOUSE_AVG_PERC_POP_SERVED = LG_F_AVG_PERC_POP_SERVED
LG_WAREHOUSE_CAPACITY = LG_F_CAPACITY
LG_WAREHOUSE_CAPACITY_BY_LEVEL = "capacityByLevel"
LG_WAREHOUSE_NUM_MONTHS_SAFETY_STOCK = LG_F_NUM_MONTHS_SAFETY_STOCK
LG_WAREHOUSE_NUM_MONTHS_SAFETY_STOCK_BY_LEVEL = "numMonthsSafetyStockByLevel"
LG_WAREHOUSE_DISTANCE_TO_SUPPLYING_WAREHOUSE = LG_F_DISTANCE_TO_SUPPLYING_WAREHOUSE
LG_WAREHOUSE_DISTANCE_TO_SUPPLYING_WAREHOUSE_BY_LEVEL = "distanceToSupplyingWarehouseByLevel"


# =========================
# Vehicle records
# =========================
LG_VEHICLE_TYPE_ID = LG_F_VEHICLE_TYPE_ID
LG_VEHICLE_TYPE_NAME = LG_F_NAME
LG_VEHICLE_TYPE_STR_CONST = LG_F_STR_CONST
LG_VEHICLE_TYPE_CUSTOM = LG_F_CUSTOM
# Baseline
LG_VEHICLE_TYPE_AVG_AMOUNT_BY_LEVEL_AGGR = LG_F_AVG_AMOUNT_BY_LEVEL_AGGR
LG_VEHICLE_TYPE_AVG_AMOUNT_BY_LEVEL_DISAG = LG_F_AVG_AMOUNT_BY_LEVEL_DISAG
LG_VEHICLE_TYPE_AMOUNT_BY_WAREHOUSE_DISAG = LG_F_AMOUNT_BY_WAREHOUSE_DISAG
LG_VEHICLE_TYPE_UNIT_COST = LG_F_UNIT_COST
LG_VEHICLE_TYPE_WORKING_LIFE_YEARS = LG_F_WORKING_LIFE_YEARS  # 1d list of int; years other than base year appear in Targets section (for Vary number of trips per year option)
LG_VEHICLE_TYPE_FUEL_CONSUMPTION = "fuelConsumption"  # int
LG_VEHICLE_TYPE_REP_MAINT_COST_PERC_CAP_COST = "repairMaintAsPercCapitalCost"  # int
LG_VEHICLE_TYPE_NUM_TRIPS = "numTrips"  # 1d list of int; years other than base year appear in Targets section (for Vary number of trips per year option)
LG_VEHICLE_TYPE_AVG_KM_PER_TRIP = "avgKmPerTrip"  # 1d list of int; years other than base year appear in Targets section (for Vary number of trips per year option)
LG_VEHICLE_TYPE_COST_PETROL_PER_VEHIC_YEAR = "costPetrolPerVehicleYear"  # int
# Target setting
LG_VEHICLE_TYPE_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR
LG_VEHICLE_TYPE_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG
LG_VEHICLE_TYPE_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG
LG_VEHICLE_TYPE_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR
LG_VEHICLE_TYPE_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG
LG_VEHICLE_TYPE_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG
LG_VEHICLE_TYPE_TARG_EXISTING_PLANS_BY_LEVEL_AGGR = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_AGGR
LG_VEHICLE_TYPE_TARG_EXISTING_PLANS_BY_LEVEL_DISAG = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_DISAG
LG_VEHICLE_TYPE_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG = LG_F_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG
# Volume analytics
LG_VEHICLE_TYPE_PERC_SERVICED_BY_LEVEL_AGGR = "percServicedByLevelAggr"
LG_VEHICLE_TYPE_PERC_SERVICED_BY_WAREHOUSE_DISAG = "percServicedByWarehouseDisag"
LG_VEHICLE_TYPE_PERC_SERVICED_BY_LEVEL_DISAG = "percServicedByLevelDisag"
LG_VEHICLE_TYPE_DWELL_TIME_BY_LEVEL_AGGR = "dwellTimeByLevelAggr"
LG_VEHICLE_TYPE_DWELL_TIME_BY_WAREHOUSE_DISAG = "dwellTimeByWarehouseDisag"
LG_VEHICLE_TYPE_DWELL_TIME_BY_LEVEL_DISAG = "dwellTimeByLevelDisag"
LG_VEHICLE_TYPE_CAPACITY = LG_F_CAPACITY
LG_VEHICLE_TYPE_AVG_SPEED = "avgSpeed"
LG_VEHICLE_TYPE_MAX_DAYS_ON_ROUTE = "maxDaysOnRoute"


# =========================
# Worker records
# =========================
LG_WORKER_TYPE_ID = LG_F_WORKER_TYPE_ID  # string, int for defaults, GUID for custom.
LG_WORKER_TYPE_NAME = "name"  # string
LG_WORKER_TYPE_STR_CONST = "stringConstant"  # string;  Defaults only.
LG_WORKER_TYPE_CUSTOM = "custom"  # bool
# Baseline
LG_WORKER_TYPE_AVG_AMOUNT_BY_LEVEL_AGGR = LG_F_AVG_AMOUNT_BY_LEVEL_AGGR
LG_WORKER_TYPE_AVG_AMOUNT_BY_LEVEL_DISAG = LG_F_AVG_AMOUNT_BY_LEVEL_DISAG
LG_WORKER_TYPE_AMOUNT_BY_WAREHOUSE_DISAG = LG_F_AMOUNT_BY_WAREHOUSE_DISAG
LG_WORKER_TYPE_ANNUAL_WAGES = "annualWages"  # float
LG_WORKER_TYPE_ANNUAL_REAL_SALARY_INC = "annualRealSalaryIncrease"  # int
LG_WORKER_TYPE_ANNUAL_BENEFITS = "annualBenefits"  # float
LG_WORKER_TYPE_ANNUAL_BENEFITS_ADJUST = "annualBenefitsAdjustment"  # int
# Target setting
LG_WORKER_TYPE_TARG_CONFIG_OPTION = "targetConfigOption"  # int
LG_WORKER_TYPE_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR
LG_WORKER_TYPE_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG
LG_WORKER_TYPE_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG
LG_WORKER_TYPE_NUM_EXISTING_PLANS_BY_LEVEL_AGGR = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_AGGR
LG_WORKER_TYPE_NUM_EXISTING_PLANS_BY_LEVEL_DISAG = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_DISAG
LG_WORKER_TYPE_NUM_EXISTING_PLANS_BY_WAREHOUSE_DISAG = LG_F_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG
LG_WORKER_TYPE_VEHICLE_STD = (
    "targetNumWorkersPerVehicleType"  # 1d list of int; by vehicle type (if vehicle standard chosen)
)
LG_WORKER_TYPE_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR
LG_WORKER_TYPE_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG
LG_WORKER_TYPE_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG
# Volume analytics
LG_WORKER_TYPE_CLASSIFICATION = "classification"
LG_WORKER_TYPE_CAPACITY = LG_F_CAPACITY


# =========================
# Cold chain records
# =========================
LG_COLD_CHAIN_ID = LG_F_COLD_CHAIN_ID
LG_COLD_CHAIN_NAME = LG_F_NAME
LG_COLD_CHAIN_STR_CONST = LG_F_STR_CONST
LG_COLD_CHAIN_CUSTOM = LG_F_CUSTOM
LG_COLD_CHAIN_TYPE = "coldChainType"  # int
# Baseline
LG_COLD_CHAIN_AVG_AMOUNT_BY_LEVEL_AGGR = LG_F_AVG_AMOUNT_BY_LEVEL_AGGR
LG_COLD_CHAIN_AVG_AMOUNT_BY_LEVEL_DISAG = LG_F_AVG_AMOUNT_BY_LEVEL_DISAG
LG_COLD_CHAIN_AMOUNT_BY_WAREHOUSE_DISAG = LG_F_AMOUNT_BY_WAREHOUSE_DISAG
LG_COLD_CHAIN_UNIT_COST = LG_F_UNIT_COST
LG_COLD_CHAIN_CAPACITY = "capacity"
LG_COLD_CHAIN_MAINT_COST_PERC_CAP_COST = "maintCostPerc"
LG_COLD_CHAIN_WORKING_LIFE_YEARS = LG_F_WORKING_LIFE_YEARS
# Target setting
LG_COLD_CHAIN_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_AGGR
LG_COLD_CHAIN_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_WAREHOUSE_DISAG
LG_COLD_CHAIN_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG = LG_F_TARG_WAREHOUSE_STD_BY_LEVEL_DISAG
LG_COLD_CHAIN_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_AGGR
LG_COLD_CHAIN_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_LEVEL_DISAG
LG_COLD_CHAIN_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG = LG_F_TARG_NUM_AVAILABLE_BY_WAREHOUSE_DISAG
LG_COLD_CHAIN_TARG_EXISTING_PLANS_BY_LEVEL_AGGR = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_AGGR
LG_COLD_CHAIN_TARG_EXISTING_PLANS_BY_LEVEL_DISAG = LG_F_TARG_EXISTING_PLANS_BY_LEVEL_DISAG
LG_COLD_CHAIN_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG = LG_F_TARG_EXISTING_PLANS_BY_WAREHOUSE_DISAG

# =========================
# Third party contract records
# =========================
LG_TPL_CONTRACT_ID = LG_F_THIRD_PARTY_LOG_CONTRACT_ID
LG_TPL_CONTRACT_NAME = LG_F_NAME
LG_TPL_CONTRACT_STR_CONST = LG_F_STR_CONST
LG_TPL_CONTRACT_CUSTOM = LG_F_CUSTOM
LG_TPL_CONTRACT_COST = "cost"  # 1d list of int by year
