aesim.simba 2024.5.17a1__py3-none-manylinux1_x86_64.whl → 2024.5.28a1__py3-none-manylinux1_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. aesim/simba/Resources/Resources/DesignExamples.jsimba +460 -465
  2. aesim/simba/Resources/Resources/Examples/acdc_3ph_diodebridge.jsimba +548 -37
  3. aesim/simba/Resources/Resources/Examples/acdc_3ph_thyristor_rectifier.jsimba +1627 -216
  4. aesim/simba/Resources/Resources/Examples/acdc_pfc_totem_pole.jsimba +1343 -108
  5. aesim/simba/Resources/Resources/Examples/bldc_drive_example.jsimba +1941 -146
  6. aesim/simba/Resources/Resources/Examples/dcac_3_phase_inverter_spwm.jsimba +977 -58
  7. aesim/simba/Resources/Resources/Examples/dcdc_boost_converter.jsimba +271 -50
  8. aesim/simba/Resources/Resources/Examples/dcdc_buck_c_code.jsimba +618 -50
  9. aesim/simba/Resources/Resources/Examples/dcdc_buck_chopper_thermal.jsimba +399 -29
  10. aesim/simba/Resources/Resources/Examples/dcdc_buck_converter_ac_sweep.jsimba +420 -28
  11. aesim/simba/Resources/Resources/Examples/dcdc_buckboost.jsimba +595 -54
  12. aesim/simba/Resources/Resources/Examples/dcdc_dual_active_bridge_converter.jsimba +1672 -122
  13. aesim/simba/Resources/Resources/Examples/dcdc_flyback.jsimba +342 -28
  14. aesim/simba/Resources/Resources/Examples/dcdc_interleaved_buck_chopper.jsimba +723 -66
  15. aesim/simba/Resources/Resources/Examples/dcdc_llc_resonant_converter.jsimba +1859 -124
  16. aesim/simba/Resources/Resources/Examples/dcdc_phase_shift_full_bridge_converter.jsimba +1598 -160
  17. aesim/simba/Resources/Resources/libSimba.Solvers.linux-x64.so +0 -0
  18. aesim/simba/Resources/Simba.Data.deps.json +8 -8
  19. aesim/simba/Resources/Simba.Data.dll +0 -0
  20. aesim/simba/Resources/Simba.Drawing.dll +0 -0
  21. aesim/simba/Resources/Simba.Helper.dll +0 -0
  22. aesim/simba/__init__.py +1 -1
  23. aesim/simba/__init__.pyi +98 -0
  24. {aesim.simba-2024.5.17a1.dist-info → aesim.simba-2024.5.28a1.dist-info}/METADATA +1 -1
  25. {aesim.simba-2024.5.17a1.dist-info → aesim.simba-2024.5.28a1.dist-info}/RECORD +27 -27
  26. {aesim.simba-2024.5.17a1.dist-info → aesim.simba-2024.5.28a1.dist-info}/WHEEL +0 -0
  27. {aesim.simba-2024.5.17a1.dist-info → aesim.simba-2024.5.28a1.dist-info}/top_level.txt +0 -0
@@ -17,9 +17,30 @@
17
17
  "Name": "DC1",
18
18
  "ID": "647c29af-3107-4b1e-81bc-f8fe970e557d",
19
19
  "Parameters": {
20
- "Voltage": "10"
20
+ "Voltage": "10",
21
+ "Name": "DC1"
21
22
  },
22
- "EnabledScopes": []
23
+ "EnabledScopes": [],
24
+ "ParametersDisplayAttributes": {
25
+ "Voltage": {
26
+ "IsVisible": false,
27
+ "Suffix": "",
28
+ "RelativeLocation": "2 2",
29
+ "UnrotatedWidth": 2,
30
+ "UnrotatedHeight": 1,
31
+ "FontSize": 12,
32
+ "Color": "#0081BC"
33
+ },
34
+ "Name": {
35
+ "IsVisible": true,
36
+ "Suffix": "",
37
+ "RelativeLocation": "4 3",
38
+ "UnrotatedWidth": 2,
39
+ "UnrotatedHeight": 2,
40
+ "FontSize": 12,
41
+ "Color": "#0081BC"
42
+ }
43
+ }
23
44
  },
24
45
  {
25
46
  "LibraryName": "Ground",
@@ -31,8 +52,21 @@
31
52
  "Disabled": false,
32
53
  "Name": "Ground1",
33
54
  "ID": "65c1ed33-abf9-4b8a-95cd-8fa41a8a63b5",
34
- "Parameters": {},
35
- "EnabledScopes": []
55
+ "Parameters": {
56
+ "Name": "Ground1"
57
+ },
58
+ "EnabledScopes": [],
59
+ "ParametersDisplayAttributes": {
60
+ "Name": {
61
+ "IsVisible": false,
62
+ "Suffix": "",
63
+ "RelativeLocation": "4 3",
64
+ "UnrotatedWidth": 2,
65
+ "UnrotatedHeight": 2,
66
+ "FontSize": 12,
67
+ "Color": "#0081BC"
68
+ }
69
+ }
36
70
  },
