I am looking for an IP model for finding a $k$-rooted minimum spanning forest on an undirected graph $G$.
Given a set of roots $R$ and a set of nodes $N$ $(R\cap N=\emptyset)$, I would find a forest of $k=|R|$ disjointed trees that span all nodes in $R \cup N$ where each $r \in R$ belongs to exactly one tree, and the sum of the edges in the trees is the minimum.
AFAIK, this is a well-known problem. However, I only found IP models for the (single) minimum spanning tree.
I tried to extrapolate a model from here, but to no avail (there are a few things I don't understand, and eventually my attempt does not avoid cycles).
I know that this is $\sf NP$-hard, but I would like to implement and test it on small instances.