I am formulating a model that seeks to minimize the cost of shipping goods from factories to warehouses, where the cost of shipping is independent of the type or amount of goods being shipped (except when no goods are shipped, then the cost should be identically zero). To model this, I thought about creating an indicator variable that would apply the fixed cost of shipping from factory $i$ to warehouse $j$ if a given route was taken (i.e. the amount of goods sent via this route is not zero). Here is my current formulation:


The cost of shipping goods from factory $i$ to warehouse $j$: $c_{ij}\in \mathbb{R}_{+}$

$\textbf{Decision Variables}$

Amount of good $k$ (in tons) shipped from factory $i$ to warehouse $j$: $x_{ijk} \in \mathbb{Q}_{+}$

Indicator variable to apply cost $c_{ij}$: $y_{ij} = \mathbb{1}\{\sum_{k=1}^{p}x_{ijk} > 0\}$


We want to minimize the cost of shipping. To represent cost, we sum up all applied fixed costs, that is, sum up the cost of each route currently being taken: $$\min \sum_{i=1}^{n}\sum_{j=1}^{m}c_{ij}y_{ij}$$ where $n$ is the total number of factories and $m$ is the total number of warehouses.

Here is the heart of my question: Would it be logically equivalent to forget the indicator variable altogether and simply model the objective as: $$\min \sum_{i=1}^{n}\sum_{j=1}^{m}c_{ij}\sum_{k=1}^{p}x_{ijk}$$ In this case, routes that are quite expensive to take would have $\sum_{k=1}^{p}x_{ijk}=0$ (is this a correct assumption?), effectively eliminating that route from consideration. However, the costs would differ in magnitude and would not capture the true cost that is desired (as well as other potential other issues my untrained eye is missing). Still, if all that matters is the routes taken, would these objectives be equivalent in both desire and outcome?


1 Answer 1


Consider the following tiny example. You have two factories, one warehouse and two product. Factory 1 can produce both goods in sufficient quantity to meet demand but has a very large cost coefficient. Factory 2 only produces the second product, with adequate capacity and a small cost coefficient. The optimal solution to the original problem is to ship everything from factory 1: you have to pay $c_{1,1}$ anyway, since you need to ship product 1 from factory 1, so product 2 gets a free ride. The optimal solution to your modified model ships product 2 from factory 2 because it's cheaper than shipping from factory 1.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.