I would like to generate random graphs that might be geometric graphs in some
(unknown) dimension. So I would like every triangle in the graph to satisfy the
triangle inequality on its (random) edge lengths/weights.
I need something akin to the Erdős/Rényi model such as, 
"[The weighted random graph model](https://arxiv.org/abs/0902.0897),"
but with the triangle geometric constraint.


The earlier MO question, "[Probability that random weights on $K\_n$ satisfy triangle inequality](https://mathoverflow.net/q/99813/6094)," seems quite relevant,
but I don't immediately see how it leads to a method for generating the
random graphs I need.


So my question is:



> 
> ***Q***. How can one generate random Erdős/Rényi weighted graphs
>  that satisfy the triangle inequality for every triangle in the graph?
> 
> 
> 



Generate random graphs that satisfy the triangle inequality
I am not sure I understand the issues: First you generate an ER (or your favorite model) random graph. The constraints that the edge lengths are in $[0, 1]$ and satisfy all possible triangle inequalities defines a polytope in $\mathbb{R}^E,$ and you are just trying to find a uniform random point in the polytope, which is a well-studied problem, see, e.g. [Uniformly Sampling from Convex Polytopes](https://mathoverflow.net/questions/9854/uniformly-sampling-from-convex-polytopes)


