2) The advanced way: Create a "tmap.edges" field for edges in each tiddler that holds outgoing edges.
In the docs section, have a look at "Storage of Edges" (http://tiddlymap.org/#Storage%20of%20Edges).
Just export a tiddler as ".tid" file after you created some outgoing edges and you'll see how the tiddlymap edges are stored in JSON format.
The same way you could do it if you don't want to use the gui...
Maybe have a look at this github discussion "How to link tiddlers progragmatically" (https://github.com/felixhayashi/TW5-TiddlyMap/issues/141)