mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-03-03 00:00:57 +08:00
sfc逻辑基本完成
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user