【算法项目】Capacitated Facility Location Problem

本文介绍了Capacitated Facility Location Problem,目标是最小化开启设施成本和客户分配成本之和,同时确保设施容量不超过需求。文章详细探讨了贪心算法和模拟退火算法的实现,包括代码示例和运算结果,以接近问题的最优解。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目地址:https://github.com/GostBop/CFLP

Capacitated Facility Location Problem

问题描述

Suppose there are n facilities and m customers. We wish to choose:

  1. which of the n facilities to open
  2. the assignment of customers to facilities

Note:

  1. The objective is to minimize the sum of the opening cost and the assignment cost.
  2. The total demand assigned to a facility must not exceed its capacity.

问题建模:

Let
I I I={1,…, I I I}:the set of f a c i l i t i e s facilities facilities
J J J={1,…, J J J}:the set of c u s t o m e r s customers customers
d j d_j dj c u s t o m e r customer customer j j j 's D e m a n d Demand Demand j ∈ J j∈J jJ
V i V_i Vi f a c i l i t y facility facility i i i 's C a p a c i t y Capacity Capacity i ∈ I i∈I iI
C i C_i Ci f a c i l i t y facility facility i i i 's O p e n i n g C o s t OpeningCost OpeningCost i ∈ I i∈I iI
A i j A_{ij} Aij: f a c i l i t y facility facility i i i 's A s s i g n m e n t C o s t AssignmentCost AssignmentCost for c u s t o m e r customer customer j j j i ∈ I i∈I iI j ∈ J j∈J jJ

For every f a c i l i t y facility facility i i i i ∈ I i∈I iI, define the following notations:
y i = { 1 i f . f a c i l i t y . i . i s . o p e n e d 0 o t h e r w i s e y_i = \begin{cases} 1 & if.facility.i.is.opened \\ 0 & otherwise \end{cases} yi={ 10if.facility.i.is.openedotherwise

For every f a c i l i t y facility facility i i i i ∈ I i∈I iI c u s t o m e r customer customer j j j j ∈ J j∈J jJ
x i j = { 1 i f . f a c i l i t y . i . i s . a s s i g n e d . f o r . c u s t o m e r . j 0 o t h e r w i s e x_{ij} = \begin{cases} 1 & if.facility.i.is.assigned.for.customer.j\\ 0 & otherwise \end{cases} xij={ 10if.facility.i.is.assigned.for.customer.jotherwise

Then the Capacitated Facility Location Problem may be written:
∑ j ∈ J d j x i j ≤ V i y i , i ∈ I \sum_{j∈J}d_jx_{ij} \leq V_iy_i,i∈I

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值