37
71
  {
38
72
  "LibraryName": "Ideal MOSFET",
@@ -45,9 +79,30 @@
45
79
  "Name": "T1",
46
80
  "ID": "279346c0-8bbb-43e9-94cd-3829fdaff239",
47
81
  "Parameters": {
48
- "Ron": "0.01"
82
+ "Ron": "0.01",
83
+ "Name": "T1"
49
84
  },
50
- "EnabledScopes": []
85
+ "EnabledScopes": [],
86
+ "ParametersDisplayAttributes": {
87
+ "Ron": {
88
+ "IsVisible": false,
89
+ "Suffix": "",
90
+ "RelativeLocation": "1 0",
91
+ "UnrotatedWidth": 2,
92
+ "UnrotatedHeight": 1,
93
+ "FontSize": 12,
94
+ "Color": "#0081BC"
95
+ },
96
+ "Name": {
97
+ "IsVisible": true,
98
+ "Suffix": "",
99
+ "RelativeLocation": "2 2",
100
+ "UnrotatedWidth": 2,
101
+ "UnrotatedHeight": 2,
102
+ "FontSize": 12,
103
+ "Color": "#0081BC"
104
+ }
105
+ }
51
106
  },
52
107
  {
53
108
  "LibraryName": "Ideal MOSFET",
@@ -60,9 +115,30 @@
60
115
  "Name": "T2",
61
116
  "ID": "7e557a40-66a1-471d-b57d-8fa4a085a0e9",
62
117
  "Parameters": {
63
- "Ron": "0.01"
118
+ "Ron": "0.01",
119
+ "Name": "T2"
64
120
  },
65
- "EnabledScopes": []
121
+ "EnabledScopes": [],
122
+ "ParametersDisplayAttributes": {
123
+ "Ron": {
124
+ "IsVisible": false,
125
+ "Suffix": "",
126
+ "RelativeLocation": "1 0",
127
+ "UnrotatedWidth": 2,
128
+ "UnrotatedHeight": 1,
129
+ "FontSize": 12,
130
+ "Color": "#0081BC"
131
+ },
132
+ "Name": {
133
+ "IsVisible": true,
134
+ "Suffix": "",
135
+ "RelativeLocation": "2 2",
136
+ "UnrotatedWidth": 2,
137
+ "UnrotatedHeight": 2,
138
+ "FontSize": 12,
139
+ "Color": "#0081BC"
140
+ }
141
+ }
66
142
  },
67
143
  {
68
144
  "LibraryName": "Ideal Diode",
@@ -76,9 +152,39 @@
76
152
  "ID": "159ac326-84d3-434c-941a-c54cd82a5514",
77
153
  "Parameters": {
78
154
  "Rd": "0.01",
79
- "Vf": "1"
155
+ "Vf": "1",
156
+ "Name": "D1"
80
157
  },
81
- "EnabledScopes": []
158
+ "EnabledScopes": [],
159
+ "ParametersDisplayAttributes": {
160
+ "Rd": {
161
+ "IsVisible": false,
162
+ "Suffix": "",
163
+ "RelativeLocation": "2 0",
164
+ "UnrotatedWidth": 2,
165
+ "UnrotatedHeight": 1,
166
+ "FontSize": 12,
167
+ "Color": "#0081BC"
168
+ },
169
+ "Vf": {
170
+ "IsVisible": false,
171
+ "Suffix": "",
172
+ "RelativeLocation": "2 1",
173
+ "UnrotatedWidth": 2,
174
+ "UnrotatedHeight": 1,
175
+ "FontSize": 12,
176
+ "Color": "#0081BC"
177
+ },
178
+ "Name": {
179
+ "IsVisible": true,
180
+ "Suffix": "",
181
+ "RelativeLocation": "2 2",
182
+ "UnrotatedWidth": 2,
183
+ "UnrotatedHeight": 1,
184
+ "FontSize": 12,
185
+ "Color": "#0081BC"
186
+ }
187
+ }
82
188
  },
