1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
Public Class Element
Public LstForceRessort As List(Of Double)
Public LstForceRessortButee As List(Of Double)
Public LstForceEq As List(Of Double)
Public DicButee As Dictionary(Of Double, Double)
Public DispButee As Double
End Class
Dim e As New Element
For i = 0.0 To 7.0 Step 0.001
e.LstForceRessort.Add(KRess * i)
e.LstForceRessortButee.Add((KRess + (3 * coeffA * (i ^ 2) + 2 * coeffB * i + coeffC)) * i)
e.LstForceEq.Add(e.LstForceRessortButee(i * 1000) - e.LstForceRessort(i * 1000))
e.DicButee.Add(e.LstForceEq(i * 1000), i)
Next
For Each kvp As KeyValuePair(Of Double, Double) In e.DicButee
If (ecart - kvp.Key > 0.04) And (ecart - kvp.Key < 0.05) Then
e.DicButee.TryGetValue(kvp.Key, e.DispButee)
End If
Next kvp |