Problem description:
There is a set of pipes with a color of blue and a length of [1,1.5, 2,2.5, 3,3.5, 4] m. And any length of red pipe. Now there's a tunnel from the ground to the surface. In the channel, there are marked starting and ending depth segments, which are called the target layer; There are interlayers between the target layers. Now you need to fill the channel by combining the blue pipe and the red pipe.
Attention:
The adjacent blue pipes are connected using a 0.43m length joint.
Blue -> Red -> Blue, in this order, need to use other length joint connection, such as 0.6m.
Various joints can not or as little as possible appear in the target layer.
When the interlayer length is greater than 12m, use the appropriate length of red pipe.
The red pipe must not appear in the target layer.
One of the two ends of the target layer should be aligned with the first blue pipe used.
What can be done to get the optimal combination of connections?
Example destination layer start and end location information:
(1559.12m, 1562.42m)
(1539.41m, 1541.51m)
(1523.51m, 1525.01m)
(1519.51m, 1521.51m)
(1514.91m, 1517.41m)
(1482.10m, 1482.80m)
(1480.90m, 1481.60m)
(1473.10m, 1473.80m)
(1469.00m, 1472.40m)
(1463.60m, 1465.00m)
(1449.40m, 1452.10m)
Have you tried creating a solution? If so, what problem did you run into?
This problem appears to be underspecified¹. In particular, it asks you to find an optimal solution but does not say anything about the cost function that you need to minimize².
It's also not clear to me what the implications are of the various joint connection lengths, for example:
- Do these represent an overlap, or an extension?
- Can a red-blue joint intrude on a target layer?
- Are there any restrictions at all on a Blue->Red->Red->Blue joint?
¹ It also has the feel of a problem that's been set for educational or assessment purposes. Working under that assumption, I'll limit my responses to raising questions for you to consider instead of proposing solutions.
² Or, equivalently, the value function to maximize.
I guess here the optimization problem is a feasibility problem, I.e., no cost function involved, only the constraints (length of the pipes) need to be satisfied.
I'm sorry about not clearly describe the conditions.
- the pipe combination can be longer than the tunnel.
- red-blue joint can not intrude on a target layer. But if max length of pipe is less than the target layer thickness, then one pipe can't be enough, we maybe use a few pipes, then we should use minimal pipes to cover that layer.
- Blue->Red->Red->Blue is not exist. red can be any length but greater than 12.so red -> red is meaningless.
yep, I have tried to solve this problem. but can't find a solution(good pipe combination) to solve it.
yep. maybe we can abstract a math model to represent this problem. but math uhhh....it's hard.