2
$\begingroup$

I am formulating constraints for a network as shown in Figure Network.

Blue circles represent a set of nodes, $N = \{1, 2, \ldots, 5\}$. Three different types of devices are connected to different nodes in the network. Some of the devices are shared among multiple nodes, e.g., device 2 (in sun shape) is connected with nodes 1, 2, and 4. I want to select the minimum number of nodes where the following constraint should meet.

  1. A node $T$ must be selected. This $T$ can be any node from blue circles in the network.
  2. At least $k$ nodes from blue circles should be selected that are connected to rectangle-shaped $G$ device. In the above figure, $k$ can be node 2 or node 4 or both if $k$ is 2.
  3. There should be a path between any two pairs of selected nodes. It means that the selected graph should not be disconnected.

I have written the following MILP formulation.

$$\min \sum_{i\in N} x_{i}$$

The constraints are as follows:

$$x_{T} = 1$$ $$\sum_{i\in N} G_{i} \cdot x_{i} \ge k$$ $$\sum_{i\in N, i \ne j} \text{ConnectedNodes}_{i, j} \cdot x_{i} \ge x_{j} \quad \forall j \in N$$

The connectivity constraint is not working correctly and I am not sure how can I enforce constraint 3. I have seen some examples of subgraph generation to ensure connectivity. However, in my case, the selected number of nodes is dynamic. For example, if we fix the value of $k$ to 1, then only node 2 will be selected if node $T$ is node 2. Only nodes 1 and 2 will be selected if node $T$ is node 1. Similarly, nodes 2, 3, and 5 will be selected if node $T$ is node 5. Any help or suggestion in this regard is highly appreciated.

$\endgroup$
7
  • $\begingroup$ cs.stackexchange.com/q/159983/755 $\endgroup$ Commented Sep 14, 2023 at 6:18
  • $\begingroup$ @D.W. Thank you for sharing the link. I think the problem in my case is different because if I consider node T as a source node, then it will check the vertices only on one side. In my case, the vertices can be explored on both sides of node T to meet the constraints. Furthermore, the question at the above link does not address the selection of the nearest node(s) and device(s) first. $\endgroup$ Commented Sep 14, 2023 at 7:25
  • $\begingroup$ OK! I just thought it might be helpful to see the technique. Regarding your question, I think it's too much for this website. We're looking to build a library/archive of questions that will be useful to others. There are so many details in your question (suns, triangles, rectangles, 7 rules, oh my), which makes it unlikely this will be relevant to others, and make it quite time-consuming to understand the question. $\endgroup$ Commented Sep 14, 2023 at 19:31
  • $\begingroup$ I suggest you try to boil down what is the key aspect that you are having difficulty with (is it expressing connectivity constraints? something else?) and formulate the simplest possible problem that contains that element and that you can't solve. $\endgroup$ Commented Sep 14, 2023 at 19:31
  • $\begingroup$ Regarding your constraints, I doubt that debugging what's wrong with a MILP formulation is on-topic on this site. $\endgroup$ Commented Sep 14, 2023 at 19:31

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.