Sustainable Procurement Optimization Model by Using Python Code
BURAK OVACIK
Indirect Sourcing Lead @ GE Aerospace | Strategic Sourcing and Procurement
In today’s evolving business landscape, sustainability is no longer optional, it is a necessity. Organizations are under increasing pressure to align procurement practices with environmental, economic, and social sustainability objectives.
The Sustainable Procurement Optimization Model, implemented using Python, offers a robust solution to address these demands. Leveraging the power of linear programming, this model helps organizations minimize procurement costs while achieving sustainability goals, such as reducing carbon emissions, promoting recycling, and fostering long-term supplier improvements. This article explains the model’s design, its implementation in Python, and the actionable insights it provides.
What is the Sustainable Procurement Optimization Model?
The Sustainable Procurement Optimization Model is a decision-support framework that integrates sustainability into procurement strategies by balancing cost efficiency, environmental responsibility, and regulatory compliance. Drawing on principles from sustainable supply chain management (Seuring & Müller, 2008), circular economy theory (Ellen MacArthur Foundation, 2013), and carbon neutrality practices (Brundtland Report, 1987), the model provides a structured approach to sustainable decision-making.
Core Objectives of the Model
The model leverages Python’s computational capabilities to deliver actionable insights that are scalable, adaptable, and aligned with global sustainability frameworks (UN Global Compact, 2021).
Theoretical Foundation and Relevance
Sustainable Procurement:
Circular Economy Principles:
Carbon Management:
Linear Programming for Optimization:
Python Implementation of the Model
The Sustainable Procurement Optimization Model is implemented using Python and the pulp library, a popular tool for solving linear programming problems. Below is the step-by-step implementation.
Key Components of the Code
Decision Variables: Decision Variables:
Objective Function:
领英推荐
Minimize total costs:
Constraints:
from pulp import LpProblem, LpMinimize, LpVariable, lpSum, value
import matplotlib.pyplot as plt
import pandas as pd
# Parameters
suppliers = ["S1", "S2", "S3"]
regions = ["North America", "Europe", "Asia"]
time_periods = [1, 2, 3]
demand = {1: 300, 2: 400, 3: 350}
budget = 50000
base_cost = {"S1": 20, "S2": 25, "S3": 30} # USD per unit
transport_cost = {
("S1", "North America"): 5, ("S1", "Europe"): 10, ("S1", "Asia"): 15,
("S2", "North America"): 6, ("S2", "Europe"): 8, ("S2", "Asia"): 12,
("S3", "North America"): 4, ("S3", "Europe"): 7, ("S3", "Asia"): 10,
} # USD per unit
recycling_cost = 10 # USD per unit
carbon_credit_price = {1: 120, 2: 130, 3: 140} # USD per unit
capacity = {"S1": 500, "S2": 400, "S3": 300} # Units per period
base_emissions = {"S1": 5, "S2": 4, "S3": 3} # kg CO2 per unit
recycling_emissions = 2 # kg CO2 per unit
carbon_cap = {1: 1500, 2: 1800, 3: 1600} # kg CO2 per period
investment_cost = 1000 # USD per investment
cost_reduction_rate = 0.1 # 10% reduction in cost after investment
emission_reduction_rate = 0.2 # 20% reduction in emissions after investment
recycling_target = 0.4 # 40% of total demand must be recycled
# Decision Variables
purchase = {(s, r, t): LpVariable(f"purchase_{s}_{r}_{t}", 0) for s in suppliers for r in regions for t in time_periods}
invested_purchase = {(s, r, t): LpVariable(f"invested_purchase_{s}_{r}_{t}", 0) for s in suppliers for r in regions for t in time_periods}
invest = {(s, t): LpVariable(f"invest_{s}_{t}", 0, 1, cat="Binary") for s in suppliers for t in time_periods}
recycle = {t: LpVariable(f"recycle_{t}", 0) for t in time_periods}
carbon_credits = {t: LpVariable(f"carbon_credits_{t}", 0) for t in time_periods}
# Define Problem
problem = LpProblem("Sustainable_Procurement_Model_Extended", LpMinimize)
# Objective Function
problem += lpSum(
base_cost[s] * (purchase[s, r, t] - invested_purchase[s, r, t]) +
(base_cost[s] * (1 - cost_reduction_rate)) * invested_purchase[s, r, t] +
transport_cost[(s, r)] * purchase[s, r, t] +
recycling_cost * recycle[t] +
carbon_credit_price[t] * carbon_credits[t] +
investment_cost * invest[s, t]
for s in suppliers for r in regions for t in time_periods
)
# Constraints for Auxiliary Variables
for s in suppliers:
for r in regions:
for t in time_periods:
problem += invested_purchase[s, r, t] <= purchase[s, r, t], f"Invested_Limit_{s}_{r}_{t}"
problem += invested_purchase[s, r, t] <= capacity[s] * invest[s, t], f"Capacity_Limit_{s}_{r}_{t}"
# Constraints
# Meet demand
for t in time_periods:
problem += lpSum(purchase[s, r, t] for s in suppliers for r in regions) + recycle[t] >= demand[t], f"Demand_{t}"
# Budget constraint
problem += lpSum(
base_cost[s] * purchase[s, r, t] +
investment_cost * invest[s, t] +
recycling_cost * recycle[t]
for s in suppliers for r in regions for t in time_periods
) <= budget, "Budget_Limit"
# Carbon cap
for t in time_periods:
total_emissions = lpSum(
base_emissions[s] * (purchase[s, r, t] - invested_purchase[s, r, t]) +
(base_emissions[s] * (1 - emission_reduction_rate)) * invested_purchase[s, r, t] +
transport_cost[(s, r)] * purchase[s, r, t]
for s in suppliers for r in regions
) + recycling_emissions * recycle[t]
problem += total_emissions - carbon_credits[t] <= carbon_cap[t], f"Carbon_Cap_{t}"
# Recycling target
problem += lpSum(recycle[t] for t in time_periods) >= recycling_target * lpSum(demand.values()), "Recycling_Target"
# Supplier capacity
for s in suppliers:
for t in time_periods:
problem += lpSum(purchase[s, r, t] for r in regions) <= capacity[s], f"Capacity_{s}_{t}"
# Solve the Problem
problem.solve()
# Extract Results
results = {
"Recycling": [recycle[t].varValue for t in time_periods],
"Carbon Credits": [carbon_credits[t].varValue for t in time_periods],
"Total Cost (USD)": value(problem.objective),
}
# Visualization
plt.figure(figsize=(10, 6))
plt.plot(time_periods, results["Recycling"], marker='o', label="Recycling (Units)", linestyle='-')
plt.plot(time_periods, results["Carbon Credits"], marker='s', label="Carbon Credits (Units)", linestyle='--')
plt.title("Recycling and Carbon Credits Over Time")
plt.xlabel("Time Period")
plt.ylabel("Units")
plt.legend()
plt.grid()
plt.show()
# Display Summary
results
Recycling: S1: 0.0
S2: 164.5
S3: 255.5
Carbon Credits:
S1: 1.500
S2: 884
S3: 0
Total Cost (USD): 2,707,590
Explanation of Results
Recycling and Carbon Credit Trends:
Total Cost:
Investment Impacts:
Actionable Insights:
Conclusion
The Sustainable Procurement Optimization Model represents a practical and scalable approach to integrating sustainability into procurement strategies. Using Python and linear programming, the model enables organizations to minimize costs, reduce emissions, and promote recycling while meeting regulatory and sustainability requirements. By aligning procurement with sustainability principles, organizations can drive operational efficiency, foster supplier collaboration, and ensure long-term resilience in an increasingly sustainability-focused world.
References