I'm having trouble solving following integer programming using python.
Let $G$ be a graph with nodes set $V=\{0,1,...,|V|-1\}$ and edges set $E$.
Define cost of each edge $(m,n)$ as $c_{m,n}$
set source $s \in V$ and destinations $d=\{d_0,...,d_{|d|-1}\}$
Let $b_{j,m,n}$ be binary variables defined as follows:
$b_{j,m,n}=1$ (if edge $(m,n)$ is in the path $s \rightarrow d_j$), $0(otherwise)$
I'm seeking a tree structure path from source $s$ to destinations $d$ of minimum cost. And the following is what tried to solve this integer programming.
$minimize \\ \sum_{m,n \in V}c_{m,n}\tilde{b_{m,n}}$ $\tilde{b_{m,n}}=1(0 \leq\exists j\leq |d|-1\ s.t.\ b_{j,m,n}=1), 0(otherwise)$
$constraints\\
b_{j,m,n}=0, 0\leq \forall j \leq |d|-1, m=n$
$\sum_{n\in V}b_{j,s,n}=1, 0\leq \forall j \leq |d|-1 $
$\sum_{m\in V}b_{j,m,d_j}=1, 0\leq \forall j \leq |d|-1 $
$\sum_{n \in V}(b_{j,m,n}-b_{j,n,m})=0,0\leq \forall j \leq |d|-1,\forall m \in V$
I'm trying to solve this using python PuLP. But I can't figure out how to deal with $\tilde b_{m,n}$ in objective function as I keep getting error. I would appreciate any help.
In other words, you want to send one unit of each commodity $j$ from the source node $s$ to destination $j$, with a fixed charge of $c_{m,n}$ for using edge $(m,n)$. To enforce the logical implication that $b_{j,m,n} = 1 \implies \bar{b}_{m,n}=1$, impose linear constraints $b_{j,m,n} \le \bar{b}_{m,n}$.