I was trying to generate random connected planar graph for dome numerical experiment of some transportation problem. I have three types of nodes: supply, transshipment and demand. I have the number of nodes and edges; also, i have following rules:
- There is no arc from supply nodes driectly to demand nodes. The connection between these two must be through transshipment nodes.
- It must be a connected graph.
- The grapgh can be either directed or undirected.
- Total number of edges is given, but there is no specific rule about exact number of edges between different types of nodes.
- There are no edges between supply nodes; however, it is not the case for transshipment and demand nodes. Any ideas how to code it? (no matter in what language, i just want to have an understanding of the process)