Let $X$ be a compact space and let $A$ be a convex compact subset of $\mathbb R^d$ (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$. Consider the set $S \subseteq \mathbb R^d$ defined by
$$ S := \left\{\int_{X}v(x)\pi(x)\,\mathrm{d}P(x) \mid \pi \in \Pi\right\}, $$
where $\Pi$ is the set of $P$-measurable functions from $X$ to $A$.
Question. Under what general conditions is $S$ a closed subset of $\mathbb R^d$ ?