Skip to main content

cimstructs/
UnderexcLimIEEE2.rs

1/// Type UEL2 underexcitation limiter which has either a straight-line or multi-segment characteristic when plotted in terms of machine reactive power output vs. real power output. Reference: IEEE UEL2 421.5-2005, 10.2 (limit characteristic lookup table shown in Figure 10.4 (p 32)).
2#[derive(Debug, Default, Clone, serde::Serialize, serde::Deserialize)]
3pub struct UnderexcLimIEEE2 {
4    #[serde(flatten)]
5    pub base: super::UnderexcitationLimiterDynamics,
6    /// UEL terminal voltage exponent applied to real power input to UEL limit look-up table (k1). Typical value = 2.
7    #[serde(skip_serializing_if = "Option::is_none")]
8    pub k1: Option<f64>,
9    /// UEL terminal voltage exponent applied to reactive power output from UEL limit look-up table (k2). Typical value = 2.
10    #[serde(skip_serializing_if = "Option::is_none")]
11    pub k2: Option<f64>,
12    /// Gain associated with optional integrator feedback input signal to UEL (KFB). Typical value = 0.
13    #[serde(skip_serializing_if = "Option::is_none")]
14    pub kfb: Option<f64>,
15    /// UEL excitation system stabilizer gain (KUF). Typical value = 0.
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub kuf: Option<f64>,
18    /// UEL integral gain (KUI). Typical value = 0,5.
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub kui: Option<f64>,
21    /// UEL proportional gain (KUL). Typical value = 0,8.
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub kul: Option<f64>,
24    /// Real power values for endpoints (P0). Typical value = 0.
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub p0: Option<f64>,
27    /// Real power values for endpoints (P1). Typical value = 0,3.
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub p1: Option<f64>,
30    /// Real power values for endpoints (P10).
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub p10: Option<f64>,
33    /// Real power values for endpoints (P2). Typical value = 0,6.
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub p2: Option<f64>,
36    /// Real power values for endpoints (P3). Typical value = 0,9.
37    #[serde(skip_serializing_if = "Option::is_none")]
38    pub p3: Option<f64>,
39    /// Real power values for endpoints (P4). Typical value = 1,02.
40    #[serde(skip_serializing_if = "Option::is_none")]
41    pub p4: Option<f64>,
42    /// Real power values for endpoints (P5).
43    #[serde(skip_serializing_if = "Option::is_none")]
44    pub p5: Option<f64>,
45    /// Real power values for endpoints (P6).
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub p6: Option<f64>,
48    /// Real power values for endpoints (P7).
49    #[serde(skip_serializing_if = "Option::is_none")]
50    pub p7: Option<f64>,
51    /// Real power values for endpoints (P8).
52    #[serde(skip_serializing_if = "Option::is_none")]
53    pub p8: Option<f64>,
54    /// Real power values for endpoints (P9).
55    #[serde(skip_serializing_if = "Option::is_none")]
56    pub p9: Option<f64>,
57    /// Reactive power values for endpoints (Q0). Typical value = -0,31.
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub q0: Option<f64>,
60    /// Reactive power values for endpoints (Q1). Typical value = -0,31.
61    #[serde(skip_serializing_if = "Option::is_none")]
62    pub q1: Option<f64>,
63    /// Reactive power values for endpoints (Q10).
64    #[serde(skip_serializing_if = "Option::is_none")]
65    pub q10: Option<f64>,
66    /// Reactive power values for endpoints (Q2). Typical value = -0,28.
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub q2: Option<f64>,
69    /// Reactive power values for endpoints (Q3). Typical value = -0,21.
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub q3: Option<f64>,
72    /// Reactive power values for endpoints (Q4). Typical value = 0.
73    #[serde(skip_serializing_if = "Option::is_none")]
74    pub q4: Option<f64>,
75    /// Reactive power values for endpoints (Q5).
76    #[serde(skip_serializing_if = "Option::is_none")]
77    pub q5: Option<f64>,
78    /// Reactive power values for endpoints (Q6).
79    #[serde(skip_serializing_if = "Option::is_none")]
80    pub q6: Option<f64>,
81    /// Reactive power values for endpoints (Q7).
82    #[serde(skip_serializing_if = "Option::is_none")]
83    pub q7: Option<f64>,
84    /// Reactive power values for endpoints (Q8).
85    #[serde(skip_serializing_if = "Option::is_none")]
86    pub q8: Option<f64>,
87    /// Reactive power values for endpoints (Q9).
88    #[serde(skip_serializing_if = "Option::is_none")]
89    pub q9: Option<f64>,
90    /// UEL lead time constant (TU1) (>= 0). Typical value = 0.
91    #[serde(skip_serializing_if = "Option::is_none")]
92    pub tu1: Option<f64>,
93    /// UEL lag time constant (TU2) (>= 0). Typical value = 0.
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub tu2: Option<f64>,
96    /// UEL lead time constant (TU3) (>= 0). Typical value = 0.
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub tu3: Option<f64>,
99    /// UEL lag time constant (TU4) (>= 0). Typical value = 0.
100    #[serde(skip_serializing_if = "Option::is_none")]
101    pub tu4: Option<f64>,
102    /// Time constant associated with optional integrator feedback input signal to UEL (TUL) (>= 0). Typical value = 0.
103    #[serde(skip_serializing_if = "Option::is_none")]
104    pub tul: Option<f64>,
105    /// Real power filter time constant (TUP) (>= 0). Typical value = 5.
106    #[serde(skip_serializing_if = "Option::is_none")]
107    pub tup: Option<f64>,
108    /// Reactive power filter time constant (TUQ) (>= 0). Typical value = 0.
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub tuq: Option<f64>,
111    /// Voltage filter time constant (TUV) (>= 0). Typical value = 5.
112    #[serde(skip_serializing_if = "Option::is_none")]
113    pub tuv: Option<f64>,
114    /// UEL integrator output maximum limit (VUIMAX) (> UnderexcLimIEEE2.vuimin). Typical value = 0,25.
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub vuimax: Option<f64>,
117    /// UEL integrator output minimum limit (VUIMIN) (< UnderexcLimIEEE2.vuimax). Typical value = 0.
118    #[serde(skip_serializing_if = "Option::is_none")]
119    pub vuimin: Option<f64>,
120    /// UEL output maximum limit (VULMAX) (> UnderexcLimIEEE2.vulmin). Typical value = 0,25.
121    #[serde(skip_serializing_if = "Option::is_none")]
122    pub vulmax: Option<f64>,
123    /// UEL output minimum limit (VULMIN) (< UnderexcLimIEEE2.vulmax). Typical value = 0.
124    #[serde(skip_serializing_if = "Option::is_none")]
125    pub vulmin: Option<f64>,
126}
127impl crate::base::CimElement for UnderexcLimIEEE2 {
128    fn mrid(&self) -> &str { &self.base.base.base.id }
129    fn type_name(&self) -> &'static str { "UnderexcLimIEEE2" }
130    fn as_any(&self) -> &dyn std::any::Any { self }
131    fn to_json_value(&self) -> serde_json::Value {
132        serde_json::to_value(self).unwrap_or(serde_json::Value::Null)
133    }
134    fn to_block(&self) -> crate::base::RdfBlock {
135        let mut block = self.base.to_block();
136        block.type_name = "UnderexcLimIEEE2".to_string();
137        if let Some(v) = self.k1 {
138            block.fields.insert("UnderexcLimIEEE2.k1".into(), crate::base::FieldValue::Text(v.to_string()));
139        }
140        if let Some(v) = self.k2 {
141            block.fields.insert("UnderexcLimIEEE2.k2".into(), crate::base::FieldValue::Text(v.to_string()));
142        }
143        if let Some(v) = self.kfb {
144            block.fields.insert("UnderexcLimIEEE2.kfb".into(), crate::base::FieldValue::Text(v.to_string()));
145        }
146        if let Some(v) = self.kuf {
147            block.fields.insert("UnderexcLimIEEE2.kuf".into(), crate::base::FieldValue::Text(v.to_string()));
148        }
149        if let Some(v) = self.kui {
150            block.fields.insert("UnderexcLimIEEE2.kui".into(), crate::base::FieldValue::Text(v.to_string()));
151        }
152        if let Some(v) = self.kul {
153            block.fields.insert("UnderexcLimIEEE2.kul".into(), crate::base::FieldValue::Text(v.to_string()));
154        }
155        if let Some(v) = self.p0 {
156            block.fields.insert("UnderexcLimIEEE2.p0".into(), crate::base::FieldValue::Text(v.to_string()));
157        }
158        if let Some(v) = self.p1 {
159            block.fields.insert("UnderexcLimIEEE2.p1".into(), crate::base::FieldValue::Text(v.to_string()));
160        }
161        if let Some(v) = self.p10 {
162            block.fields.insert("UnderexcLimIEEE2.p10".into(), crate::base::FieldValue::Text(v.to_string()));
163        }
164        if let Some(v) = self.p2 {
165            block.fields.insert("UnderexcLimIEEE2.p2".into(), crate::base::FieldValue::Text(v.to_string()));
166        }
167        if let Some(v) = self.p3 {
168            block.fields.insert("UnderexcLimIEEE2.p3".into(), crate::base::FieldValue::Text(v.to_string()));
169        }
170        if let Some(v) = self.p4 {
171            block.fields.insert("UnderexcLimIEEE2.p4".into(), crate::base::FieldValue::Text(v.to_string()));
172        }
173        if let Some(v) = self.p5 {
174            block.fields.insert("UnderexcLimIEEE2.p5".into(), crate::base::FieldValue::Text(v.to_string()));
175        }
176        if let Some(v) = self.p6 {
177            block.fields.insert("UnderexcLimIEEE2.p6".into(), crate::base::FieldValue::Text(v.to_string()));
178        }
179        if let Some(v) = self.p7 {
180            block.fields.insert("UnderexcLimIEEE2.p7".into(), crate::base::FieldValue::Text(v.to_string()));
181        }
182        if let Some(v) = self.p8 {
183            block.fields.insert("UnderexcLimIEEE2.p8".into(), crate::base::FieldValue::Text(v.to_string()));
184        }
185        if let Some(v) = self.p9 {
186            block.fields.insert("UnderexcLimIEEE2.p9".into(), crate::base::FieldValue::Text(v.to_string()));
187        }
188        if let Some(v) = self.q0 {
189            block.fields.insert("UnderexcLimIEEE2.q0".into(), crate::base::FieldValue::Text(v.to_string()));
190        }
191        if let Some(v) = self.q1 {
192            block.fields.insert("UnderexcLimIEEE2.q1".into(), crate::base::FieldValue::Text(v.to_string()));
193        }
194        if let Some(v) = self.q10 {
195            block.fields.insert("UnderexcLimIEEE2.q10".into(), crate::base::FieldValue::Text(v.to_string()));
196        }
197        if let Some(v) = self.q2 {
198            block.fields.insert("UnderexcLimIEEE2.q2".into(), crate::base::FieldValue::Text(v.to_string()));
199        }
200        if let Some(v) = self.q3 {
201            block.fields.insert("UnderexcLimIEEE2.q3".into(), crate::base::FieldValue::Text(v.to_string()));
202        }
203        if let Some(v) = self.q4 {
204            block.fields.insert("UnderexcLimIEEE2.q4".into(), crate::base::FieldValue::Text(v.to_string()));
205        }
206        if let Some(v) = self.q5 {
207            block.fields.insert("UnderexcLimIEEE2.q5".into(), crate::base::FieldValue::Text(v.to_string()));
208        }
209        if let Some(v) = self.q6 {
210            block.fields.insert("UnderexcLimIEEE2.q6".into(), crate::base::FieldValue::Text(v.to_string()));
211        }
212        if let Some(v) = self.q7 {
213            block.fields.insert("UnderexcLimIEEE2.q7".into(), crate::base::FieldValue::Text(v.to_string()));
214        }
215        if let Some(v) = self.q8 {
216            block.fields.insert("UnderexcLimIEEE2.q8".into(), crate::base::FieldValue::Text(v.to_string()));
217        }
218        if let Some(v) = self.q9 {
219            block.fields.insert("UnderexcLimIEEE2.q9".into(), crate::base::FieldValue::Text(v.to_string()));
220        }
221        if let Some(v) = self.tu1 {
222            block.fields.insert("UnderexcLimIEEE2.tu1".into(), crate::base::FieldValue::Text(v.to_string()));
223        }
224        if let Some(v) = self.tu2 {
225            block.fields.insert("UnderexcLimIEEE2.tu2".into(), crate::base::FieldValue::Text(v.to_string()));
226        }
227        if let Some(v) = self.tu3 {
228            block.fields.insert("UnderexcLimIEEE2.tu3".into(), crate::base::FieldValue::Text(v.to_string()));
229        }
230        if let Some(v) = self.tu4 {
231            block.fields.insert("UnderexcLimIEEE2.tu4".into(), crate::base::FieldValue::Text(v.to_string()));
232        }
233        if let Some(v) = self.tul {
234            block.fields.insert("UnderexcLimIEEE2.tul".into(), crate::base::FieldValue::Text(v.to_string()));
235        }
236        if let Some(v) = self.tup {
237            block.fields.insert("UnderexcLimIEEE2.tup".into(), crate::base::FieldValue::Text(v.to_string()));
238        }
239        if let Some(v) = self.tuq {
240            block.fields.insert("UnderexcLimIEEE2.tuq".into(), crate::base::FieldValue::Text(v.to_string()));
241        }
242        if let Some(v) = self.tuv {
243            block.fields.insert("UnderexcLimIEEE2.tuv".into(), crate::base::FieldValue::Text(v.to_string()));
244        }
245        if let Some(v) = self.vuimax {
246            block.fields.insert("UnderexcLimIEEE2.vuimax".into(), crate::base::FieldValue::Text(v.to_string()));
247        }
248        if let Some(v) = self.vuimin {
249            block.fields.insert("UnderexcLimIEEE2.vuimin".into(), crate::base::FieldValue::Text(v.to_string()));
250        }
251        if let Some(v) = self.vulmax {
252            block.fields.insert("UnderexcLimIEEE2.vulmax".into(), crate::base::FieldValue::Text(v.to_string()));
253        }
254        if let Some(v) = self.vulmin {
255            block.fields.insert("UnderexcLimIEEE2.vulmin".into(), crate::base::FieldValue::Text(v.to_string()));
256        }
257        block
258    }
259}
260
261impl UnderexcLimIEEE2 {
262    pub fn from_block(b: &crate::base::RdfBlock) -> Self {
263        let mut obj = Self::default();
264        obj.base.base.base.id.clone_from(&b.mrid);
265        for (key, val) in &b.fields {
266            match key.as_str() {
267                "UnderexcLimIEEE2.k1" => {
268                    match val {
269                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.k1 = Some(v); } }
270                        crate::base::FieldValue::TextList(svs) => {
271                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.k1 = Some(v); } }
272                        }
273                        _ => {}
274                    }
275                }
276                "UnderexcLimIEEE2.k2" => {
277                    match val {
278                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.k2 = Some(v); } }
279                        crate::base::FieldValue::TextList(svs) => {
280                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.k2 = Some(v); } }
281                        }
282                        _ => {}
283                    }
284                }
285                "UnderexcLimIEEE2.kfb" => {
286                    match val {
287                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.kfb = Some(v); } }
288                        crate::base::FieldValue::TextList(svs) => {
289                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.kfb = Some(v); } }
290                        }
291                        _ => {}
292                    }
293                }
294                "UnderexcLimIEEE2.kuf" => {
295                    match val {
296                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.kuf = Some(v); } }
297                        crate::base::FieldValue::TextList(svs) => {
298                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.kuf = Some(v); } }
299                        }
300                        _ => {}
301                    }
302                }
303                "UnderexcLimIEEE2.kui" => {
304                    match val {
305                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.kui = Some(v); } }
306                        crate::base::FieldValue::TextList(svs) => {
307                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.kui = Some(v); } }
308                        }
309                        _ => {}
310                    }
311                }
312                "UnderexcLimIEEE2.kul" => {
313                    match val {
314                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.kul = Some(v); } }
315                        crate::base::FieldValue::TextList(svs) => {
316                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.kul = Some(v); } }
317                        }
318                        _ => {}
319                    }
320                }
321                "UnderexcLimIEEE2.p0" => {
322                    match val {
323                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p0 = Some(v); } }
324                        crate::base::FieldValue::TextList(svs) => {
325                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p0 = Some(v); } }
326                        }
327                        _ => {}
328                    }
329                }
330                "UnderexcLimIEEE2.p1" => {
331                    match val {
332                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p1 = Some(v); } }
333                        crate::base::FieldValue::TextList(svs) => {
334                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p1 = Some(v); } }
335                        }
336                        _ => {}
337                    }
338                }
339                "UnderexcLimIEEE2.p10" => {
340                    match val {
341                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p10 = Some(v); } }
342                        crate::base::FieldValue::TextList(svs) => {
343                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p10 = Some(v); } }
344                        }
345                        _ => {}
346                    }
347                }
348                "UnderexcLimIEEE2.p2" => {
349                    match val {
350                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p2 = Some(v); } }
351                        crate::base::FieldValue::TextList(svs) => {
352                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p2 = Some(v); } }
353                        }
354                        _ => {}
355                    }
356                }
357                "UnderexcLimIEEE2.p3" => {
358                    match val {
359                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p3 = Some(v); } }
360                        crate::base::FieldValue::TextList(svs) => {
361                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p3 = Some(v); } }
362                        }
363                        _ => {}
364                    }
365                }
366                "UnderexcLimIEEE2.p4" => {
367                    match val {
368                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p4 = Some(v); } }
369                        crate::base::FieldValue::TextList(svs) => {
370                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p4 = Some(v); } }
371                        }
372                        _ => {}
373                    }
374                }
375                "UnderexcLimIEEE2.p5" => {
376                    match val {
377                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p5 = Some(v); } }
378                        crate::base::FieldValue::TextList(svs) => {
379                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p5 = Some(v); } }
380                        }
381                        _ => {}
382                    }
383                }
384                "UnderexcLimIEEE2.p6" => {
385                    match val {
386                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p6 = Some(v); } }
387                        crate::base::FieldValue::TextList(svs) => {
388                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p6 = Some(v); } }
389                        }
390                        _ => {}
391                    }
392                }
393                "UnderexcLimIEEE2.p7" => {
394                    match val {
395                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p7 = Some(v); } }
396                        crate::base::FieldValue::TextList(svs) => {
397                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p7 = Some(v); } }
398                        }
399                        _ => {}
400                    }
401                }
402                "UnderexcLimIEEE2.p8" => {
403                    match val {
404                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p8 = Some(v); } }
405                        crate::base::FieldValue::TextList(svs) => {
406                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p8 = Some(v); } }
407                        }
408                        _ => {}
409                    }
410                }
411                "UnderexcLimIEEE2.p9" => {
412                    match val {
413                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.p9 = Some(v); } }
414                        crate::base::FieldValue::TextList(svs) => {
415                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.p9 = Some(v); } }
416                        }
417                        _ => {}
418                    }
419                }
420                "UnderexcLimIEEE2.q0" => {
421                    match val {
422                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q0 = Some(v); } }
423                        crate::base::FieldValue::TextList(svs) => {
424                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q0 = Some(v); } }
425                        }
426                        _ => {}
427                    }
428                }
429                "UnderexcLimIEEE2.q1" => {
430                    match val {
431                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q1 = Some(v); } }
432                        crate::base::FieldValue::TextList(svs) => {
433                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q1 = Some(v); } }
434                        }
435                        _ => {}
436                    }
437                }
438                "UnderexcLimIEEE2.q10" => {
439                    match val {
440                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q10 = Some(v); } }
441                        crate::base::FieldValue::TextList(svs) => {
442                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q10 = Some(v); } }
443                        }
444                        _ => {}
445                    }
446                }
447                "UnderexcLimIEEE2.q2" => {
448                    match val {
449                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q2 = Some(v); } }
450                        crate::base::FieldValue::TextList(svs) => {
451                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q2 = Some(v); } }
452                        }
453                        _ => {}
454                    }
455                }
456                "UnderexcLimIEEE2.q3" => {
457                    match val {
458                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q3 = Some(v); } }
459                        crate::base::FieldValue::TextList(svs) => {
460                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q3 = Some(v); } }
461                        }
462                        _ => {}
463                    }
464                }
465                "UnderexcLimIEEE2.q4" => {
466                    match val {
467                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q4 = Some(v); } }
468                        crate::base::FieldValue::TextList(svs) => {
469                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q4 = Some(v); } }
470                        }
471                        _ => {}
472                    }
473                }
474                "UnderexcLimIEEE2.q5" => {
475                    match val {
476                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q5 = Some(v); } }
477                        crate::base::FieldValue::TextList(svs) => {
478                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q5 = Some(v); } }
479                        }
480                        _ => {}
481                    }
482                }
483                "UnderexcLimIEEE2.q6" => {
484                    match val {
485                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q6 = Some(v); } }
486                        crate::base::FieldValue::TextList(svs) => {
487                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q6 = Some(v); } }
488                        }
489                        _ => {}
490                    }
491                }
492                "UnderexcLimIEEE2.q7" => {
493                    match val {
494                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q7 = Some(v); } }
495                        crate::base::FieldValue::TextList(svs) => {
496                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q7 = Some(v); } }
497                        }
498                        _ => {}
499                    }
500                }
501                "UnderexcLimIEEE2.q8" => {
502                    match val {
503                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q8 = Some(v); } }
504                        crate::base::FieldValue::TextList(svs) => {
505                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q8 = Some(v); } }
506                        }
507                        _ => {}
508                    }
509                }
510                "UnderexcLimIEEE2.q9" => {
511                    match val {
512                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.q9 = Some(v); } }
513                        crate::base::FieldValue::TextList(svs) => {
514                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.q9 = Some(v); } }
515                        }
516                        _ => {}
517                    }
518                }
519                "UnderexcLimIEEE2.tu1" => {
520                    match val {
521                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tu1 = Some(v); } }
522                        crate::base::FieldValue::TextList(svs) => {
523                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tu1 = Some(v); } }
524                        }
525                        _ => {}
526                    }
527                }
528                "UnderexcLimIEEE2.tu2" => {
529                    match val {
530                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tu2 = Some(v); } }
531                        crate::base::FieldValue::TextList(svs) => {
532                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tu2 = Some(v); } }
533                        }
534                        _ => {}
535                    }
536                }
537                "UnderexcLimIEEE2.tu3" => {
538                    match val {
539                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tu3 = Some(v); } }
540                        crate::base::FieldValue::TextList(svs) => {
541                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tu3 = Some(v); } }
542                        }
543                        _ => {}
544                    }
545                }
546                "UnderexcLimIEEE2.tu4" => {
547                    match val {
548                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tu4 = Some(v); } }
549                        crate::base::FieldValue::TextList(svs) => {
550                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tu4 = Some(v); } }
551                        }
552                        _ => {}
553                    }
554                }
555                "UnderexcLimIEEE2.tul" => {
556                    match val {
557                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tul = Some(v); } }
558                        crate::base::FieldValue::TextList(svs) => {
559                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tul = Some(v); } }
560                        }
561                        _ => {}
562                    }
563                }
564                "UnderexcLimIEEE2.tup" => {
565                    match val {
566                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tup = Some(v); } }
567                        crate::base::FieldValue::TextList(svs) => {
568                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tup = Some(v); } }
569                        }
570                        _ => {}
571                    }
572                }
573                "UnderexcLimIEEE2.tuq" => {
574                    match val {
575                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tuq = Some(v); } }
576                        crate::base::FieldValue::TextList(svs) => {
577                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tuq = Some(v); } }
578                        }
579                        _ => {}
580                    }
581                }
582                "UnderexcLimIEEE2.tuv" => {
583                    match val {
584                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.tuv = Some(v); } }
585                        crate::base::FieldValue::TextList(svs) => {
586                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.tuv = Some(v); } }
587                        }
588                        _ => {}
589                    }
590                }
591                "UnderexcLimIEEE2.vuimax" => {
592                    match val {
593                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.vuimax = Some(v); } }
594                        crate::base::FieldValue::TextList(svs) => {
595                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.vuimax = Some(v); } }
596                        }
597                        _ => {}
598                    }
599                }
600                "UnderexcLimIEEE2.vuimin" => {
601                    match val {
602                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.vuimin = Some(v); } }
603                        crate::base::FieldValue::TextList(svs) => {
604                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.vuimin = Some(v); } }
605                        }
606                        _ => {}
607                    }
608                }
609                "UnderexcLimIEEE2.vulmax" => {
610                    match val {
611                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.vulmax = Some(v); } }
612                        crate::base::FieldValue::TextList(svs) => {
613                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.vulmax = Some(v); } }
614                        }
615                        _ => {}
616                    }
617                }
618                "UnderexcLimIEEE2.vulmin" => {
619                    match val {
620                        crate::base::FieldValue::Text(sv) => { if let Ok(v) = sv.trim().parse() { obj.vulmin = Some(v); } }
621                        crate::base::FieldValue::TextList(svs) => {
622                            if let Some(sv) = svs.last() { if let Ok(v) = sv.trim().parse() { obj.vulmin = Some(v); } }
623                        }
624                        _ => {}
625                    }
626                }
627                "UnderexcitationLimiterDynamics.ExcitationSystemDynamics" => {
628                    if let crate::base::FieldValue::Resource(sv) = val {
629                        obj.base.excitation_system_dynamics = Some(crate::base::MridRef { mrid: sv.clone() });
630                    }
631                }
632                "DynamicsFunctionBlock.enabled" => {
633                    match val {
634                        crate::base::FieldValue::Text(sv) => { obj.base.base.enabled = Some(sv.trim() == "true"); }
635                        crate::base::FieldValue::TextList(svs) => {
636                            if let Some(sv) = svs.last() { obj.base.base.enabled = Some(sv.trim() == "true"); }
637                        }
638                        _ => {}
639                    }
640                }
641                "IdentifiedObject.description" => {
642                    match val {
643                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.description = sv.clone(); }
644                        crate::base::FieldValue::TextList(svs) => {
645                            if let Some(sv) = svs.last() { obj.base.base.base.description = sv.clone(); }
646                        }
647                        _ => {}
648                    }
649                }
650                "IdentifiedObject.energyIdentCodeEic" => {
651                    match val {
652                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.energy_ident_code_eic = sv.clone(); }
653                        crate::base::FieldValue::TextList(svs) => {
654                            if let Some(sv) = svs.last() { obj.base.base.base.energy_ident_code_eic = sv.clone(); }
655                        }
656                        _ => {}
657                    }
658                }
659                "IdentifiedObject.mRID" => {
660                    match val {
661                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.m_rid = sv.clone(); }
662                        crate::base::FieldValue::TextList(svs) => {
663                            if let Some(sv) = svs.last() { obj.base.base.base.m_rid = sv.clone(); }
664                        }
665                        _ => {}
666                    }
667                }
668                "IdentifiedObject.name" => {
669                    match val {
670                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.name = sv.clone(); }
671                        crate::base::FieldValue::TextList(svs) => {
672                            if let Some(sv) = svs.last() { obj.base.base.base.name = sv.clone(); }
673                        }
674                        _ => {}
675                    }
676                }
677                "IdentifiedObject.shortName" => {
678                    match val {
679                        crate::base::FieldValue::Text(sv) => { obj.base.base.base.short_name = sv.clone(); }
680                        crate::base::FieldValue::TextList(svs) => {
681                            if let Some(sv) = svs.last() { obj.base.base.base.short_name = sv.clone(); }
682                        }
683                        _ => {}
684                    }
685                }
686                _ => {}
687            }
688        }
689        obj
690    }
691}