Innovative Section - Sustainable Logistic
Cardboard Saving Index(CSI) & Carbon-Weighted Cardboard Savings (CWCS)
Watch Tutorial
def calculate_csi(V_b, N_d, N_r, R_r):
"""
Calculate the Cardboard Savings Index (CSI).
Parameters:
V_b (float): Average volume of cardboard used per package (in cubic meters).
N_d (int): Total number of deliveries in a given time period.
N_r (int): Number of reuses per package (for reusable systems). If single-use, N_r = 1.
R_r (float): Reduction ratio in packaging volume achieved by dynamic optimization (e.g., 0.3 for 30%).
Returns:
float: Cardboard Savings Index (CSI) in cubic meters.
"""
# Traditional System: Total cardboard used
traditional_cardboard = (V_b * N_d) / N_r
# Innovative System: Total cardboard used after reduction
innovative_cardboard = V_b * N_d * (1 - R_r)
# Cardboard Savings Index (CSI)
csi = traditional_cardboard - innovative_cardboard
return csi
def calculate_cwcs(csi, C_c):
"""
Calculate the Carbon-Weighted Cardboard Savings (CWCS).
Parameters:
csi (float): Cardboard Savings Index (CSI) in cubic meters.
C_c (float): Carbon footprint of producing 1 cubic meter of cardboard (e.g., 200 kg CO₂/m³).
Returns:
float: Carbon-Weighted Cardboard Savings (CWCS) in kg CO₂.
"""
# Calculate CWCS
cwcs = csi * C_c
return cwcs
def on_eoq(event):
V_b = float(Element("V_b").element.value)
N_d = float(Element("N_d").element.value)
N_r = float(Element("N_r").element.value)
R_r = float(Element("R_r").element.value)
C_c = float(Element("C_c").element.value)
csi = calculate_csi(V_b, N_d, N_r, R_r)
# Calculate CWCS
cwcs = calculate_cwcs(csi, C_c)
# Output Results
result = ""
result += f"Traditional System Cardboard Used: {(V_b * N_d) / N_r:.2f} m³\n"
result += f"Innovative System Cardboard Used: {V_b * N_d * (1 - R_r):.2f} m³\n"
result += f"Cardboard Savings Index (CSI): {csi:.2f} m³\n"
result += f"Carbon-Weighted Cardboard Savings (CWCS): {cwcs:.2f} kg CO₂\n"
Element("out_eoq").element.innerHTML = result
Element("button_EOQ").element.onclick = on_eoq