1

I am currently working on a demo problem where the network is : Plant -- Warehouse -- Customer . I need to find out the optimal number of warehouses which are required for cost minimization . I have transportation cost and handling cost of Plants and warehouses . I also have demand of customers . I have already solved using Mixed Integer Programming ,but want to reduce the time of run .Can anyone please help me out with the approach with Simulated Annealing or Genetic Algorithm for this problem .Thanking in advance .

With regards, Shourya

PLANTS=['P1','P2']
FACILITIES = ['A', 'B', 'C', 'D']
CUSTOMERS  = range(1, 10)

# Capacity of a facility at each site
CAPACITY = dict(A=0, B=0, C=0, D=0)
CAPACITY_P=dict(P1=100,P2=200)

# Demand from each customer
DEMAND = {1:10, 2:14, 3:17, 4:8, 5:9, 6:12, 7:11, 8:15, 9:16}
DEMAND_W = {'A': 0,'B':0,'C':0,'D':0}

# Transportation cost from each facility to each customer
C = dict(A = {1:1000000, 2: 4, 3:17, 4:33, 5:47, 6:98, 7:19, 8:10, 9: 6},
  B = {1:2, 2:12, 3: 4, 4:23, 5:16, 6:78, 7:47, 8: 9, 9:82}, 
  C = {1:17, 2:34, 3:65, 4:25, 5: 7, 6:67, 7:45, 8:13, 9:54},
  D = {1:60, 2: 8, 3:79, 4:24, 5:28, 6:19, 7:62, 8:18, 9:45}
)

# Transportation cost from each plant to each facility 
C_P = dict(
        P1= {'A':50, 'B':1,'C':5,'D': 30},
        P2 = {'A':35, 'B':70, 'C':45,'D':100})
#Handling cost 
H_COST = dict(A=500, B=600, C=700, D=800, P1=1000, P2= 4000)
  • It's hard to answer. For a genetic algorithm you need to express a "cost" function. In general, to get help, we need to know how all these variable are related and print out a single number: like cost(plant, facility, customer, capacy, capacity_p, demand, demand_w, c, c_p, h_cost) – Fabrizio Nov 05 '19 at 10:18
  • Hello Fabrizio , thanks for your reply . Can you share me what you actually meant from the cost function or any way to make the cost function ! – Shourya Chakrabarti Nov 05 '19 at 10:22
  • The "cost" function should return a value (or values) that can be interpreted as "how much it cost to do a transaction using certain resources". Imagine simplifying your program having only 1 plant and 2 customers (and no other parameters), where the cost of shipping to the first is "6" and to ship to the second is "12"---> cost(factory1, customer1) return 6, cost(factory1, customer2) return 12. You need to build such function including all your parameters. – Fabrizio Nov 05 '19 at 10:30

0 Answers0