83
189
  {
84
190
  "LibraryName": "Ideal Diode",
@@ -92,9 +198,39 @@
92
198
  "ID": "4170c896-5bfa-4389-a764-a57cdc915c2c",
93
199
  "Parameters": {
94
200
  "Rd": "0.01",
95
- "Vf": "1"
201
+ "Vf": "1",
202
+ "Name": "D2"
96
203
  },
97
- "EnabledScopes": []
204
+ "EnabledScopes": [],
205
+ "ParametersDisplayAttributes": {
206
+ "Rd": {
207
+ "IsVisible": false,
208
+ "Suffix": "",
209
+ "RelativeLocation": "2 0",
210
+ "UnrotatedWidth": 2,
211
+ "UnrotatedHeight": 1,
212
+ "FontSize": 12,
213
+ "Color": "#0081BC"
214
+ },
215
+ "Vf": {
216
+ "IsVisible": false,
217
+ "Suffix": "",
218
+ "RelativeLocation": "2 1",
219
+ "UnrotatedWidth": 2,
220
+ "UnrotatedHeight": 1,
221
+ "FontSize": 12,
222
+ "Color": "#0081BC"
223
+ },
224
+ "Name": {
225
+ "IsVisible": true,
226
+ "Suffix": "",
227
+ "RelativeLocation": "2 2",
228
+ "UnrotatedWidth": 2,
229
+ "UnrotatedHeight": 1,
230
+ "FontSize": 12,
231
+ "Color": "#0081BC"
232
+ }
233
+ }
98
234
  },
99
235
  {
100
236
  "LibraryName": "Inductor",
@@ -107,10 +243,40 @@
107
243
  "Name": "L1",
108
244
  "ID": "0acfa756-df9e-46f2-9dcb-9f04189bdd49",
109
245
  "Parameters": {
110
- "Value": "100e-6",
111
- "Iinit": "0"
246
+ "Value": "100u",
247
+ "Iinit": "0",
248
+ "Name": "L1"
112
249
  },
113
- "EnabledScopes": []
250
+ "EnabledScopes": [],
251
+ "ParametersDisplayAttributes": {
252
+ "Value": {
253
+ "IsVisible": true,
254
+ "Suffix": "H",
255
+ "RelativeLocation": "2 2",
256
+ "UnrotatedWidth": 2,
257
+ "UnrotatedHeight": 1,
258
+ "FontSize": 12,
259
+ "Color": "#0081BC"
260
+ },
261
+ "Iinit": {
262
+ "IsVisible": false,
263
+ "Suffix": "",
264
+ "RelativeLocation": "2 4",
265
+ "UnrotatedWidth": 2,
266
+ "UnrotatedHeight": 1,
267
+ "FontSize": 12,
268
+ "Color": "#0081BC"
269
+ },
270
+ "Name": {
271
+ "IsVisible": true,
272
+ "Suffix": "",
273
+ "RelativeLocation": "2 -1",
274
+ "UnrotatedWidth": 2,
275
+ "UnrotatedHeight": 1,
276
+ "FontSize": 12,
277
+ "Color": "#0081BC"
278
+ }
279
+ }
114
280
  },
115
281
  {
116
282
  "LibraryName": "Resistor",
@@ -123,9 +289,30 @@
123
289
  "Name": "R1",
124
290
  "ID": "893080ef-4dac-451e-9ddd-256efb7bbdc5",
125
291
  "Parameters": {
126
- "Value": "0.01"
292
+ "Value": "10m",
293
+ "Name": "R1"
127
294
  },
128
- "EnabledScopes": []
295
+ "EnabledScopes": [],
296
+ "ParametersDisplayAttributes": {
297
+ "Value": {
298
+ "IsVisible": true,
299
+ "Suffix": "\u03A9",
300
+ "RelativeLocation": "2 2",
301
+ "UnrotatedWidth": 2,
302
+ "UnrotatedHeight": 1,
303
+ "FontSize": 12,
304
+ "Color": "#0081BC"
305
+ },
306
+ "Name": {
307
+ "IsVisible": true,
308
+ "Suffix": "",
309
+ "RelativeLocation": "2 -1",
310
+ "UnrotatedWidth": 2,
311
+ "UnrotatedHeight": 1,
312
+ "FontSize": 12,
313
+ "Color": "#0081BC"
314
+ }
315
+ }
129
316
  },
130
317
  {
131
318
  "LibraryName": "Current Probe",
@@ -139,11 +326,41 @@
139
326
  "ID": "112d90c3-a67b-4de8-aa3e-3c99c43114f0",
140
327
  "Parameters": {
141
328
  "Gain": "1",
142
- "SamplingTime": "none"
329
+ "SamplingTime": "none",
330
+ "Name": "I_L"
143
331
  },
144
332
  "EnabledScopes": [
145
333
  "Out"
146
- ]
334
+ ],
335
+ "ParametersDisplayAttributes": {
336
+ "Gain": {
337
+ "IsVisible": false,
338
+ "Suffix": "",
339
+ "RelativeLocation": "2 2",
340
+ "UnrotatedWidth": 2,
341
+ "UnrotatedHeight": 1,
342
+ "FontSize": 12,
343
+ "Color": "#0081BC"
344
+ },
345
+ "SamplingTime": {
346
+ "IsVisible": false,
347
+ "Suffix": "",
348
+ "RelativeLocation": "2 3",
349
+ "UnrotatedWidth": 2,
350
+ "UnrotatedHeight": 1,
351
+ "FontSize": 12,
352
+ "Color": "#0081BC"
353
+ },
354
+ "Name": {
355
+ "IsVisible": true,
356
+ "Suffix": "",
357
+ "RelativeLocation": "1 -1",
358
+ "UnrotatedWidth": 2,
359
+ "UnrotatedHeight": 1,
360
+ "FontSize": 12,
361
+ "Color": "#0081BC"
362
+ }
363
+ }
147
364
  },
