Question: INDR 2 2 0 : Introduction to Computing for Operations Research Homework 3 : The Cell Tower Coverage Problem In this homework, you will implement
INDR : Introduction to Computing for Operations Research
Homework : The Cell Tower Coverage Problem
In this homework, you will implement a Python script that solves the cell tower coverage
problem using CPLEX. A telecom company needs to build a set of cell towers to provide signal
coverage for the inhabitants of a given city. Htimes W potential locations where the towers could
be built have been identified. The towers have a fixed range it covers its own region and its
neighboring regions, namely, west, north, east, and south and only a limited number of them
can be built due to budget constraints. Given these restrictions, the company wishes to provide
coverage to the largest percentage of the population possible. To simplify the problem, the
company has split the area it wishes to cover into Htimes W regions, each of which has a known
population. The goal is then to choose which of the potential locations the company should
build cell towers on to provide coverage to as many people as possible.
The decision variables are
xij if tower is built in region ij:
otherwise
yij if region ij is covered by at least one tower, :
otherwise
and the given information includes
H height of city
W width of city
T maximum number of towers
pij population in region ij
The integer linear programming formulation of this problem becomes
maxi mizezsumiH sumjW pijyij
subject to: xijsumklin neighbors ijxklyijidots,H;jdots,W
sumiH sumjW xijT
xijinidots,H;jdots,W
yijinidots,H;jdots,Wpij H rows and W columns, and it is composed of the following lines for an example problem: import scipy.sparse as sp
import cplex as cp
def mixedintegerlinearprogrammingdirection A senses b c l u types, names:prob cpCplexprobvariables.addobj ctolist lb ltolist ub utolist types types.tolist names names.tolistif direction "maximize":
prob.objective.setsenseprobobjective.sense.maximize
else:
prob.objective.setsenseprobobjective.sense.minimizeproblinearconstraintsaddsenses sensestolist rhs btolistrowindices colindices Anonzero
prob.linearconstraintssetcoefficientsziprowindicestolist colindicestolist Adata.tolist
printprobwriteasstringprobsolveprintprobsolution.getstatus
printprobsolution.statusprobsolution.getstatusxstar prob.solution.getvalues
objstar prob.solution.getobjectivevalue
returnxstar objstar def celltowercoverageproblempopulationsfile T:your implementation ends above
returnXstar
Xstar celltowercoverageproblempopulationstxt
printXstar
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
