Let $X$ be a compact subset of $\mathbb R^n$ and let $A$ be a convex compact subset of $\mathbb R^k$ (e.g the probability simplex in $\mathbb R^d$). Let $P$ be a probability distribution on $X$ and $v$ be a $P$-measurable function from $X$ to $\mathbb R^{d \times k}$. Consider the set $S \subseteq \mathbb R^d$ defined by
$$ S := \left\{\int_{X}v\pi\,\mathrm{d}P \mid \pi \in \Pi\right\}, $$
where $\Pi$ is the set of $P$-measurable functions from $X$ to $A$.
Question 1. Under what general conditions is $S$ a closed subset of $\mathbb R^d$ ?
Perhaps even more generally,
Question 2. What is closure $\overline S$ of $S$ in $\mathbb R^d$ ?
Partial solution when $P$ has finite support
Suppose $P = \sum_{i=1}^N w_i\delta_{x_i}$, for some $x_1,\ldots,x_N \in X$ and $(w_1,\ldots,w_N) \in \Delta_{N-1}$. Let $M_i := w_iv(x_i) \in \mathbb R^{d \times k}$ for all $i \in [N]$. Then, one computes $$ \begin{split} S = \left\{\sum_{i=1}^N w_iv(x_i)\pi(x_i) \mid \pi \in \Pi\right\} &= \left\{\sum_{i=1}^N M_i a_i \mid a_1,\ldots,a_N \in A\right\}\\ & = B_1 + B_2 + \ldots + B_N, \end{split} $$
where $B_i := \{M_i a \mid a \in A\}$. It is clear that each $B_i$ is compact in $\mathbb R^d$. But the Minkowski sum of a finite number of closed subsets (with at least one of them compact) in a Hausdorff topological group is closed. See Corollary 3.2 of this paper. We conclude that $S$ is closed.