148
365
  {
149
366
  "LibraryName": "Capacitor",
@@ -156,10 +373,40 @@
156
373
  "Name": "C3",
157
374
  "ID": "9882f21c-fc08-47b4-b84f-d24b3dc5392d",
158
375
  "Parameters": {
159
- "Value": "100e-6",
160
- "Vinit": "0"
376
+ "Value": "100u",
377
+ "Vinit": "0",
378
+ "Name": "C3"
161
379
  },
162
- "EnabledScopes": []
380
+ "EnabledScopes": [],
381
+ "ParametersDisplayAttributes": {
382
+ "Value": {
383
+ "IsVisible": true,
384
+ "Suffix": "F",
385
+ "RelativeLocation": "2 2",
386
+ "UnrotatedWidth": 2,
387
+ "UnrotatedHeight": 1,
388
+ "FontSize": 12,
389
+ "Color": "#0081BC"
390
+ },
391
+ "Vinit": {
392
+ "IsVisible": false,
393
+ "Suffix": "V",
394
+ "RelativeLocation": "2 3",
395
+ "UnrotatedWidth": 2,
396
+ "UnrotatedHeight": 1,
397
+ "FontSize": 12,
398
+ "Color": "#0081BC"
399
+ },
400
+ "Name": {
401
+ "IsVisible": true,
402
+ "Suffix": "",
403
+ "RelativeLocation": "2 -1",
404
+ "UnrotatedWidth": 2,
405
+ "UnrotatedHeight": 1,
406
+ "FontSize": 12,
407
+ "Color": "#0081BC"
408
+ }
409
+ }
163
410
  },
164
411
  {
165
412
  "LibraryName": "DC Current Source",
@@ -172,9 +419,30 @@
172
419
  "Name": "DC1",
173
420
  "ID": "9739698a-b75c-45b1-891c-4103a7adb8ec",
174
421
  "Parameters": {
175
- "Current": "-5"
422
+ "Current": "-5",
423
+ "Name": "DC1"
176
424
  },
177
- "EnabledScopes": []
425
+ "EnabledScopes": [],
426
+ "ParametersDisplayAttributes": {
427
+ "Current": {
428
+ "IsVisible": false,
429
+ "Suffix": "",
430
+ "RelativeLocation": "2 2",
431
+ "UnrotatedWidth": 2,
432
+ "UnrotatedHeight": 1,
433
+ "FontSize": 12,
434
+ "Color": "#0081BC"
435
+ },
436
+ "Name": {
437
+ "IsVisible": true,
438
+ "Suffix": "",
439
+ "RelativeLocation": "4 3",
440
+ "UnrotatedWidth": 2,
441
+ "UnrotatedHeight": 2,
442
+ "FontSize": 12,
443
+ "Color": "#0081BC"
444
+ }
445
+ }
178
446
  },
179
447
  {
180
448
  "LibraryName": "Voltage Probe",
@@ -188,11 +456,41 @@
188
456
  "ID": "c7960a06-b247-43f5-a032-df1d8712b7ab",
189
457
  "Parameters": {
190
458
  "Gain": "1",
191
- "SamplingTime": "none"
459
+ "SamplingTime": "none",
460
+ "Name": "Vo"
192
461
  },
193
462
  "EnabledScopes": [
194
463
  "Out"
195
- ]
464
+ ],
465
+ "ParametersDisplayAttributes": {
466
+ "Gain": {
467
+ "IsVisible": false,
468
+ "Suffix": "",
469
+ "RelativeLocation": "2 2",
470
+ "UnrotatedWidth": 2,
471
+ "UnrotatedHeight": 1,
472
+ "FontSize": 12,
473
+ "Color": "#0081BC"
474
+ },
475
+ "SamplingTime": {
476
+ "IsVisible": false,
477
+ "Suffix": "",
478
+ "RelativeLocation": "1 3",
479
+ "UnrotatedWidth": 2,
480
+ "UnrotatedHeight": 1,
481
+ "FontSize": 12,
482
+ "Color": "#0081BC"
483
+ },
484
+ "Name": {
485
+ "IsVisible": true,
486
+ "Suffix": "",
487
+ "RelativeLocation": "1 -1",
488
+ "UnrotatedWidth": 2,
489
+ "UnrotatedHeight": 1,
490
+ "FontSize": 12,
491
+ "Color": "#0081BC"
492
+ }
493
+ }
196
494
  },
