Constraint formulation that include consecutive values in an optimization problem

49 Views Asked by At

I am currently lost in finding a way on how to mathematically formulate a constraint within the following problem:

I want to allocate some water tanks locations within a network, which size will vary depending on the demand in each location. There would be one water supply location in the network, which will then deliver the water to the water tanks locations through a pipeline.

I'd like to develop model as such that the nearest water tank locations to the source has the largest diameter of pipeline, which size should be able to cover all demand from the water tanks that would be installed along the network (e.g. 1 m). The second water tanks locations will then be connected to the closest water tank location and have the second largest pipeline diameter, which is the diameter of the pipeline used in the first water tank location (the one that is the nearest to the supply point) minus the actual size of pipeline that the location needed (e.g 30 liter requires 0.3 m, thus the total pipeline diameter that will be installed in the second location is (1 - 0.3) = 0.7m from the first location to the second one. Is there a way to model such a thing?

FYI, the locations are to be determined by the optimization as well, so in this case no locations are known in advance except the supply location.

Thank you in advance!

1

There are 1 best solutions below

1
On

This is a partial answer. Suppose we already know the locations of the tanks. Let $d_j$ be the distance from tank $j$ to the supply, and suppose the tanks are sorted in increasing order of $d_j$. Then the supply is connected to tank 1, which is connected to tank 2, ..., which is connected to tank $N$. ($N$ is the number of tanks.)

Let $p_j$ be the diameter of the pipeline needed for tank $j$, assuming tank $j$ is the only tank (the "actual size" that the location needed).

Let $y_j$ be the diameter of the pipeline connecting tank $j$ to tank $j-1$, for $j=1,\ldots,N$ (or connecting the tank to the supply, if $j=1$). These are decision variables. You can enforce the relationships among the pipeline diameters with these constraints: $$\begin{align} y_N & = p_N \\ y_j & = y_{j+1} + p_j \end{align}$$