The purpose here is to generate independent samples from the following distribution:
$$P(x_1,x_2,\ldots,x_n) \propto e^{a_1x_1+a_2x_2+\cdots+a_nx_n}$$
and the support for the distribution is a n-1 dimensional simplex: $\{(x_1,x_2,\ldots,x_n):\sum_{i=1}^n x_i=1, x_i\ge0 ,i=1,2,\ldots,n\}$.
When $n=2$, it's quite easy to sample using inverse Cumulative Distribution method based on a uniform distributed random variable $u$ on $[0,1]$: $$x_1=\frac{\ln(1-(1-e^{a_1-a_2})\cdot u)}{a_1-a_2}\\ x_2=1-x_1$$
The question is can we do the similar transformation to do the sampling when $n>2$? I know we can use Gibbs sampler in this case, but that would give us dependent samples.
Any help is appreciated, thanks!