The ForceDirectedLayout will not be able to save the location of the manual drag node after the automatic layout

(1)

layout: $(go.ForceDirectedLayout,
  {
      // isInitial: false,
      // isOngoing: false, 
      //Edge Properties
      defaultSpringLength:1,
      defaultSpringStiffness:0.05,
      //Vertex Properties
      defaultElectricalCharge:150,
      defaultGravitationalMass:0,
      //ForceDirectedLayout Properties
      epsilonDistance:1,
      infinityDistance:1000,
      maxIterations:100,
      arrangementSpacing:new go.Size(100,100)
  }),

After using the ForceDirectedLayout to complete the automatic layout, then manually layout, drag the LC2 node to the desired location

After saving and loading, the value of loc in json has not changed, but the location of LC2 in the diagram has been changed by the ForceDirectedLayout

If I set both isInitial and isOngoing to false, there will be automatic layout invalidation…

(2)

What is Edge Properties?The edge of the node?Is it the edge of the visible diagram?
What is Vertex Properties?The properties of the node?What exactly is defaultElectricalCharge and defaultGravitationalMass in the figure above?
How does epsilonDistance, infinityDistance, maxIterations, and arrangementSpacing appear in the figure above?

Does the iteration mean the overlap of the nodes in the diagram?
I really don’t understand the API of ForceDirectedLayout…

To prevent the layout from happening after loading, set layout.isInitial to false.
Layout | GoJS API says:

If you have position information for all of the nodes when you load a model, you will typically have data bound the Part.location to some property on your node data. In order to avoid an initial layout causing those saved node positions to be discarded, you can either not set the Diagram.layout to a predefined layout or you can set isInitial to false.

Yes,setting layout.isInitial to false can prevent the layout from happening after loading.
But,as the figure shows,when I add the S Node on daigram,

Change:

Layout | GoJS API says:
Because performing layouts can be expensive in space and time, automatic layouts are performed only on “invalid” layouts, and only well after a layout has been invalidated. This state is held by the isValidLayout property. Many standard operations, such as adding or removing nodes or links, will cause the layout that is responsible for positioning those nodes or routing those links to be invalidated. Such invalidation is performed by calling invalidateLayout, which not only clears the isValidLayout state but also requests that the diagram do an automatic layout soon. You can avoid such invalidations by setting isOngoing to false.
But,setting layout.isOngoing to false,lost the ForceDirectedLayout.

Well, you need to decide when layouts should happen. If you don’t want to use automatic layouts (i.e. invalidation), set both Layout.isInitial and isOngoing to false and then call Diagram.layoutDiagram(true) when you want to.

Can you help me to mark the use of each parameter() in the picture?
What is Edge Properties?The edge of the node?Is it the edge of the visible diagram?
What is Vertex Properties?The properties of the node?What exactly is defaultElectricalCharge and defaultGravitationalMass in the figure above?
How does epsilonDistance, infinityDistance, maxIterations, and arrangementSpacing appear in the figure above?

Does the ForceDirectedLayout can layout 20,000 points and lines in 10min?Is there a test page for this performance?

Those fields in that sample just set the corresponding properties of ForceDirectedLayout. Read about the properties at ForceDirectedLayout | GoJS API.

20000 nodes and links is probably too large a graph for ForceDirectedLayout to handle in a reasonable amount of time. This would especially be true on slower or restricted memory machines such as old smartphones or Android tablets. When I tried it (after modifying that FDLayout demo to allow 5 digits in those entry fields) it took about 7 minutes on my machine. (It would have been much less if this were Java or .NET instead of JavaScript.) Anyway, I think that’s too long, and thus the graph is too large.

I read this document, but I can’t relate to the examples.


As documented at ForceDirectedLayout | GoJS API, ForceDirectedLayout models the physical forces of repulsive electrical charge on vertexes, attractive gravitational forces proportional to mass, and spring forces for the edges between vertexes.

The individual methods have documentation describing the calculated forces on each vertex.

I think in your case the nodes/vertexes are far enough apart that gravity has little effect, and all the forces are more-or-less in equilibrium.

That is because the electrical charge on the vertexes/nodes prevents them from coming closer to each other.