197
495
  {
198
496
  "LibraryName": "Control Input Connector Label",
@@ -204,8 +502,21 @@
204
502
  "Disabled": false,
205
503
  "Name": "I_L",
206
504
  "ID": "40ba1892-19ab-4ad1-9aea-0ad8c1c6e627",
207
- "Parameters": {},
208
- "EnabledScopes": []
505
+ "Parameters": {
506
+ "Name": "I_L"
507
+ },
508
+ "EnabledScopes": [],
509
+ "ParametersDisplayAttributes": {
510
+ "Name": {
511
+ "IsVisible": false,
512
+ "Suffix": "",
513
+ "RelativeLocation": "1 -1",
514
+ "UnrotatedWidth": 2,
515
+ "UnrotatedHeight": 1,
516
+ "FontSize": 12,
517
+ "Color": "#04B404"
518
+ }
519
+ }
209
520
  },
210
521
  {
211
522
  "LibraryName": "Control Output Connector Label",
@@ -217,8 +528,21 @@
217
528
  "Disabled": false,
218
529
  "Name": "Q1",
219
530
  "ID": "de6096b6-6f88-488d-8612-c05f153a148b",
220
- "Parameters": {},
221
- "EnabledScopes": []
531
+ "Parameters": {
532
+ "Name": "Q1"
533
+ },
534
+ "EnabledScopes": [],
535
+ "ParametersDisplayAttributes": {
536
+ "Name": {
537
+ "IsVisible": false,
538
+ "Suffix": "",
539
+ "RelativeLocation": "1 -1",
540
+ "UnrotatedWidth": 2,
541
+ "UnrotatedHeight": 1,
542
+ "FontSize": 12,
543
+ "Color": "#04B404"
544
+ }
545
+ }
222
546
  },
223
547
  {
224
548
  "LibraryName": "Control Output Connector Label",
@@ -230,8 +554,21 @@
230
554
  "Disabled": false,
231
555
  "Name": "Q1_",
232
556
  "ID": "c1258cc9-749f-486c-b46e-f225d3189e20",
233
- "Parameters": {},
234
- "EnabledScopes": []
557
+ "Parameters": {
558
+ "Name": "Q1_"
559
+ },
560
+ "EnabledScopes": [],
561
+ "ParametersDisplayAttributes": {
562
+ "Name": {
563
+ "IsVisible": false,
564
+ "Suffix": "",
565
+ "RelativeLocation": "1 -1",
566
+ "UnrotatedWidth": 2,
567
+ "UnrotatedHeight": 1,
568
+ "FontSize": 12,
569
+ "Color": "#04B404"
570
+ }
571
+ }
235
572
  },
236
573
  {
237
574
  "LibraryName": "Control Output Connector Label",
@@ -243,8 +580,21 @@
243
580
  "Disabled": false,
244
581
  "Name": "Vo",
245
582
  "ID": "5d1c79c5-29cc-4f21-8eaf-31a2dfff494f",
246
- "Parameters": {},
247
- "EnabledScopes": []
583
+ "Parameters": {
584
+ "Name": "Vo"
585
+ },
586
+ "EnabledScopes": [],
587
+ "ParametersDisplayAttributes": {
588
+ "Name": {
589
+ "IsVisible": false,
590
+ "Suffix": "",
591
+ "RelativeLocation": "1 -1",
592
+ "UnrotatedWidth": 2,
593
+ "UnrotatedHeight": 1,
594
+ "FontSize": 12,
595
+ "Color": "#04B404"
596
+ }
597
+ }
248
598
  },
249
599
  {
250
600
  "LibraryName": "Control Output Connector Label",
@@ -256,8 +606,21 @@
256
606
  "Disabled": false,
257
607
  "Name": "I_L",
258
608
  "ID": "ed0382e9-f6a2-4488-bda6-cb362e253256",
259
- "Parameters": {},
260
- "EnabledScopes": []
609
+ "Parameters": {
610
+ "Name": "I_L"
611
+ },
612
+ "EnabledScopes": [],
613
+ "ParametersDisplayAttributes": {
614
+ "Name": {
615
+ "IsVisible": false,
616
+ "Suffix": "",
617
+ "RelativeLocation": "1 -1",
618
+ "UnrotatedWidth": 2,
619
+ "UnrotatedHeight": 1,
620
+ "FontSize": 12,
621
+ "Color": "#04B404"
622
+ }
623
+ }
261
624
  },
