Layers position in LayeredDigraphLayout

I am new to gojs,I am having issues with LayerDigraphLayout, i want to represent in a graph 3 types of devices connected to a network(router, switch, pc) in a layout like treeLayout, but i can not use TreeModel because some nodes may have multiple parents, so i decide to use LayeredDigraphLayout but i have a problem

i think that with this code all device with the same type must be in the same layer, but i am getting this result

So what i can do to to result like this

It seems like, in your Link data, not all of the links are going in the direction you expect.

Make sure the links are all going “to” pc and “from” the other devices.

Thank you for your message, but my problem is hot to put nodes that have same type in the same layer ?

LayeredDigraphLayout does not allow for this, though you could group the PC nodes so that they act as one unit in the layout.

Like this: