(!******************************************************
Mosel Example Problems
======================
file g2dimens.mos
`````````````````
Diminsioning of a mobile phone network
Consider a network of 10 cells and a 5-node ring of hubs
(simple hubs + one MTSO=Mobile Telephone Switching Office
that controls the network) with defined capacity.
The more links between a cell and the ring increases
the reliability of the network. The traffic in this type of
system is equivalent to bidirectional circuits. The capacity
is the number of simultaneous calls during peak periods. The
required number of connections, forecasted traffic, and the
cost per connection is known. Which connections of cells to
the ring minimize the connection costs while still meeting
the traffic demand within the capacity limit?
First, ensure that the ring capacity is sufficiently large to
meet all the traffic requirements with an 'if-then' condition.
If not, the function 'exit' is used to stop the execution.
A simple MIP formulation follows.
(c) 2008-2022 Fair Isaac Corporation
author: S. Heipcke, Apr. 2002, rev. Mar. 2022
*******************************************************!)
model "G-2 Mobile network dimensioning"
uses "mmxprs"
declarations
HUBS = 1..4
MTSO = 5 ! Node number of MTSO
NODES = HUBS+{MTSO} ! Set of nodes (simple hubs + MTSO)
CELLS = 1..10 ! Cells to connect
CAP: integer ! Capacity of ring segments
COST: array(CELLS,NODES) of integer ! Connection cost
TRAF: array(CELLS) of integer ! Traffic from every cell
CNCT: array(CELLS) of integer ! Connections of a cell to the ring
ifconnect: array(CELLS,NODES) of mpvar ! 1 if cell connected to node,
! 0 otherwise
end-declarations
initializations from 'g2dimens.dat'
CAP COST TRAF CNCT
end-initializations
! Check ring capacity
if not (sum(c in CELLS) TRAF(c)*(1-1/CNCT(c)) <= 2*CAP) then
writeln("Ring capacity not sufficient")
exit(0)
end-if
! Objective: total cost
TotCost:= sum(c in CELLS, n in NODES) COST(c,n)*ifconnect(c,n)
! Number of connections per cell
forall(c in CELLS) sum(n in NODES) ifconnect(c,n) = CNCT(c)
! Ring capacity
sum(c in CELLS, n in HUBS) (TRAF(c)/CNCT(c))*ifconnect(c,n) <= 2*CAP
forall(c in CELLS, n in NODES) ifconnect(c,n) is_binary
! Solve the problem
minimize(TotCost)
! Solution printing
writeln("Total cost: ", getobjval, " (total traffic in the ring: ",
getsol(sum(c in CELLS, n in HUBS) (TRAF(c)/CNCT(c))*ifconnect(c,n)), ")")
forall(c in CELLS) do
write(c, " ->")
forall(n in NODES | getsol(ifconnect(c,n))>0) write(" ", n)
writeln
end-do
end-model