262
625
  {
263
626
  "LibraryName": "C Code",
@@ -274,11 +637,68 @@
274
637
  "NumberOfOutputs": "1",
275
638
  "OptionalAdditionalIncludeDirectory": "",
276
639
  "Code": "#include \u0022simba_library.h\u0022 \r\n#include \u003Cstdlib.h\u003E\r\n\r\n\r\ntypedef struct{\r\n double duty_cycle;\r\n double Verror;\r\n double Verror_prev;\r\n double Isp;\r\n double Ierror;\r\n double Ierror_prev;\r\n double Vsw;\r\n} model_data;\r\n\r\nstatic model_data data; \r\n\r\nvoid initialize() {\r\n\tdata.duty_cycle = 0;\r\n\tdata.Verror_prev = 0;\r\n\tdata.Isp = 0;\r\n\tdata.Ierror_prev = 0;\r\n\tdata.Vsw = 0;\r\n}\r\n\r\nvoid calculate_outputs(double* outputs, double* inputs, double time, double time_step) {\r\n\r\n\tdouble V_measured = inputs[0];\r\n\tdouble I_measured = inputs[1];\r\n\tdouble V_REF = 5;\r\n\r\n\t// Voltage loop\r\n\tdouble Verror = V_REF - V_measured;\r\n\tdata.Isp = data.Isp \u002B 0.4894*(Verror - data.Verror_prev) \u002B 0.0174*Verror; \t\t\r\n\tdata.Verror_prev = Verror;\r\n\tif(data.Isp \u003E 20)data.Isp = 20;\r\n\tif(data.Isp \u003C -20)data.Isp = -20;\r\n\r\n\t// Current loop\r\n\tdouble Ierror = data.Isp - I_measured;\r\n\tdata.Vsw = data.Vsw \u002B 3.0588*(Ierror - data.Ierror_prev) \u002B 0.2251*Ierror;\t\t\r\n\tdata.Ierror_prev = Ierror;\r\n\tif(data.Vsw \u003E 10)data.Vsw = 10;\r\n\tif(data.Vsw \u003C 0)data.Vsw = 0;\r\n\r\t// Duty-Cycle\r\n\tdata.duty_cycle = data.Vsw*300/10; \r\n\toutputs[0] = data.duty_cycle;\r\n\t\r\n}\r\n\r\nvoid terminate() {\r\n}\r\n\r\n/*\r\n * Function: snapshot (DO NOT MODIFY)\r\n */\r\nvoid* snapshot(snapshot_mode mode, void* snapshot_ptr) {\r\n\tmodel_data* model_data_ptr;\r\n\tswitch (mode) {\r\n\t\tcase SNAPSHOT_CREATE: // Create and return a snapshot of the current model state\r\n\t\t\tmodel_data_ptr = (model_data*)malloc(sizeof(model_data));\r\n\t\t\tif (model_data_ptr == 0) return 0;\r\n\t\t\t*model_data_ptr = data;\r\n\t\t\treturn (void*)model_data_ptr;\r\n\r\n\t\tcase SNAPSHOT_UPDATE: // Update an existing snapshot with current model data\r\n\t\t\tmodel_data_ptr = (model_data*)snapshot_ptr;\r\n\t\t\t*model_data_ptr = data;\r\n\t\t\treturn snapshot_ptr;\r\n\r\n\t\tcase SNAPSHOT_LOAD: // Restore model data \r\n\t\t\tmodel_data_ptr = (model_data*)snapshot_ptr;\r\n\t\t\tdata = *model_data_ptr;\r\n\t\t\treturn snapshot_ptr;\r\n\r\n\t\tcase SNAPSHOT_DELETE: // Free the resources allocated in SNAPSHOT_CREATE\r\n\t\t\tfree(snapshot_ptr);\r\n\t\t\treturn 0;\r\n\t}\r\n}",
277
- "SamplingTime": "10u"
640
+ "SamplingTime": "10u",
641
+ "Name": "C2"
278
642
  },
279
643
  "EnabledScopes": [
280
644
  "outputs[0]"
281
- ]
645
+ ],
646
+ "ParametersDisplayAttributes": {
647
+ "NumberOfInputs": {
648
+ "IsVisible": false,
649
+ "Suffix": "",
650
+ "RelativeLocation": "4 9",
651
+ "UnrotatedWidth": 2,
652
+ "UnrotatedHeight": 1,
653
+ "FontSize": 12,
654
+ "Color": "#3C3C3C"
655
+ },
656
+ "NumberOfOutputs": {
657
+ "IsVisible": false,
658
+ "Suffix": "",
659
+ "RelativeLocation": "4 10",
660
+ "UnrotatedWidth": 2,
661
+ "UnrotatedHeight": 1,
662
+ "FontSize": 12,
663
+ "Color": "#3C3C3C"
664
+ },
665
+ "OptionalAdditionalIncludeDirectory": {
666
+ "IsVisible": false,
667
+ "Suffix": "",
668
+ "RelativeLocation": "4 11",
669
+ "UnrotatedWidth": 2,
670
+ "UnrotatedHeight": 1,
671
+ "FontSize": 12,
672
+ "Color": "#3C3C3C"
673
+ },
674
+ "Code": {
675
+ "IsVisible": false,
676
+ "Suffix": "",
677
+ "RelativeLocation": "4 12",
678
+ "UnrotatedWidth": 2,
679
+ "UnrotatedHeight": 1,
680
+ "FontSize": 12,
681
+ "Color": "#3C3C3C"
682
+ },
683
+ "SamplingTime": {
684
+ "IsVisible": false,
685
+ "Suffix": "",
686
+ "RelativeLocation": "4 12",
687
+ "UnrotatedWidth": 2,
688
+ "UnrotatedHeight": 1,
689
+ "FontSize": 12,
690
+ "Color": "#3C3C3C"
691
+ },
692
+ "Name": {
693
+ "IsVisible": true,
694
+ "Suffix": "",
695
+ "RelativeLocation": "4 0",
696
+ "UnrotatedWidth": 2,
697
+ "UnrotatedHeight": 1,
698
+ "FontSize": 12,
699
+ "Color": "#3C3C3C"
700
+ }
701
+ }
282
702
  },
