sfc逻辑基本完成

This commit is contained in:
akwkevin
2021-08-02 18:08:43 +08:00
parent 0b8258003f
commit 831256336f
13 changed files with 328 additions and 53 deletions

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util.DiagramDesigner;
@@ -68,5 +69,15 @@ namespace AIStudio.Wpf.SFC.ViewModels
this.LinkPoint = data.LinkPoint;
}
}
public void Execute()
{
double input = PreNode.OfType<Simulate_SolenoidViewModel>().Sum(p => p.DOLinkPoint?.Value ?? 0);
double output = NextNode.OfType<Simulate_SolenoidViewModel>().Sum(p => p.DOLinkPoint?.Value ?? 0);
if (LinkPoint != null)
{
LinkPoint.Value += input - output;
}
}
}
}