-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvehicleOpt.py
More file actions
139 lines (130 loc) · 7.22 KB
/
Copy pathvehicleOpt.py
File metadata and controls
139 lines (130 loc) · 7.22 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import numpy as np
from optimizer import optimizer
from dymolaAPI import dymolaAPI
from analysisResponse import AR
# define dymola sim env
import platform
import DyMat
import time
import json
import sys
import matplotlib.pyplot as plt
import pandas as pd
import os
import pyDOE2 as DOE
simStartTime = 1
simDeltaTime = 1/409.6
requestListFileName = "dymolaRequest.json"
numberRequest = 30
nameModel = "KIA_CAVALRY.Experiments.Chassis.HTT_Body_Free_20ch_Body_fixed"
namePackage = "C:/Users/ivh/Desktop/MJG/KIA_HTT/V01/KIA_CAVALRY/package.mo"
nameResult = "Res"
nameReqFileName = "HTT_Result"
paramSim = [nameModel,namePackage,nameResult,simStartTime, simDeltaTime, None, None,requestListFileName, numberRequest]
dymolaSim = dymolaAPI(paramSim)
dymolaSim.simulator()
paramAR =["C:/Users/ivh/Desktop/MJG/KIA_HTT/20201023/Res", None,dymolaSim.setRequest() ,simStartTime,simDeltaTime,nameReqFileName]
ar = AR(paramAR)
ar.writeMatFile()
# toKiaList = [
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle1.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle1.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle1.leftLinkage.springMount.frame_b.f[1]",
# "CAVALRY.axle1.leftLinkage.springMount.frame_b.f[2]",
# "CAVALRY.axle1.leftLinkage.springMount.frame_b.f[3]",
# "CAVALRY.axle1.leftLinkage.damperMount.frame_b.f[1]",
# "CAVALRY.axle1.leftLinkage.damperMount.frame_b.f[2]",
# "CAVALRY.axle1.leftLinkage.damperMount.frame_b.f[3]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b1.frame_a.f[1]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b1.frame_a.f[2]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b1.frame_a.f[3]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b2.frame_a.f[1]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b2.frame_a.f[2]",
# "CAVALRY.axle1.stabilizer.stabilizerMount.b2.frame_a.f[3]",
# "CAVALRY.axle1.steering.rackPinion.rackFrame.f[1]",
# "CAVALRY.axle1.steering.rackPinion.rackFrame.f[2]",
# "CAVALRY.axle1.steering.rackPinion.rackFrame.f[3]",
# "CAVALRY.axle1.steering.rackPinion.supportFrame.f[1]",
# "CAVALRY.axle1.steering.rackPinion.supportFrame.f[2]",
# "CAVALRY.axle1.steering.rackPinion.supportFrame.f[3]",
# "CAVALRY.axle1.leftBumpstopper.f",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle1.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle1.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle1.rightLinkage.springMount.frame_b.f[1]",
# "CAVALRY.axle1.rightLinkage.springMount.frame_b.f[2]",
# "CAVALRY.axle1.rightLinkage.springMount.frame_b.f[3]",
# "CAVALRY.axle1.rightLinkage.damperMount.frame_b.f[1]",
# "CAVALRY.axle1.rightLinkage.damperMount.frame_b.f[2]",
# "CAVALRY.axle1.rightLinkage.damperMount.frame_b.f[3]",
# "CAVALRY.axle1.rightBumpstopper.f",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle2.leftLinkage.upperInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle2.leftLinkage.lowerInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle2.leftLinkage.springMount.frame_b.f[1]",
# "CAVALRY.axle2.leftLinkage.springMount.frame_b.f[2]",
# "CAVALRY.axle2.leftLinkage.springMount.frame_b.f[3]",
# "CAVALRY.axle2.leftLinkage.damperMount.frame_b.f[1]",
# "CAVALRY.axle2.leftLinkage.damperMount.frame_b.f[2]",
# "CAVALRY.axle2.leftLinkage.damperMount.frame_b.f[3]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b1.frame_a.f[1]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b1.frame_a.f[2]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b1.frame_a.f[3]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b2.frame_a.f[1]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b2.frame_a.f[2]",
# "CAVALRY.axle2.stabilizer.stabilizerMount.b2.frame_a.f[3]",
# "CAVALRY.axle2.leftLinkage.steerLink.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.leftLinkage.steerLink.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.leftLinkage.steerLink.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.leftBumpstopper.f",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle2.rightLinkage.upperInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[1]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[2]",
# "CAVALRY.axle2.rightLinkage.lowerInnerJoints.toJoint2.frame_a.f[3]",
# "CAVALRY.axle2.rightLinkage.springMount.frame_b.f[1]",
# "CAVALRY.axle2.rightLinkage.springMount.frame_b.f[2]",
# "CAVALRY.axle2.rightLinkage.springMount.frame_b.f[3]",
# "CAVALRY.axle2.rightLinkage.damperMount.frame_b.f[1]",
# "CAVALRY.axle2.rightLinkage.damperMount.frame_b.f[2]",
# "CAVALRY.axle2.rightLinkage.damperMount.frame_b.f[3]",
# "CAVALRY.axle2.rightLinkage.steerLink.toJoint1.frame_a.f[1]",
# "CAVALRY.axle2.rightLinkage.steerLink.toJoint1.frame_a.f[2]",
# "CAVALRY.axle2.rightLinkage.steerLink.toJoint1.frame_a.f[3]",
# "CAVALRY.axle2.rightBumpstopper.f"
# ]