283
703
  {
284
704
  "LibraryName": "Control Input Connector Label",
@@ -290,8 +710,21 @@
290
710
  "Disabled": false,
291
711
  "Name": "Vo",
292
712
  "ID": "acc33805-26ff-4033-9e1a-f4327fc6f3ae",
293
- "Parameters": {},
294
- "EnabledScopes": []
713
+ "Parameters": {
714
+ "Name": "Vo"
715
+ },
716
+ "EnabledScopes": [],
717
+ "ParametersDisplayAttributes": {
718
+ "Name": {
719
+ "IsVisible": false,
720
+ "Suffix": "",
721
+ "RelativeLocation": "1 -1",
722
+ "UnrotatedWidth": 2,
723
+ "UnrotatedHeight": 1,
724
+ "FontSize": 12,
725
+ "Color": "#04B404"
726
+ }
727
+ }
295
728
  },
296
729
  {
297
730
  "LibraryName": "Triangular Wave",
@@ -309,9 +742,75 @@
309
742
  "DutyCycle": "0.5",
310
743
  "Offset": "0",
311
744
  "PhaseShift": "0",
312
- "SamplingTime": "none"
745
+ "SamplingTime": "none",
746
+ "Name": "TRI1"
313
747
  },
314
- "EnabledScopes": []
748
+ "EnabledScopes": [],
749
+ "ParametersDisplayAttributes": {
750
+ "Amplitude": {
751
+ "IsVisible": false,
752
+ "Suffix": "",
753
+ "RelativeLocation": "1 4",
754
+ "UnrotatedWidth": 2,
755
+ "UnrotatedHeight": 1,
756
+ "FontSize": 12,
757
+ "Color": "#04B404"
758
+ },
759
+ "Frequency": {
760
+ "IsVisible": false,
761
+ "Suffix": "Hz",
762
+ "RelativeLocation": "1 5",
763
+ "UnrotatedWidth": 2,
764
+ "UnrotatedHeight": 1,
765
+ "FontSize": 12,
766
+ "Color": "#04B404"
767
+ },
768
+ "DutyCycle": {
769
+ "IsVisible": false,
770
+ "Suffix": "",
771
+ "RelativeLocation": "1 6",
772
+ "UnrotatedWidth": 2,
773
+ "UnrotatedHeight": 1,
774
+ "FontSize": 12,
775
+ "Color": "#04B404"
776
+ },
777
+ "Offset": {
778
+ "IsVisible": false,
779
+ "Suffix": "",
780
+ "RelativeLocation": "1 7",
781
+ "UnrotatedWidth": 2,
782
+ "UnrotatedHeight": 1,
783
+ "FontSize": 12,
784
+ "Color": "#04B404"
785
+ },
786
+ "PhaseShift": {
787
+ "IsVisible": false,
788
+ "Suffix": "\u00B0",
789
+ "RelativeLocation": "1 8",
790
+ "UnrotatedWidth": 2,
791
+ "UnrotatedHeight": 1,
792
+ "FontSize": 12,
793
+ "Color": "#04B404"
794
+ },
795
+ "SamplingTime": {
796
+ "IsVisible": false,
797
+ "Suffix": "",
798
+ "RelativeLocation": "1 9",
799
+ "UnrotatedWidth": 2,
800
+ "UnrotatedHeight": 1,
801
+ "FontSize": 12,
802
+ "Color": "#04B404"
803
+ },
804
+ "Name": {
805
+ "IsVisible": false,
806
+ "Suffix": "",
807
+ "RelativeLocation": "1 -1",
808
+ "UnrotatedWidth": 2,
809
+ "UnrotatedHeight": 1,
810
+ "FontSize": 12,
811
+ "Color": "#04B404"
812
+ }
813
+ }
315
814
  },
316
815
  {
317
816
  "LibraryName": "Comparator",
@@ -324,13 +823,34 @@
324
823
  "Name": "COMP1",
325
824
  "ID": "5ec91279-f5b8-4839-a56e-36e8e09b5d2d",
326
825
  "Parameters": {
327
- "SamplingTime": "none"
826
+ "SamplingTime": "none",
827
+ "Name": "COMP1"
328
828
  },
329
829
  "EnabledScopes": [
330
830
  "Input 1",
331
831
  "Input 2",
332
832
  "Out"
333
- ]
833
+ ],
834
+ "ParametersDisplayAttributes": {
835
+ "SamplingTime": {
836
+ "IsVisible": false,
837
+ "Suffix": "",
838
+ "RelativeLocation": "1 4",
839
+ "UnrotatedWidth": 2,
840
+ "UnrotatedHeight": 1,
841
+ "FontSize": 12,
842
+ "Color": "#04B404"
843
+ },
844
+ "Name": {
845
+ "IsVisible": true,
846
+ "Suffix": "",
847
+ "RelativeLocation": "1 -1",
848
+ "UnrotatedWidth": 2,
849
+ "UnrotatedHeight": 1,
850
+ "FontSize": 12,
851
+ "Color": "#04B404"
852
+ }
853
+ }
334
854
  },
335
855
  {
336
856
  "LibraryName": "Not",
@@ -343,9 +863,30 @@
343
863
  "Name": "NOT1",
344
864
  "ID": "3eae191e-868a-4922-a9e3-5bedc3d70475",
345
865
  "Parameters": {
346
- "SamplingTime": "none"
866
+ "SamplingTime": "none",
867
+ "Name": "NOT1"
347
868
  },
348
- "EnabledScopes": []
869
+ "EnabledScopes": [],
870
+ "ParametersDisplayAttributes": {
871
+ "SamplingTime": {
872
+ "IsVisible": false,
873
+ "Suffix": "",
874
+ "RelativeLocation": "1 4",
875
+ "UnrotatedWidth": 2,
876
+ "UnrotatedHeight": 1,
877
+ "FontSize": 12,
878
+ "Color": "#04B404"
879
+ },
880
+ "Name": {
881
+ "IsVisible": false,
882
+ "Suffix": "",
883
+ "RelativeLocation": "1 -1",
884
+ "UnrotatedWidth": 2,
885
+ "UnrotatedHeight": 1,
886
+ "FontSize": 12,
887
+ "Color": "#04B404"
888
+ }
889
+ }
349
890
  },
350
891
  {
351
892
  "LibraryName": "Control Input Connector Label",
@@ -357,8 +898,21 @@
357
898
  "Disabled": false,
358
899
  "Name": "Q1",
359
900
  "ID": "f20e2879-9ce2-4b2e-b9cf-7ae2f6280bba",
360
- "Parameters": {},
361
- "EnabledScopes": []
901
+ "Parameters": {
902
+ "Name": "Q1"
903
+ },
904
+ "EnabledScopes": [],
905
+ "ParametersDisplayAttributes": {
906
+ "Name": {
907
+ "IsVisible": false,
908
+ "Suffix": "",
909
+ "RelativeLocation": "1 -1",
910
+ "UnrotatedWidth": 2,
911
+ "UnrotatedHeight": 1,
912
+ "FontSize": 12,
913
+ "Color": "#04B404"
914
+ }
915
+ }
362
916
  },
363
917
  {
364
918
  "LibraryName": "Control Input Connector Label",
@@ -370,8 +924,21 @@
370
924
  "Disabled": false,
371
925
  "Name": "Q1_",
372
926
  "ID": "e29cb96c-fc9e-4a86-9d43-c3d373608f7a",
373
- "Parameters": {},
374
- "EnabledScopes": []
927
+ "Parameters": {
928
+ "Name": "Q1_"
929
+ },
930
+ "EnabledScopes": [],
931
+ "ParametersDisplayAttributes": {
932
+ "Name": {
933
+ "IsVisible": false,
934
+ "Suffix": "",
935
+ "RelativeLocation": "1 -1",
936
+ "UnrotatedWidth": 2,
937
+ "UnrotatedHeight": 1,
938
+ "FontSize": 12,
939
+ "Color": "#04B404"
940
+ }
941
+ }
375
942
  }
376
943
  ],
377
944
  "Connectors": [
@@ -654,6 +1221,7 @@
654
1221
  "EndTime": "0.005",
655
1222
  "FixedTimeStep": false,
656
1223
  "SaveInitialPoint": true,
1224
+ "CompressScopes": false,
657
1225
  "StopAtSteadyState": false,
658
1226
  "TimeStep": "1E-09",
659
1227
  "BaseFrequencyParameterEnabled": false,