DSS C-API and dss.hpp
DSS C-API and dss.hpp expose a customized and extended implementation of OpenDSS to C and C++.
dss_classic.hpp
1
13#pragma once
14#ifndef DSS_CPP_CLASSIC_API
15#define DSS_CPP_CLASSIC_API
16
17#include "dss_common.hpp"
18#include "dss_obj.hpp"
19
20namespace dss { namespace classic {
21
22#ifdef DSS_CAPI_NAMESPACE
23using namespace dss::capi;
24#endif
25
26
27
29 {
30 public:
31
33 ContextState(util)
34 {
35 }
36 void Close()
37 {
38 APIUtil::ErrorChecker error_checker(api_util);
39 ctx_DSSProgress_Close(ctx);
40 }
41 void Show()
42 {
43 APIUtil::ErrorChecker error_checker(api_util);
44 ctx_DSSProgress_Show(ctx);
45 }
46
50 IDSSProgress& Caption(const char *value) // setter
51 {
52 APIUtil::ErrorChecker error_checker(api_util);
53 ctx_DSSProgress_Set_Caption(ctx, value);
54 return *this;
55 }
56 IDSSProgress& Caption(const string &value) // setter
57 {
58 APIUtil::ErrorChecker error_checker(api_util);
59 ctx_DSSProgress_Set_Caption(ctx, value.c_str());
60 return *this;
61 }
62
66 IDSSProgress& PctProgress(int32_t value) // setter
67 {
68 APIUtil::ErrorChecker error_checker(api_util);
69 ctx_DSSProgress_Set_PctProgress(ctx, value);
70 return *this;
71 }
72 };
73
75 {
76 public:
77
79 ContextState(util)
80 {
81 }
82
83 IDSSProperty& operator[](int32_t key) // getter
84 {
85 APIUtil::ErrorChecker error_checker(api_util);
86 ctx_DSSProperty_Set_Index(ctx, key);
87 return *this;
88 }
89
90 IDSSProperty& operator[](const char *key) // getter
91 {
92 APIUtil::ErrorChecker error_checker(api_util);
93 ctx_DSSProperty_Set_Name(ctx, key);
94 return *this;
95 }
96 IDSSProperty& operator[](const string &key) // getter
97 {
98 return (*this)[key.c_str()];
99 }
100
104 string Description() // getter
105 {
106 APIUtil::ErrorChecker error_checker(api_util);
107 return ctx_DSSProperty_Get_Description(ctx);
108 }
109
113 string Name() // getter
114 {
115 APIUtil::ErrorChecker error_checker(api_util);
116 return ctx_DSSProperty_Get_Name(ctx);
117 }
118
119 string Val() // getter
120 {
121 APIUtil::ErrorChecker error_checker(api_util);
122 return ctx_DSSProperty_Get_Val(ctx);
123 }
124 IDSSProperty& Val(const char *value) // setter
125 {
126 APIUtil::ErrorChecker error_checker(api_util);
127 ctx_DSSProperty_Set_Val(ctx, value);
128 return *this;
129 }
130 IDSSProperty& Val(const string &value) // setter
131 {
132 APIUtil::ErrorChecker error_checker(api_util);
133 ctx_DSSProperty_Set_Val(ctx, value.c_str());
134 return *this;
135 }
136 };
137
139 {
140 public:
141
143 ContextState(util)
144 {
145 }
149 string Command(int32_t i)
150 {
151 APIUtil::ErrorChecker error_checker(api_util);
152 return ctx_DSS_Executive_Get_Command(ctx, i);
153 }
157 string CommandHelp(int32_t i)
158 {
159 APIUtil::ErrorChecker error_checker(api_util);
160 return ctx_DSS_Executive_Get_CommandHelp(ctx, i);
161 }
165 string Option(int32_t i)
166 {
167 APIUtil::ErrorChecker error_checker(api_util);
168 return ctx_DSS_Executive_Get_Option(ctx, i);
169 }
173 string OptionHelp(int32_t i)
174 {
175 APIUtil::ErrorChecker error_checker(api_util);
176 return ctx_DSS_Executive_Get_OptionHelp(ctx, i);
177 }
181 string OptionValue(int32_t i)
182 {
183 APIUtil::ErrorChecker error_checker(api_util);
184 return ctx_DSS_Executive_Get_OptionValue(ctx, i);
185 }
186
190 int32_t NumCommands() // getter
191 {
192 APIUtil::ErrorChecker error_checker(api_util);
193 return ctx_DSS_Executive_Get_NumCommands(ctx);
194 }
195
199 int32_t NumOptions() // getter
200 {
201 APIUtil::ErrorChecker error_checker(api_util);
202 return ctx_DSS_Executive_Get_NumOptions(ctx);
203 }
204 };
205
207 {
208 public:
209
210 IDSSimComs(dss::APIUtil *util) :
211 ContextState(util)
212 {
213 }
214 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
215 VectorT BusVoltage(size_t Index)
216 {
217 APIUtil::ErrorChecker error_checker(api_util);
218 ctx_DSSimComs_BusVoltage_GR(ctx, Index);
219 return api_util->get_float64_gr_array<VectorT>();
220 }
221 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
222 VectorT BusVoltagepu(size_t Index)
223 {
224 APIUtil::ErrorChecker error_checker(api_util);
225 ctx_DSSimComs_BusVoltagepu_GR(ctx, Index);
226 return api_util->get_float64_gr_array<VectorT>();
227 }
228 };
229
230 class IError: public ContextState
231 {
232 public:
233
234 IError(dss::APIUtil *util) :
235 ContextState(util)
236 {
237 }
238
242 string Description() // getter
243 {
244 APIUtil::ErrorChecker error_checker(api_util);
245 return ctx_Error_Get_Description(ctx);
246 }
247
251 int32_t Number() // getter
252 {
253 APIUtil::ErrorChecker error_checker(api_util);
254 return ctx_Error_Get_Number(ctx);
255 }
256
262 bool EarlyAbort() // getter
263 {
264 APIUtil::ErrorChecker error_checker(api_util);
265 return (ctx_Error_Get_EarlyAbort(ctx) != 0);
266 }
267 IError& EarlyAbort(bool value) // setter
268 {
269 APIUtil::ErrorChecker error_checker(api_util);
270 ctx_Error_Set_EarlyAbort(ctx, value);
271 return *this;
272 }
273
296 bool ExtendedErrors() // getter
297 {
298 APIUtil::ErrorChecker error_checker(api_util);
299 return (ctx_Error_Get_ExtendedErrors(ctx) != 0);
300 }
301 IError& ExtendedErrors(bool value) // setter
302 {
303 APIUtil::ErrorChecker error_checker(api_util);
304 ctx_Error_Set_ExtendedErrors(ctx, value);
305 return *this;
306 }
307 };
308
309 class IFuses: public ContextState
310 {
311 public:
312
313 IFuses(dss::APIUtil *util) :
314 ContextState(util)
315 {
316 }
317
321 strings AllNames() // getter
322 {
323 APIUtil::ErrorChecker error_checker(api_util);
324 return api_util->get_string_array(ctx_Fuses_Get_AllNames);
325 }
326
330 int32_t Count() // getter
331 {
332 APIUtil::ErrorChecker error_checker(api_util);
333 return ctx_Fuses_Get_Count(ctx);
334 }
335
339 int32_t First() // getter
340 {
341 APIUtil::ErrorChecker error_checker(api_util);
342 return ctx_Fuses_Get_First(ctx);
343 }
344
348 string Name() // getter
349 {
350 APIUtil::ErrorChecker error_checker(api_util);
351 return ctx_Fuses_Get_Name(ctx);
352 }
353
357 IFuses& Name(const char *value)
358 {
359 APIUtil::ErrorChecker error_checker(api_util);
360 ctx_Fuses_Set_Name(ctx, value);
361 return *this;
362 }
363 IFuses& Name(const string &value)
364 {
365 return Name(value.c_str());
366 }
367
371 int32_t Next() // getter
372 {
373 APIUtil::ErrorChecker error_checker(api_util);
374 return ctx_Fuses_Get_Next(ctx);
375 }
376
380 int32_t idx() // getter
381 {
382 APIUtil::ErrorChecker error_checker(api_util);
383 return ctx_Fuses_Get_idx(ctx);
384 }
385
389 void idx(int32_t value) // setter
390 {
391 APIUtil::ErrorChecker error_checker(api_util);
392 ctx_Fuses_Set_idx(ctx, value);
393 }
397 void Close()
398 {
399 APIUtil::ErrorChecker error_checker(api_util);
400 ctx_Fuses_Close(ctx);
401 }
405 bool IsBlown()
406 {
407 APIUtil::ErrorChecker error_checker(api_util);
408 return (ctx_Fuses_IsBlown(ctx) != 0);
409 }
413 void Open()
414 {
415 APIUtil::ErrorChecker error_checker(api_util);
416 ctx_Fuses_Open(ctx);
417 }
421 void Reset()
422 {
423 APIUtil::ErrorChecker error_checker(api_util);
424 ctx_Fuses_Reset(ctx);
425 }
426
431 double Delay() // getter
432 {
433 APIUtil::ErrorChecker error_checker(api_util);
434 return ctx_Fuses_Get_Delay(ctx);
435 }
436 IFuses& Delay(double value) // setter
437 {
438 APIUtil::ErrorChecker error_checker(api_util);
439 ctx_Fuses_Set_Delay(ctx, value);
440 return *this;
441 }
442
446 string MonitoredObj() // getter
447 {
448 APIUtil::ErrorChecker error_checker(api_util);
449 return ctx_Fuses_Get_MonitoredObj(ctx);
450 }
451 IFuses& MonitoredObj(const char *value) // setter
452 {
453 APIUtil::ErrorChecker error_checker(api_util);
454 ctx_Fuses_Set_MonitoredObj(ctx, value);
455 return *this;
456 }
457 IFuses& MonitoredObj(const string &value) // setter
458 {
459 APIUtil::ErrorChecker error_checker(api_util);
460 ctx_Fuses_Set_MonitoredObj(ctx, value.c_str());
461 return *this;
462 }
463
467 int32_t MonitoredTerm() // getter
468 {
469 APIUtil::ErrorChecker error_checker(api_util);
470 return ctx_Fuses_Get_MonitoredTerm(ctx);
471 }
472 IFuses& MonitoredTerm(int32_t value) // setter
473 {
474 APIUtil::ErrorChecker error_checker(api_util);
475 ctx_Fuses_Set_MonitoredTerm(ctx, value);
476 return *this;
477 }
478
482 int32_t NumPhases() // getter
483 {
484 APIUtil::ErrorChecker error_checker(api_util);
485 return ctx_Fuses_Get_NumPhases(ctx);
486 }
487
492 double RatedCurrent() // getter
493 {
494 APIUtil::ErrorChecker error_checker(api_util);
495 return ctx_Fuses_Get_RatedCurrent(ctx);
496 }
497 IFuses& RatedCurrent(double value) // setter
498 {
499 APIUtil::ErrorChecker error_checker(api_util);
500 ctx_Fuses_Set_RatedCurrent(ctx, value);
501 return *this;
502 }
503
508 string SwitchedObj() // getter
509 {
510 APIUtil::ErrorChecker error_checker(api_util);
511 return ctx_Fuses_Get_SwitchedObj(ctx);
512 }
513 IFuses& SwitchedObj(const char *value) // setter
514 {
515 APIUtil::ErrorChecker error_checker(api_util);
516 ctx_Fuses_Set_SwitchedObj(ctx, value);
517 return *this;
518 }
519 IFuses& SwitchedObj(const string &value) // setter
520 {
521 APIUtil::ErrorChecker error_checker(api_util);
522 ctx_Fuses_Set_SwitchedObj(ctx, value.c_str());
523 return *this;
524 }
525
529 int32_t SwitchedTerm() // getter
530 {
531 APIUtil::ErrorChecker error_checker(api_util);
532 return ctx_Fuses_Get_SwitchedTerm(ctx);
533 }
534 IFuses& SwitchedTerm(int32_t value) // setter
535 {
536 APIUtil::ErrorChecker error_checker(api_util);
537 ctx_Fuses_Set_SwitchedTerm(ctx, value);
538 return *this;
539 }
540
544 string TCCcurve() // getter
545 {
546 APIUtil::ErrorChecker error_checker(api_util);
547 return ctx_Fuses_Get_TCCcurve(ctx);
548 }
549 IFuses& TCCcurve(const char *value) // setter
550 {
551 APIUtil::ErrorChecker error_checker(api_util);
552 ctx_Fuses_Set_TCCcurve(ctx, value);
553 return *this;
554 }
555 IFuses& TCCcurve(const string &value) // setter
556 {
557 APIUtil::ErrorChecker error_checker(api_util);
558 ctx_Fuses_Set_TCCcurve(ctx, value.c_str());
559 return *this;
560 }
561
565 strings State() // getter
566 {
567 APIUtil::ErrorChecker error_checker(api_util);
568 return api_util->get_string_array(ctx_Fuses_Get_State);
569 }
570 IFuses& State(const strings &value) // setter
571 {
572 APIUtil::ErrorChecker error_checker(api_util);
573 api_util->set_string_array(ctx_Fuses_Set_State, value);
574 return *this;
575 }
576
580 strings NormalState() // getter
581 {
582 APIUtil::ErrorChecker error_checker(api_util);
583 return api_util->get_string_array(ctx_Fuses_Get_NormalState);
584 }
585 IFuses& NormalState(const strings &value) // setter
586 {
587 APIUtil::ErrorChecker error_checker(api_util);
588 api_util->set_string_array(ctx_Fuses_Set_NormalState, value);
589 return *this;
590 }
591 };
592
594 {
595 public:
596
598 ContextState(util)
599 {
600 }
601
605 strings AllNames() // getter
606 {
607 APIUtil::ErrorChecker error_checker(api_util);
608 return api_util->get_string_array(ctx_Generators_Get_AllNames);
609 }
610
614 int32_t Count() // getter
615 {
616 APIUtil::ErrorChecker error_checker(api_util);
617 return ctx_Generators_Get_Count(ctx);
618 }
619
623 int32_t First() // getter
624 {
625 APIUtil::ErrorChecker error_checker(api_util);
626 return ctx_Generators_Get_First(ctx);
627 }
628
632 string Name() // getter
633 {
634 APIUtil::ErrorChecker error_checker(api_util);
635 return ctx_Generators_Get_Name(ctx);
636 }
637
641 IGenerators& Name(const char *value)
642 {
643 APIUtil::ErrorChecker error_checker(api_util);
644 ctx_Generators_Set_Name(ctx, value);
645 return *this;
646 }
647 IGenerators& Name(const string &value)
648 {
649 return Name(value.c_str());
650 }
651
655 int32_t Next() // getter
656 {
657 APIUtil::ErrorChecker error_checker(api_util);
658 return ctx_Generators_Get_Next(ctx);
659 }
660
664 int32_t idx() // getter
665 {
666 APIUtil::ErrorChecker error_checker(api_util);
667 return ctx_Generators_Get_idx(ctx);
668 }
669
673 void idx(int32_t value) // setter
674 {
675 APIUtil::ErrorChecker error_checker(api_util);
676 ctx_Generators_Set_idx(ctx, value);
677 }
678
682 bool ForcedON() // getter
683 {
684 APIUtil::ErrorChecker error_checker(api_util);
685 return (ctx_Generators_Get_ForcedON(ctx) != 0);
686 }
687 IGenerators& ForcedON(bool value) // setter
688 {
689 APIUtil::ErrorChecker error_checker(api_util);
690 ctx_Generators_Set_ForcedON(ctx, value);
691 return *this;
692 }
693
697 int32_t Model() // getter
698 {
699 APIUtil::ErrorChecker error_checker(api_util);
700 return ctx_Generators_Get_Model(ctx);
701 }
702 IGenerators& Model(int32_t value) // setter
703 {
704 APIUtil::ErrorChecker error_checker(api_util);
705 ctx_Generators_Set_Model(ctx, value);
706 return *this;
707 }
708
712 double PF() // getter
713 {
714 APIUtil::ErrorChecker error_checker(api_util);
715 return ctx_Generators_Get_PF(ctx);
716 }
717 IGenerators& PF(double value) // setter
718 {
719 APIUtil::ErrorChecker error_checker(api_util);
720 ctx_Generators_Set_PF(ctx, value);
721 return *this;
722 }
723
727 int32_t Phases() // getter
728 {
729 APIUtil::ErrorChecker error_checker(api_util);
730 return ctx_Generators_Get_Phases(ctx);
731 }
732 IGenerators& Phases(int32_t value) // setter
733 {
734 APIUtil::ErrorChecker error_checker(api_util);
735 ctx_Generators_Set_Phases(ctx, value);
736 return *this;
737 }
738
742 strings RegisterNames() // getter
743 {
744 APIUtil::ErrorChecker error_checker(api_util);
745 return api_util->get_string_array(ctx_Generators_Get_RegisterNames);
746 }
747
751 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
752 VectorT RegisterValues() // getter
753 {
754 APIUtil::ErrorChecker error_checker(api_util);
755 ctx_Generators_Get_RegisterValues_GR(ctx);
756 return api_util->get_float64_gr_array<VectorT>();
757 }
758
762 double Vmaxpu() // getter
763 {
764 APIUtil::ErrorChecker error_checker(api_util);
765 return ctx_Generators_Get_Vmaxpu(ctx);
766 }
767 IGenerators& Vmaxpu(double value) // setter
768 {
769 APIUtil::ErrorChecker error_checker(api_util);
770 ctx_Generators_Set_Vmaxpu(ctx, value);
771 return *this;
772 }
773
777 double Vminpu() // getter
778 {
779 APIUtil::ErrorChecker error_checker(api_util);
780 return ctx_Generators_Get_Vminpu(ctx);
781 }
782 IGenerators& Vminpu(double value) // setter
783 {
784 APIUtil::ErrorChecker error_checker(api_util);
785 ctx_Generators_Set_Vminpu(ctx, value);
786 return *this;
787 }
788
792 double kV() // getter
793 {
794 APIUtil::ErrorChecker error_checker(api_util);
795 return ctx_Generators_Get_kV(ctx);
796 }
797 IGenerators& kV(double value) // setter
798 {
799 APIUtil::ErrorChecker error_checker(api_util);
800 ctx_Generators_Set_kV(ctx, value);
801 return *this;
802 }
803
807 double kVArated() // getter
808 {
809 APIUtil::ErrorChecker error_checker(api_util);
810 return ctx_Generators_Get_kVArated(ctx);
811 }
812 IGenerators& kVArated(double value) // setter
813 {
814 APIUtil::ErrorChecker error_checker(api_util);
815 ctx_Generators_Set_kVArated(ctx, value);
816 return *this;
817 }
818
822 double kW() // getter
823 {
824 APIUtil::ErrorChecker error_checker(api_util);
825 return ctx_Generators_Get_kW(ctx);
826 }
827 IGenerators& kW(double value) // setter
828 {
829 APIUtil::ErrorChecker error_checker(api_util);
830 ctx_Generators_Set_kW(ctx, value);
831 return *this;
832 }
833
837 double kvar() // getter
838 {
839 APIUtil::ErrorChecker error_checker(api_util);
840 return ctx_Generators_Get_kvar(ctx);
841 }
842 IGenerators& kvar(double value) // setter
843 {
844 APIUtil::ErrorChecker error_checker(api_util);
845 ctx_Generators_Set_kvar(ctx, value);
846 return *this;
847 }
848
854 string daily() // getter
855 {
856 APIUtil::ErrorChecker error_checker(api_util);
857 return ctx_Generators_Get_daily(ctx);
858 }
859 IGenerators& daily(const char *value) // setter
860 {
861 APIUtil::ErrorChecker error_checker(api_util);
862 ctx_Generators_Set_daily(ctx, value);
863 return *this;
864 }
865 IGenerators& daily(const string &value) // setter
866 {
867 APIUtil::ErrorChecker error_checker(api_util);
868 ctx_Generators_Set_daily(ctx, value.c_str());
869 return *this;
870 }
871
877 string duty() // getter
878 {
879 APIUtil::ErrorChecker error_checker(api_util);
880 return ctx_Generators_Get_duty(ctx);
881 }
882 IGenerators& duty(const char *value) // setter
883 {
884 APIUtil::ErrorChecker error_checker(api_util);
885 ctx_Generators_Set_duty(ctx, value);
886 return *this;
887 }
888 IGenerators& duty(const string &value) // setter
889 {
890 APIUtil::ErrorChecker error_checker(api_util);
891 ctx_Generators_Set_duty(ctx, value.c_str());
892 return *this;
893 }
894
900 string Yearly() // getter
901 {
902 APIUtil::ErrorChecker error_checker(api_util);
903 return ctx_Generators_Get_Yearly(ctx);
904 }
905 IGenerators& Yearly(const char *value) // setter
906 {
907 APIUtil::ErrorChecker error_checker(api_util);
908 ctx_Generators_Set_Yearly(ctx, value);
909 return *this;
910 }
911 IGenerators& Yearly(const string &value) // setter
912 {
913 APIUtil::ErrorChecker error_checker(api_util);
914 ctx_Generators_Set_Yearly(ctx, value.c_str());
915 return *this;
916 }
917
925 int32_t Status() // getter
926 {
927 APIUtil::ErrorChecker error_checker(api_util);
928 return ctx_Generators_Get_Status(ctx);
929 }
930 IGenerators& Status(int32_t value) // setter
931 {
932 APIUtil::ErrorChecker error_checker(api_util);
933 ctx_Generators_Set_Status(ctx, value);
934 return *this;
935 }
936
942 bool IsDelta() // getter
943 {
944 APIUtil::ErrorChecker error_checker(api_util);
945 return (ctx_Generators_Get_IsDelta(ctx) != 0);
946 }
947 IGenerators& IsDelta(bool value) // setter
948 {
949 APIUtil::ErrorChecker error_checker(api_util);
950 ctx_Generators_Set_IsDelta(ctx, value);
951 return *this;
952 }
953
959 double kva() // getter
960 {
961 APIUtil::ErrorChecker error_checker(api_util);
962 return ctx_Generators_Get_kva(ctx);
963 }
964 IGenerators& kva(double value) // setter
965 {
966 APIUtil::ErrorChecker error_checker(api_util);
967 ctx_Generators_Set_kva(ctx, value);
968 return *this;
969 }
970
976 int32_t Class() // getter
977 {
978 APIUtil::ErrorChecker error_checker(api_util);
979 return ctx_Generators_Get_Class_(ctx);
980 }
981 IGenerators& Class(int32_t value) // setter
982 {
983 APIUtil::ErrorChecker error_checker(api_util);
984 ctx_Generators_Set_Class_(ctx, value);
985 return *this;
986 }
987
993 string Bus1() // getter
994 {
995 APIUtil::ErrorChecker error_checker(api_util);
996 return ctx_Generators_Get_Bus1(ctx);
997 }
998 IGenerators& Bus1(const char *value) // setter
999 {
1000 APIUtil::ErrorChecker error_checker(api_util);
1001 ctx_Generators_Set_Bus1(ctx, value);
1002 return *this;
1003 }
1004 IGenerators& Bus1(const string &value) // setter
1005 {
1006 APIUtil::ErrorChecker error_checker(api_util);
1007 ctx_Generators_Set_Bus1(ctx, value.c_str());
1008 return *this;
1009 }
1010 };
1011
1013 {
1014 public:
1015
1016 IISources(dss::APIUtil *util) :
1017 ContextState(util)
1018 {
1019 }
1020
1024 strings AllNames() // getter
1025 {
1026 APIUtil::ErrorChecker error_checker(api_util);
1027 return api_util->get_string_array(ctx_ISources_Get_AllNames);
1028 }
1029
1033 int32_t Count() // getter
1034 {
1035 APIUtil::ErrorChecker error_checker(api_util);
1036 return ctx_ISources_Get_Count(ctx);
1037 }
1038
1042 int32_t First() // getter
1043 {
1044 APIUtil::ErrorChecker error_checker(api_util);
1045 return ctx_ISources_Get_First(ctx);
1046 }
1047
1051 string Name() // getter
1052 {
1053 APIUtil::ErrorChecker error_checker(api_util);
1054 return ctx_ISources_Get_Name(ctx);
1055 }
1056
1060 IISources& Name(const char *value)
1061 {
1062 APIUtil::ErrorChecker error_checker(api_util);
1063 ctx_ISources_Set_Name(ctx, value);
1064 return *this;
1065 }
1066 IISources& Name(const string &value)
1067 {
1068 return Name(value.c_str());
1069 }
1070
1074 int32_t Next() // getter
1075 {
1076 APIUtil::ErrorChecker error_checker(api_util);
1077 return ctx_ISources_Get_Next(ctx);
1078 }
1079
1083 int32_t idx() // getter
1084 {
1085 APIUtil::ErrorChecker error_checker(api_util);
1086 return ctx_ISources_Get_idx(ctx);
1087 }
1088
1092 void idx(int32_t value) // setter
1093 {
1094 APIUtil::ErrorChecker error_checker(api_util);
1095 ctx_ISources_Set_idx(ctx, value);
1096 }
1097
1101 double Amps() // getter
1102 {
1103 APIUtil::ErrorChecker error_checker(api_util);
1104 return ctx_ISources_Get_Amps(ctx);
1105 }
1106 IISources& Amps(double value) // setter
1107 {
1108 APIUtil::ErrorChecker error_checker(api_util);
1109 ctx_ISources_Set_Amps(ctx, value);
1110 return *this;
1111 }
1112
1116 double AngleDeg() // getter
1117 {
1118 APIUtil::ErrorChecker error_checker(api_util);
1119 return ctx_ISources_Get_AngleDeg(ctx);
1120 }
1121 IISources& AngleDeg(double value) // setter
1122 {
1123 APIUtil::ErrorChecker error_checker(api_util);
1124 ctx_ISources_Set_AngleDeg(ctx, value);
1125 return *this;
1126 }
1127
1131 double Frequency() // getter
1132 {
1133 APIUtil::ErrorChecker error_checker(api_util);
1134 return ctx_ISources_Get_Frequency(ctx);
1135 }
1136 IISources& Frequency(double value) // setter
1137 {
1138 APIUtil::ErrorChecker error_checker(api_util);
1139 ctx_ISources_Set_Frequency(ctx, value);
1140 return *this;
1141 }
1142 };
1143
1145 {
1146 public:
1147
1148 ILineCodes(dss::APIUtil *util) :
1149 ContextState(util)
1150 {
1151 }
1152
1156 strings AllNames() // getter
1157 {
1158 APIUtil::ErrorChecker error_checker(api_util);
1159 return api_util->get_string_array(ctx_LineCodes_Get_AllNames);
1160 }
1161
1165 int32_t Count() // getter
1166 {
1167 APIUtil::ErrorChecker error_checker(api_util);
1168 return ctx_LineCodes_Get_Count(ctx);
1169 }
1170
1174 int32_t First() // getter
1175 {
1176 APIUtil::ErrorChecker error_checker(api_util);
1177 return ctx_LineCodes_Get_First(ctx);
1178 }
1179
1183 string Name() // getter
1184 {
1185 APIUtil::ErrorChecker error_checker(api_util);
1186 return ctx_LineCodes_Get_Name(ctx);
1187 }
1188
1192 ILineCodes& Name(const char *value)
1193 {
1194 APIUtil::ErrorChecker error_checker(api_util);
1195 ctx_LineCodes_Set_Name(ctx, value);
1196 return *this;
1197 }
1198 ILineCodes& Name(const string &value)
1199 {
1200 return Name(value.c_str());
1201 }
1202
1206 int32_t Next() // getter
1207 {
1208 APIUtil::ErrorChecker error_checker(api_util);
1209 return ctx_LineCodes_Get_Next(ctx);
1210 }
1211
1215 int32_t idx() // getter
1216 {
1217 APIUtil::ErrorChecker error_checker(api_util);
1218 return ctx_LineCodes_Get_idx(ctx);
1219 }
1220
1224 void idx(int32_t value) // setter
1225 {
1226 APIUtil::ErrorChecker error_checker(api_util);
1227 ctx_LineCodes_Set_idx(ctx, value);
1228 }
1229
1233 double C0() // getter
1234 {
1235 APIUtil::ErrorChecker error_checker(api_util);
1236 return ctx_LineCodes_Get_C0(ctx);
1237 }
1238 ILineCodes& C0(double value) // setter
1239 {
1240 APIUtil::ErrorChecker error_checker(api_util);
1241 ctx_LineCodes_Set_C0(ctx, value);
1242 return *this;
1243 }
1244
1248 double C1() // getter
1249 {
1250 APIUtil::ErrorChecker error_checker(api_util);
1251 return ctx_LineCodes_Get_C1(ctx);
1252 }
1253 ILineCodes& C1(double value) // setter
1254 {
1255 APIUtil::ErrorChecker error_checker(api_util);
1256 ctx_LineCodes_Set_C1(ctx, value);
1257 return *this;
1258 }
1259
1263 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1264 VectorT Cmatrix() // getter
1265 {
1266 APIUtil::ErrorChecker error_checker(api_util);
1267 ctx_LineCodes_Get_Cmatrix_GR(ctx);
1268 return api_util->get_float64_gr_array<VectorT>();
1269 }
1270 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1271 ILineCodes& Cmatrix(const VectorT &value) // setter
1272 {
1273 APIUtil::ErrorChecker error_checker(api_util);
1274 ctx_LineCodes_Set_Cmatrix(ctx, &value[0], value.size());
1275 return *this;
1276 }
1277
1281 double EmergAmps() // getter
1282 {
1283 APIUtil::ErrorChecker error_checker(api_util);
1284 return ctx_LineCodes_Get_EmergAmps(ctx);
1285 }
1286 ILineCodes& EmergAmps(double value) // setter
1287 {
1288 APIUtil::ErrorChecker error_checker(api_util);
1289 ctx_LineCodes_Set_EmergAmps(ctx, value);
1290 return *this;
1291 }
1292
1296 bool IsZ1Z0() // getter
1297 {
1298 APIUtil::ErrorChecker error_checker(api_util);
1299 return (ctx_LineCodes_Get_IsZ1Z0(ctx) != 0);
1300 }
1301
1305 double NormAmps() // getter
1306 {
1307 APIUtil::ErrorChecker error_checker(api_util);
1308 return ctx_LineCodes_Get_NormAmps(ctx);
1309 }
1310 ILineCodes& NormAmps(double value) // setter
1311 {
1312 APIUtil::ErrorChecker error_checker(api_util);
1313 ctx_LineCodes_Set_NormAmps(ctx, value);
1314 return *this;
1315 }
1316
1320 int32_t Phases() // getter
1321 {
1322 APIUtil::ErrorChecker error_checker(api_util);
1323 return ctx_LineCodes_Get_Phases(ctx);
1324 }
1325 ILineCodes& Phases(int32_t value) // setter
1326 {
1327 APIUtil::ErrorChecker error_checker(api_util);
1328 ctx_LineCodes_Set_Phases(ctx, value);
1329 return *this;
1330 }
1331
1335 double R0() // getter
1336 {
1337 APIUtil::ErrorChecker error_checker(api_util);
1338 return ctx_LineCodes_Get_R0(ctx);
1339 }
1340 ILineCodes& R0(double value) // setter
1341 {
1342 APIUtil::ErrorChecker error_checker(api_util);
1343 ctx_LineCodes_Set_R0(ctx, value);
1344 return *this;
1345 }
1346
1350 double R1() // getter
1351 {
1352 APIUtil::ErrorChecker error_checker(api_util);
1353 return ctx_LineCodes_Get_R1(ctx);
1354 }
1355 ILineCodes& R1(double value) // setter
1356 {
1357 APIUtil::ErrorChecker error_checker(api_util);
1358 ctx_LineCodes_Set_R1(ctx, value);
1359 return *this;
1360 }
1361
1365 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1366 VectorT Rmatrix() // getter
1367 {
1368 APIUtil::ErrorChecker error_checker(api_util);
1369 ctx_LineCodes_Get_Rmatrix_GR(ctx);
1370 return api_util->get_float64_gr_array<VectorT>();
1371 }
1372 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1373 ILineCodes& Rmatrix(const VectorT &value) // setter
1374 {
1375 APIUtil::ErrorChecker error_checker(api_util);
1376 ctx_LineCodes_Set_Rmatrix(ctx, &value[0], value.size());
1377 return *this;
1378 }
1379
1380 int32_t Units() // getter
1381 {
1382 APIUtil::ErrorChecker error_checker(api_util);
1383 return ctx_LineCodes_Get_Units(ctx);
1384 }
1385 ILineCodes& Units(int32_t value) // setter
1386 {
1387 APIUtil::ErrorChecker error_checker(api_util);
1388 ctx_LineCodes_Set_Units(ctx, value);
1389 return *this;
1390 }
1391
1395 double X0() // getter
1396 {
1397 APIUtil::ErrorChecker error_checker(api_util);
1398 return ctx_LineCodes_Get_X0(ctx);
1399 }
1400 ILineCodes& X0(double value) // setter
1401 {
1402 APIUtil::ErrorChecker error_checker(api_util);
1403 ctx_LineCodes_Set_X0(ctx, value);
1404 return *this;
1405 }
1406
1410 double X1() // getter
1411 {
1412 APIUtil::ErrorChecker error_checker(api_util);
1413 return ctx_LineCodes_Get_X1(ctx);
1414 }
1415 ILineCodes& X1(double value) // setter
1416 {
1417 APIUtil::ErrorChecker error_checker(api_util);
1418 ctx_LineCodes_Set_X1(ctx, value);
1419 return *this;
1420 }
1421
1425 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1426 VectorT Xmatrix() // getter
1427 {
1428 APIUtil::ErrorChecker error_checker(api_util);
1429 ctx_LineCodes_Get_Xmatrix_GR(ctx);
1430 return api_util->get_float64_gr_array<VectorT>();
1431 }
1432 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1433 ILineCodes& Xmatrix(const VectorT &value) // setter
1434 {
1435 APIUtil::ErrorChecker error_checker(api_util);
1436 ctx_LineCodes_Set_Xmatrix(ctx, &value[0], value.size());
1437 return *this;
1438 }
1439 };
1440
1442 {
1443 public:
1444
1446 ContextState(util)
1447 {
1448 }
1449
1453 strings AllNames() // getter
1454 {
1455 APIUtil::ErrorChecker error_checker(api_util);
1456 return api_util->get_string_array(ctx_LineSpacings_Get_AllNames);
1457 }
1458
1462 int32_t Count() // getter
1463 {
1464 APIUtil::ErrorChecker error_checker(api_util);
1465 return ctx_LineSpacings_Get_Count(ctx);
1466 }
1467
1471 int32_t First() // getter
1472 {
1473 APIUtil::ErrorChecker error_checker(api_util);
1474 return ctx_LineSpacings_Get_First(ctx);
1475 }
1476
1480 string Name() // getter
1481 {
1482 APIUtil::ErrorChecker error_checker(api_util);
1483 return ctx_LineSpacings_Get_Name(ctx);
1484 }
1485
1489 ILineSpacings& Name(const char *value)
1490 {
1491 APIUtil::ErrorChecker error_checker(api_util);
1492 ctx_LineSpacings_Set_Name(ctx, value);
1493 return *this;
1494 }
1495 ILineSpacings& Name(const string &value)
1496 {
1497 return Name(value.c_str());
1498 }
1499
1503 int32_t Next() // getter
1504 {
1505 APIUtil::ErrorChecker error_checker(api_util);
1506 return ctx_LineSpacings_Get_Next(ctx);
1507 }
1508
1512 int32_t idx() // getter
1513 {
1514 APIUtil::ErrorChecker error_checker(api_util);
1515 return ctx_LineSpacings_Get_idx(ctx);
1516 }
1517
1521 void idx(int32_t value) // setter
1522 {
1523 APIUtil::ErrorChecker error_checker(api_util);
1524 ctx_LineSpacings_Set_idx(ctx, value);
1525 }
1526
1530 int32_t Phases() // getter
1531 {
1532 APIUtil::ErrorChecker error_checker(api_util);
1533 return ctx_LineSpacings_Get_Phases(ctx);
1534 }
1535 ILineSpacings& Phases(int32_t value) // setter
1536 {
1537 APIUtil::ErrorChecker error_checker(api_util);
1538 ctx_LineSpacings_Set_Phases(ctx, value);
1539 return *this;
1540 }
1541
1542 int32_t Nconds() // getter
1543 {
1544 APIUtil::ErrorChecker error_checker(api_util);
1545 return ctx_LineSpacings_Get_Nconds(ctx);
1546 }
1547 ILineSpacings& Nconds(int32_t value) // setter
1548 {
1549 APIUtil::ErrorChecker error_checker(api_util);
1550 ctx_LineSpacings_Set_Nconds(ctx, value);
1551 return *this;
1552 }
1553
1554 int32_t Units() // getter
1555 {
1556 APIUtil::ErrorChecker error_checker(api_util);
1557 return ctx_LineSpacings_Get_Units(ctx);
1558 }
1559 ILineSpacings& Units(int32_t value) // setter
1560 {
1561 APIUtil::ErrorChecker error_checker(api_util);
1562 ctx_LineSpacings_Set_Units(ctx, value);
1563 return *this;
1564 }
1565
1569 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1570 VectorT Xcoords() // getter
1571 {
1572 APIUtil::ErrorChecker error_checker(api_util);
1573 ctx_LineSpacings_Get_Xcoords_GR(ctx);
1574 return api_util->get_float64_gr_array<VectorT>();
1575 }
1576 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1577 ILineSpacings& Xcoords(const VectorT &value) // setter
1578 {
1579 APIUtil::ErrorChecker error_checker(api_util);
1580 ctx_LineSpacings_Set_Xcoords(ctx, &value[0], value.size());
1581 return *this;
1582 }
1583
1587 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1588 VectorT Ycoords() // getter
1589 {
1590 APIUtil::ErrorChecker error_checker(api_util);
1591 ctx_LineSpacings_Get_Ycoords_GR(ctx);
1592 return api_util->get_float64_gr_array<VectorT>();
1593 }
1594 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1595 ILineSpacings& Ycoords(const VectorT &value) // setter
1596 {
1597 APIUtil::ErrorChecker error_checker(api_util);
1598 ctx_LineSpacings_Set_Ycoords(ctx, &value[0], value.size());
1599 return *this;
1600 }
1601 };
1602
1604 {
1605 public:
1606
1607 ILoadShapes(dss::APIUtil *util) :
1608 ContextState(util)
1609 {
1610 }
1611
1615 strings AllNames() // getter
1616 {
1617 APIUtil::ErrorChecker error_checker(api_util);
1618 return api_util->get_string_array(ctx_LoadShapes_Get_AllNames);
1619 }
1620
1624 int32_t Count() // getter
1625 {
1626 APIUtil::ErrorChecker error_checker(api_util);
1627 return ctx_LoadShapes_Get_Count(ctx);
1628 }
1629
1633 int32_t First() // getter
1634 {
1635 APIUtil::ErrorChecker error_checker(api_util);
1636 return ctx_LoadShapes_Get_First(ctx);
1637 }
1638
1642 string Name() // getter
1643 {
1644 APIUtil::ErrorChecker error_checker(api_util);
1645 return ctx_LoadShapes_Get_Name(ctx);
1646 }
1647
1651 ILoadShapes& Name(const char *value)
1652 {
1653 APIUtil::ErrorChecker error_checker(api_util);
1654 ctx_LoadShapes_Set_Name(ctx, value);
1655 return *this;
1656 }
1657 ILoadShapes& Name(const string &value)
1658 {
1659 return Name(value.c_str());
1660 }
1661
1665 int32_t Next() // getter
1666 {
1667 APIUtil::ErrorChecker error_checker(api_util);
1668 return ctx_LoadShapes_Get_Next(ctx);
1669 }
1670
1674 int32_t idx() // getter
1675 {
1676 APIUtil::ErrorChecker error_checker(api_util);
1677 return ctx_LoadShapes_Get_idx(ctx);
1678 }
1679
1683 void idx(int32_t value) // setter
1684 {
1685 APIUtil::ErrorChecker error_checker(api_util);
1686 ctx_LoadShapes_Set_idx(ctx, value);
1687 }
1688 int32_t New(const char *Name)
1689 {
1690 APIUtil::ErrorChecker error_checker(api_util);
1691 return ctx_LoadShapes_New(ctx, Name);
1692 }
1693 int32_t New(const string &Name)
1694 {
1695 APIUtil::ErrorChecker error_checker(api_util);
1696 return ctx_LoadShapes_New(ctx, Name.c_str());
1697 }
1698 void Normalize()
1699 {
1700 APIUtil::ErrorChecker error_checker(api_util);
1701 ctx_LoadShapes_Normalize(ctx);
1702 }
1703
1707 double HrInterval() // getter
1708 {
1709 APIUtil::ErrorChecker error_checker(api_util);
1710 return ctx_LoadShapes_Get_HrInterval(ctx);
1711 }
1712 ILoadShapes& HrInterval(double value) // setter
1713 {
1714 APIUtil::ErrorChecker error_checker(api_util);
1715 ctx_LoadShapes_Set_HrInterval(ctx, value);
1716 return *this;
1717 }
1718
1722 double MinInterval() // getter
1723 {
1724 APIUtil::ErrorChecker error_checker(api_util);
1725 return ctx_LoadShapes_Get_MinInterval(ctx);
1726 }
1727 ILoadShapes& MinInterval(double value) // setter
1728 {
1729 APIUtil::ErrorChecker error_checker(api_util);
1730 ctx_LoadShapes_Set_MinInterval(ctx, value);
1731 return *this;
1732 }
1733
1737 int32_t Npts() // getter
1738 {
1739 APIUtil::ErrorChecker error_checker(api_util);
1740 return ctx_LoadShapes_Get_Npts(ctx);
1741 }
1742 ILoadShapes& Npts(int32_t value) // setter
1743 {
1744 APIUtil::ErrorChecker error_checker(api_util);
1745 ctx_LoadShapes_Set_Npts(ctx, value);
1746 return *this;
1747 }
1748
1749 double PBase() // getter
1750 {
1751 APIUtil::ErrorChecker error_checker(api_util);
1752 return ctx_LoadShapes_Get_PBase(ctx);
1753 }
1754 ILoadShapes& PBase(double value) // setter
1755 {
1756 APIUtil::ErrorChecker error_checker(api_util);
1757 ctx_LoadShapes_Set_PBase(ctx, value);
1758 return *this;
1759 }
1760
1764 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1765 VectorT Pmult() // getter
1766 {
1767 APIUtil::ErrorChecker error_checker(api_util);
1768 ctx_LoadShapes_Get_Pmult_GR(ctx);
1769 return api_util->get_float64_gr_array<VectorT>();
1770 }
1771 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1772 ILoadShapes& Pmult(const VectorT &value) // setter
1773 {
1774 APIUtil::ErrorChecker error_checker(api_util);
1775 ctx_LoadShapes_Set_Pmult(ctx, &value[0], value.size());
1776 return *this;
1777 }
1778
1782 double QBase() // getter
1783 {
1784 APIUtil::ErrorChecker error_checker(api_util);
1785 return ctx_LoadShapes_Get_Qbase(ctx);
1786 }
1787 ILoadShapes& QBase(double value) // setter
1788 {
1789 APIUtil::ErrorChecker error_checker(api_util);
1790 ctx_LoadShapes_Set_Qbase(ctx, value);
1791 return *this;
1792 }
1793
1797 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1798 VectorT Qmult() // getter
1799 {
1800 APIUtil::ErrorChecker error_checker(api_util);
1801 ctx_LoadShapes_Get_Qmult_GR(ctx);
1802 return api_util->get_float64_gr_array<VectorT>();
1803 }
1804 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1805 ILoadShapes& Qmult(const VectorT &value) // setter
1806 {
1807 APIUtil::ErrorChecker error_checker(api_util);
1808 ctx_LoadShapes_Set_Qmult(ctx, &value[0], value.size());
1809 return *this;
1810 }
1811
1815 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1816 VectorT TimeArray() // getter
1817 {
1818 APIUtil::ErrorChecker error_checker(api_util);
1819 ctx_LoadShapes_Get_TimeArray_GR(ctx);
1820 return api_util->get_float64_gr_array<VectorT>();
1821 }
1822 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
1823 ILoadShapes& TimeArray(const VectorT &value) // setter
1824 {
1825 APIUtil::ErrorChecker error_checker(api_util);
1826 ctx_LoadShapes_Set_TimeArray(ctx, &value[0], value.size());
1827 return *this;
1828 }
1829
1833 bool UseActual() // getter
1834 {
1835 APIUtil::ErrorChecker error_checker(api_util);
1836 return (ctx_LoadShapes_Get_UseActual(ctx) != 0);
1837 }
1838 ILoadShapes& UseActual(bool value) // setter
1839 {
1840 APIUtil::ErrorChecker error_checker(api_util);
1841 ctx_LoadShapes_Set_UseActual(ctx, value);
1842 return *this;
1843 }
1844
1845 double sInterval() // getter
1846 {
1847 APIUtil::ErrorChecker error_checker(api_util);
1848 return ctx_LoadShapes_Get_SInterval(ctx);
1849 }
1850 ILoadShapes& sInterval(double value) // setter
1851 {
1852 APIUtil::ErrorChecker error_checker(api_util);
1853 ctx_LoadShapes_Set_SInterval(ctx, value);
1854 return *this;
1855 }
1863 {
1864 APIUtil::ErrorChecker error_checker(api_util);
1865 ctx_LoadShapes_UseFloat32(ctx);
1866 }
1874 {
1875 APIUtil::ErrorChecker error_checker(api_util);
1876 ctx_LoadShapes_UseFloat64(ctx);
1877 }
1878 };
1879
1881 {
1882 public:
1883
1884 IMonitors(dss::APIUtil *util) :
1885 ContextState(util)
1886 {
1887 }
1888
1889 // TODO: Implement AsMatrix someday
1890
1894 template <typename VectorT=Eigen::VectorXd>
1895 VectorT Channel(int32_t Index)
1896 {
1897 //TODO: use the better implementation
1898 ctx_Monitors_Get_Channel_GR(ctx, Index);
1899 return api_util->get_float64_gr_array<VectorT>();
1900 }
1901
1905 strings AllNames() // getter
1906 {
1907 APIUtil::ErrorChecker error_checker(api_util);
1908 return api_util->get_string_array(ctx_Monitors_Get_AllNames);
1909 }
1910
1914 int32_t Count() // getter
1915 {
1916 APIUtil::ErrorChecker error_checker(api_util);
1917 return ctx_Monitors_Get_Count(ctx);
1918 }
1919
1923 int32_t First() // getter
1924 {
1925 APIUtil::ErrorChecker error_checker(api_util);
1926 return ctx_Monitors_Get_First(ctx);
1927 }
1928
1932 string Name() // getter
1933 {
1934 APIUtil::ErrorChecker error_checker(api_util);
1935 return ctx_Monitors_Get_Name(ctx);
1936 }
1937
1941 IMonitors& Name(const char *value)
1942 {
1943 APIUtil::ErrorChecker error_checker(api_util);
1944 ctx_Monitors_Set_Name(ctx, value);
1945 return *this;
1946 }
1947 IMonitors& Name(const string &value)
1948 {
1949 return Name(value.c_str());
1950 }
1951
1955 int32_t Next() // getter
1956 {
1957 APIUtil::ErrorChecker error_checker(api_util);
1958 return ctx_Monitors_Get_Next(ctx);
1959 }
1960
1964 int32_t idx() // getter
1965 {
1966 APIUtil::ErrorChecker error_checker(api_util);
1967 return ctx_Monitors_Get_idx(ctx);
1968 }
1969
1973 void idx(int32_t value) // setter
1974 {
1975 APIUtil::ErrorChecker error_checker(api_util);
1976 ctx_Monitors_Set_idx(ctx, value);
1977 }
1978 void Process()
1979 {
1980 APIUtil::ErrorChecker error_checker(api_util);
1981 ctx_Monitors_Process(ctx);
1982 }
1983 void ProcessAll()
1984 {
1985 APIUtil::ErrorChecker error_checker(api_util);
1986 ctx_Monitors_ProcessAll(ctx);
1987 }
1988 void Reset()
1989 {
1990 APIUtil::ErrorChecker error_checker(api_util);
1991 ctx_Monitors_Reset(ctx);
1992 }
1993 void ResetAll()
1994 {
1995 APIUtil::ErrorChecker error_checker(api_util);
1996 ctx_Monitors_ResetAll(ctx);
1997 }
1998 void Sample()
1999 {
2000 APIUtil::ErrorChecker error_checker(api_util);
2001 ctx_Monitors_Sample(ctx);
2002 }
2003 void SampleAll()
2004 {
2005 APIUtil::ErrorChecker error_checker(api_util);
2006 ctx_Monitors_SampleAll(ctx);
2007 }
2008 void Save()
2009 {
2010 APIUtil::ErrorChecker error_checker(api_util);
2011 ctx_Monitors_Save(ctx);
2012 }
2013 void SaveAll()
2014 {
2015 APIUtil::ErrorChecker error_checker(api_util);
2016 ctx_Monitors_SaveAll(ctx);
2017 }
2018 void Show()
2019 {
2020 APIUtil::ErrorChecker error_checker(api_util);
2021 ctx_Monitors_Show(ctx);
2022 }
2023
2027 template <typename VectorT=Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
2028 VectorT ByteStream() // getter
2029 {
2030 APIUtil::ErrorChecker error_checker(api_util);
2031 ctx_Monitors_Get_ByteStream_GR(ctx);
2032 return api_util->get_int8_gr_array<VectorT>();
2033 }
2034
2038 string Element() // getter
2039 {
2040 APIUtil::ErrorChecker error_checker(api_util);
2041 return ctx_Monitors_Get_Element(ctx);
2042 }
2043 IMonitors& Element(const char *value) // setter
2044 {
2045 APIUtil::ErrorChecker error_checker(api_util);
2046 ctx_Monitors_Set_Element(ctx, value);
2047 return *this;
2048 }
2049 IMonitors& Element(const string &value) // setter
2050 {
2051 APIUtil::ErrorChecker error_checker(api_util);
2052 ctx_Monitors_Set_Element(ctx, value.c_str());
2053 return *this;
2054 }
2055
2059 string FileName() // getter
2060 {
2061 APIUtil::ErrorChecker error_checker(api_util);
2062 return ctx_Monitors_Get_FileName(ctx);
2063 }
2064
2068 int32_t FileVersion() // getter
2069 {
2070 APIUtil::ErrorChecker error_checker(api_util);
2071 return ctx_Monitors_Get_FileVersion(ctx);
2072 }
2073
2077 strings Header() // getter
2078 {
2079 APIUtil::ErrorChecker error_checker(api_util);
2080 return api_util->get_string_array(ctx_Monitors_Get_Header);
2081 }
2082
2086 int32_t Mode() // getter
2087 {
2088 APIUtil::ErrorChecker error_checker(api_util);
2089 return ctx_Monitors_Get_Mode(ctx);
2090 }
2091 IMonitors& Mode(int32_t value) // setter
2092 {
2093 APIUtil::ErrorChecker error_checker(api_util);
2094 ctx_Monitors_Set_Mode(ctx, value);
2095 return *this;
2096 }
2097
2101 int32_t NumChannels() // getter
2102 {
2103 APIUtil::ErrorChecker error_checker(api_util);
2104 return ctx_Monitors_Get_NumChannels(ctx);
2105 }
2106
2110 int32_t RecordSize() // getter
2111 {
2112 APIUtil::ErrorChecker error_checker(api_util);
2113 return ctx_Monitors_Get_RecordSize(ctx);
2114 }
2115
2119 int32_t SampleCount() // getter
2120 {
2121 APIUtil::ErrorChecker error_checker(api_util);
2122 return ctx_Monitors_Get_SampleCount(ctx);
2123 }
2124
2128 int32_t Terminal() // getter
2129 {
2130 APIUtil::ErrorChecker error_checker(api_util);
2131 return ctx_Monitors_Get_Terminal(ctx);
2132 }
2133 IMonitors& Terminal(int32_t value) // setter
2134 {
2135 APIUtil::ErrorChecker error_checker(api_util);
2136 ctx_Monitors_Set_Terminal(ctx, value);
2137 return *this;
2138 }
2139
2143 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2144 VectorT dblFreq() // getter
2145 {
2146 APIUtil::ErrorChecker error_checker(api_util);
2147 ctx_Monitors_Get_dblFreq_GR(ctx);
2148 return api_util->get_float64_gr_array<VectorT>();
2149 }
2150
2154 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2155 VectorT dblHour() // getter
2156 {
2157 APIUtil::ErrorChecker error_checker(api_util);
2158 ctx_Monitors_Get_dblHour_GR(ctx);
2159 return api_util->get_float64_gr_array<VectorT>();
2160 }
2161 };
2162
2163 class IParser: public ContextState
2164 {
2165 public:
2166
2167 IParser(dss::APIUtil *util) :
2168 ContextState(util)
2169 {
2170 }
2174 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2175 VectorT Matrix(int32_t ExpectedOrder)
2176 {
2177 APIUtil::ErrorChecker error_checker(api_util);
2178 ctx_Parser_Get_Matrix_GR(ctx, ExpectedOrder);
2179 return api_util->get_float64_gr_array<VectorT>();
2180 }
2184 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2185 VectorT SymMatrix(int32_t ExpectedOrder)
2186 {
2187 APIUtil::ErrorChecker error_checker(api_util);
2188 ctx_Parser_Get_SymMatrix_GR(ctx, ExpectedOrder);
2189 return api_util->get_float64_gr_array<VectorT>();
2190 }
2194 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2195 VectorT Vector(int32_t ExpectedSize)
2196 {
2197 APIUtil::ErrorChecker error_checker(api_util);
2198 ctx_Parser_Get_Vector_GR(ctx, ExpectedSize);
2199 return api_util->get_float64_gr_array<VectorT>();
2200 }
2201 void ResetDelimiters()
2202 {
2203 APIUtil::ErrorChecker error_checker(api_util);
2204 ctx_Parser_ResetDelimiters(ctx);
2205 }
2206
2210 bool AutoIncrement() // getter
2211 {
2212 APIUtil::ErrorChecker error_checker(api_util);
2213 return (ctx_Parser_Get_AutoIncrement(ctx) != 0);
2214 }
2215 IParser& AutoIncrement(bool value) // setter
2216 {
2217 APIUtil::ErrorChecker error_checker(api_util);
2218 ctx_Parser_Set_AutoIncrement(ctx, value);
2219 return *this;
2220 }
2221
2225 string BeginQuote() // getter
2226 {
2227 APIUtil::ErrorChecker error_checker(api_util);
2228 return ctx_Parser_Get_BeginQuote(ctx);
2229 }
2230 IParser& BeginQuote(const char *value) // setter
2231 {
2232 APIUtil::ErrorChecker error_checker(api_util);
2233 ctx_Parser_Set_BeginQuote(ctx, value);
2234 return *this;
2235 }
2236 IParser& BeginQuote(const string &value) // setter
2237 {
2238 APIUtil::ErrorChecker error_checker(api_util);
2239 ctx_Parser_Set_BeginQuote(ctx, value.c_str());
2240 return *this;
2241 }
2242
2246 string CmdString() // getter
2247 {
2248 APIUtil::ErrorChecker error_checker(api_util);
2249 return ctx_Parser_Get_CmdString(ctx);
2250 }
2251 IParser& CmdString(const char *value) // setter
2252 {
2253 APIUtil::ErrorChecker error_checker(api_util);
2254 ctx_Parser_Set_CmdString(ctx, value);
2255 return *this;
2256 }
2257 IParser& CmdString(const string &value) // setter
2258 {
2259 APIUtil::ErrorChecker error_checker(api_util);
2260 ctx_Parser_Set_CmdString(ctx, value.c_str());
2261 return *this;
2262 }
2263
2267 double DblValue() // getter
2268 {
2269 APIUtil::ErrorChecker error_checker(api_util);
2270 return ctx_Parser_Get_DblValue(ctx);
2271 }
2272
2276 string Delimiters() // getter
2277 {
2278 APIUtil::ErrorChecker error_checker(api_util);
2279 return ctx_Parser_Get_Delimiters(ctx);
2280 }
2281 IParser& Delimiters(const char *value) // setter
2282 {
2283 APIUtil::ErrorChecker error_checker(api_util);
2284 ctx_Parser_Set_Delimiters(ctx, value);
2285 return *this;
2286 }
2287 IParser& Delimiters(const string &value) // setter
2288 {
2289 APIUtil::ErrorChecker error_checker(api_util);
2290 ctx_Parser_Set_Delimiters(ctx, value.c_str());
2291 return *this;
2292 }
2293
2297 string EndQuote() // getter
2298 {
2299 APIUtil::ErrorChecker error_checker(api_util);
2300 return ctx_Parser_Get_EndQuote(ctx);
2301 }
2302 IParser& EndQuote(const char *value) // setter
2303 {
2304 APIUtil::ErrorChecker error_checker(api_util);
2305 ctx_Parser_Set_EndQuote(ctx, value);
2306 return *this;
2307 }
2308 IParser& EndQuote(const string &value) // setter
2309 {
2310 APIUtil::ErrorChecker error_checker(api_util);
2311 ctx_Parser_Set_EndQuote(ctx, value.c_str());
2312 return *this;
2313 }
2314
2318 int32_t IntValue() // getter
2319 {
2320 APIUtil::ErrorChecker error_checker(api_util);
2321 return ctx_Parser_Get_IntValue(ctx);
2322 }
2323
2327 string NextParam() // getter
2328 {
2329 APIUtil::ErrorChecker error_checker(api_util);
2330 return ctx_Parser_Get_NextParam(ctx);
2331 }
2332
2336 string StrValue() // getter
2337 {
2338 APIUtil::ErrorChecker error_checker(api_util);
2339 return ctx_Parser_Get_StrValue(ctx);
2340 }
2341
2346 string WhiteSpace() // getter
2347 {
2348 APIUtil::ErrorChecker error_checker(api_util);
2349 return ctx_Parser_Get_WhiteSpace(ctx);
2350 }
2351 IParser& WhiteSpace(const char *value) // setter
2352 {
2353 APIUtil::ErrorChecker error_checker(api_util);
2354 ctx_Parser_Set_WhiteSpace(ctx, value);
2355 return *this;
2356 }
2357 IParser& WhiteSpace(const string &value) // setter
2358 {
2359 APIUtil::ErrorChecker error_checker(api_util);
2360 ctx_Parser_Set_WhiteSpace(ctx, value.c_str());
2361 return *this;
2362 }
2363 };
2364
2366 {
2367 public:
2368
2369 IReduceCkt(dss::APIUtil *util) :
2370 ContextState(util)
2371 {
2372 }
2373
2377 double Zmag() // getter
2378 {
2379 APIUtil::ErrorChecker error_checker(api_util);
2380 return ctx_ReduceCkt_Get_Zmag(ctx);
2381 }
2382 IReduceCkt& Zmag(double value) // setter
2383 {
2384 APIUtil::ErrorChecker error_checker(api_util);
2385 ctx_ReduceCkt_Set_Zmag(ctx, value);
2386 return *this;
2387 }
2388
2392 bool KeepLoad() // getter
2393 {
2394 APIUtil::ErrorChecker error_checker(api_util);
2395 return (ctx_ReduceCkt_Get_KeepLoad(ctx) != 0);
2396 }
2397 IReduceCkt& KeepLoad(bool value) // setter
2398 {
2399 APIUtil::ErrorChecker error_checker(api_util);
2400 ctx_ReduceCkt_Set_KeepLoad(ctx, value);
2401 return *this;
2402 }
2403
2407 string EditString() // getter
2408 {
2409 APIUtil::ErrorChecker error_checker(api_util);
2410 return ctx_ReduceCkt_Get_EditString(ctx);
2411 }
2412 IReduceCkt& EditString(const char *value) // setter
2413 {
2414 APIUtil::ErrorChecker error_checker(api_util);
2415 ctx_ReduceCkt_Set_EditString(ctx, value);
2416 return *this;
2417 }
2418 IReduceCkt& EditString(const string &value) // setter
2419 {
2420 APIUtil::ErrorChecker error_checker(api_util);
2421 ctx_ReduceCkt_Set_EditString(ctx, value.c_str());
2422 return *this;
2423 }
2424
2428 string StartPDElement() // getter
2429 {
2430 APIUtil::ErrorChecker error_checker(api_util);
2431 return ctx_ReduceCkt_Get_StartPDElement(ctx);
2432 }
2433 IReduceCkt& StartPDElement(const char *value) // setter
2434 {
2435 APIUtil::ErrorChecker error_checker(api_util);
2436 ctx_ReduceCkt_Set_StartPDElement(ctx, value);
2437 return *this;
2438 }
2439 IReduceCkt& StartPDElement(const string &value) // setter
2440 {
2441 APIUtil::ErrorChecker error_checker(api_util);
2442 ctx_ReduceCkt_Set_StartPDElement(ctx, value.c_str());
2443 return *this;
2444 }
2445
2449 string EnergyMeter() // getter
2450 {
2451 APIUtil::ErrorChecker error_checker(api_util);
2452 return ctx_ReduceCkt_Get_EnergyMeter(ctx);
2453 }
2454 IReduceCkt& EnergyMeter(const char *value) // setter
2455 {
2456 APIUtil::ErrorChecker error_checker(api_util);
2457 ctx_ReduceCkt_Set_EnergyMeter(ctx, value);
2458 return *this;
2459 }
2460 IReduceCkt& EnergyMeter(const string &value) // setter
2461 {
2462 APIUtil::ErrorChecker error_checker(api_util);
2463 ctx_ReduceCkt_Set_EnergyMeter(ctx, value.c_str());
2464 return *this;
2465 }
2470 void SaveCircuit(const char *CktName)
2471 {
2472 APIUtil::ErrorChecker error_checker(api_util);
2473 ctx_ReduceCkt_SaveCircuit(ctx, CktName);
2474 }
2479 void SaveCircuit(const string &CktName)
2480 {
2481 APIUtil::ErrorChecker error_checker(api_util);
2482 ctx_ReduceCkt_SaveCircuit(ctx, CktName.c_str());
2483 }
2488 {
2489 APIUtil::ErrorChecker error_checker(api_util);
2490 ctx_ReduceCkt_DoDefault(ctx);
2491 }
2496 {
2497 APIUtil::ErrorChecker error_checker(api_util);
2498 ctx_ReduceCkt_DoShortLines(ctx);
2499 }
2504 {
2505 APIUtil::ErrorChecker error_checker(api_util);
2506 ctx_ReduceCkt_DoDangling(ctx);
2507 }
2508 void DoLoopBreak()
2509 {
2510 APIUtil::ErrorChecker error_checker(api_util);
2511 ctx_ReduceCkt_DoLoopBreak(ctx);
2512 }
2513 void DoParallelLines()
2514 {
2515 APIUtil::ErrorChecker error_checker(api_util);
2516 ctx_ReduceCkt_DoParallelLines(ctx);
2517 }
2518 void DoSwitches()
2519 {
2520 APIUtil::ErrorChecker error_checker(api_util);
2521 ctx_ReduceCkt_DoSwitches(ctx);
2522 }
2523 void Do1phLaterals()
2524 {
2525 APIUtil::ErrorChecker error_checker(api_util);
2526 ctx_ReduceCkt_Do1phLaterals(ctx);
2527 }
2528 void DoBranchRemove()
2529 {
2530 APIUtil::ErrorChecker error_checker(api_util);
2531 ctx_ReduceCkt_DoBranchRemove(ctx);
2532 }
2533 };
2534
2536 {
2537 public:
2538
2539 IYMatrix(dss::APIUtil *util) :
2540 ContextState(util)
2541 {
2542 }
2543 void ZeroInjCurr()
2544 {
2545 APIUtil::ErrorChecker error_checker(api_util);
2546 ctx_YMatrix_ZeroInjCurr(ctx);
2547 }
2548 void GetSourceInjCurrents()
2549 {
2550 APIUtil::ErrorChecker error_checker(api_util);
2551 ctx_YMatrix_GetSourceInjCurrents(ctx);
2552 }
2553 void GetPCInjCurr()
2554 {
2555 APIUtil::ErrorChecker error_checker(api_util);
2556 ctx_YMatrix_GetPCInjCurr(ctx);
2557 }
2558 void BuildYMatrixD(int32_t BuildOps, int32_t AllocateVI)
2559 {
2560 APIUtil::ErrorChecker error_checker(api_util);
2561 ctx_YMatrix_BuildYMatrixD(ctx, BuildOps, AllocateVI);
2562 }
2563 void AddInAuxCurrents(int32_t SType)
2564 {
2565 APIUtil::ErrorChecker error_checker(api_util);
2566 ctx_YMatrix_AddInAuxCurrents(ctx, SType);
2567 }
2568
2569 bool SystemYChanged() // getter
2570 {
2571 APIUtil::ErrorChecker error_checker(api_util);
2572 return (ctx_YMatrix_Get_SystemYChanged(ctx) != 0);
2573 }
2574 IYMatrix& SystemYChanged(bool value) // setter
2575 {
2576 APIUtil::ErrorChecker error_checker(api_util);
2577 ctx_YMatrix_Set_SystemYChanged(ctx, value);
2578 return *this;
2579 }
2580
2581 bool UseAuxCurrents() // getter
2582 {
2583 APIUtil::ErrorChecker error_checker(api_util);
2584 return (ctx_YMatrix_Get_UseAuxCurrents(ctx) != 0);
2585 }
2586 IYMatrix& UseAuxCurrents(bool value) // setter
2587 {
2588 APIUtil::ErrorChecker error_checker(api_util);
2589 ctx_YMatrix_Set_UseAuxCurrents(ctx, value);
2590 return *this;
2591 }
2592
2596 uint64_t SolverOptions() // getter
2597 {
2598 APIUtil::ErrorChecker error_checker(api_util);
2599 return ctx_YMatrix_Get_SolverOptions(ctx);
2600 }
2601 IYMatrix& SolverOptions(uint64_t value) // setter
2602 {
2603 APIUtil::ErrorChecker error_checker(api_util);
2604 ctx_YMatrix_Set_SolverOptions(ctx, value);
2605 return *this;
2606 }
2607 bool CheckConvergence()
2608 {
2609 APIUtil::ErrorChecker error_checker(api_util);
2610 return (ctx_YMatrix_CheckConvergence(ctx) != 0);
2611 }
2612 void SetGeneratordQdV()
2613 {
2614 APIUtil::ErrorChecker error_checker(api_util);
2615 ctx_YMatrix_SetGeneratordQdV(ctx);
2616 }
2617
2618 bool LoadsNeedUpdating() // getter
2619 {
2620 APIUtil::ErrorChecker error_checker(api_util);
2621 return (ctx_YMatrix_Get_LoadsNeedUpdating(ctx) != 0);
2622 }
2623 IYMatrix& LoadsNeedUpdating(bool value) // setter
2624 {
2625 APIUtil::ErrorChecker error_checker(api_util);
2626 ctx_YMatrix_Set_LoadsNeedUpdating(ctx, value);
2627 return *this;
2628 }
2629
2630 bool SolutionInitialized() // getter
2631 {
2632 APIUtil::ErrorChecker error_checker(api_util);
2633 return (ctx_YMatrix_Get_SolutionInitialized(ctx) != 0);
2634 }
2635 IYMatrix& SolutionInitialized(bool value) // setter
2636 {
2637 APIUtil::ErrorChecker error_checker(api_util);
2638 ctx_YMatrix_Set_SolutionInitialized(ctx, value);
2639 return *this;
2640 }
2641
2642 int32_t Iteration() // getter
2643 {
2644 APIUtil::ErrorChecker error_checker(api_util);
2645 return ctx_YMatrix_Get_Iteration(ctx);
2646 }
2647 IYMatrix& Iteration(int32_t value) // setter
2648 {
2649 APIUtil::ErrorChecker error_checker(api_util);
2650 ctx_YMatrix_Set_Iteration(ctx, value);
2651 return *this;
2652 }
2653 };
2654
2655 class IMeters: public ContextState
2656 {
2657 public:
2658
2659 IMeters(dss::APIUtil *util) :
2660 ContextState(util)
2661 {
2662 }
2663
2667 strings ZonePCE() // getter
2668 {
2669 APIUtil::ErrorChecker error_checker(api_util);
2670 return api_util->get_string_array(ctx_Meters_Get_ZonePCE);
2671 }
2672
2676 strings AllNames() // getter
2677 {
2678 APIUtil::ErrorChecker error_checker(api_util);
2679 return api_util->get_string_array(ctx_Meters_Get_AllNames);
2680 }
2681
2685 int32_t Count() // getter
2686 {
2687 APIUtil::ErrorChecker error_checker(api_util);
2688 return ctx_Meters_Get_Count(ctx);
2689 }
2690
2694 int32_t First() // getter
2695 {
2696 APIUtil::ErrorChecker error_checker(api_util);
2697 return ctx_Meters_Get_First(ctx);
2698 }
2699
2703 string Name() // getter
2704 {
2705 APIUtil::ErrorChecker error_checker(api_util);
2706 return ctx_Meters_Get_Name(ctx);
2707 }
2708
2712 IMeters& Name(const char *value)
2713 {
2714 APIUtil::ErrorChecker error_checker(api_util);
2715 ctx_Meters_Set_Name(ctx, value);
2716 return *this;
2717 }
2718 IMeters& Name(const string &value)
2719 {
2720 return Name(value.c_str());
2721 }
2722
2726 int32_t Next() // getter
2727 {
2728 APIUtil::ErrorChecker error_checker(api_util);
2729 return ctx_Meters_Get_Next(ctx);
2730 }
2731
2735 int32_t idx() // getter
2736 {
2737 APIUtil::ErrorChecker error_checker(api_util);
2738 return ctx_Meters_Get_idx(ctx);
2739 }
2740
2744 void idx(int32_t value) // setter
2745 {
2746 APIUtil::ErrorChecker error_checker(api_util);
2747 ctx_Meters_Set_idx(ctx, value);
2748 }
2749 void CloseAllDIFiles()
2750 {
2751 APIUtil::ErrorChecker error_checker(api_util);
2752 ctx_Meters_CloseAllDIFiles(ctx);
2753 }
2754 void DoReliabilityCalc(bool AssumeRestoration)
2755 {
2756 APIUtil::ErrorChecker error_checker(api_util);
2757 ctx_Meters_DoReliabilityCalc(ctx, AssumeRestoration);
2758 }
2759 void OpenAllDIFiles()
2760 {
2761 APIUtil::ErrorChecker error_checker(api_util);
2762 ctx_Meters_OpenAllDIFiles(ctx);
2763 }
2764 void Reset()
2765 {
2766 APIUtil::ErrorChecker error_checker(api_util);
2767 ctx_Meters_Reset(ctx);
2768 }
2769 void ResetAll()
2770 {
2771 APIUtil::ErrorChecker error_checker(api_util);
2772 ctx_Meters_ResetAll(ctx);
2773 }
2774 void Sample()
2775 {
2776 APIUtil::ErrorChecker error_checker(api_util);
2777 ctx_Meters_Sample(ctx);
2778 }
2779 void SampleAll()
2780 {
2781 APIUtil::ErrorChecker error_checker(api_util);
2782 ctx_Meters_SampleAll(ctx);
2783 }
2784 void Save()
2785 {
2786 APIUtil::ErrorChecker error_checker(api_util);
2787 ctx_Meters_Save(ctx);
2788 }
2789 void SaveAll()
2790 {
2791 APIUtil::ErrorChecker error_checker(api_util);
2792 ctx_Meters_SaveAll(ctx);
2793 }
2794 void SetActiveSection(int32_t SectIdx)
2795 {
2796 APIUtil::ErrorChecker error_checker(api_util);
2797 ctx_Meters_SetActiveSection(ctx, SectIdx);
2798 }
2799
2803 strings AllBranchesInZone() // getter
2804 {
2805 APIUtil::ErrorChecker error_checker(api_util);
2806 return api_util->get_string_array(ctx_Meters_Get_AllBranchesInZone);
2807 }
2808
2812 strings AllEndElements() // getter
2813 {
2814 APIUtil::ErrorChecker error_checker(api_util);
2815 return api_util->get_string_array(ctx_Meters_Get_AllEndElements);
2816 }
2817
2821 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2822 VectorT AllocFactors() // getter
2823 {
2824 APIUtil::ErrorChecker error_checker(api_util);
2825 ctx_Meters_Get_AllocFactors_GR(ctx);
2826 return api_util->get_float64_gr_array<VectorT>();
2827 }
2828 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2829 IMeters& AllocFactors(const VectorT &value) // setter
2830 {
2831 APIUtil::ErrorChecker error_checker(api_util);
2832 ctx_Meters_Set_AllocFactors(ctx, &value[0], value.size());
2833 return *this;
2834 }
2835
2839 double AvgRepairTime() // getter
2840 {
2841 APIUtil::ErrorChecker error_checker(api_util);
2842 return ctx_Meters_Get_AvgRepairTime(ctx);
2843 }
2844
2848 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2849 VectorT CalcCurrent() // getter
2850 {
2851 APIUtil::ErrorChecker error_checker(api_util);
2852 ctx_Meters_Get_CalcCurrent_GR(ctx);
2853 return api_util->get_float64_gr_array<VectorT>();
2854 }
2855 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2856 IMeters& CalcCurrent(const VectorT &value) // setter
2857 {
2858 APIUtil::ErrorChecker error_checker(api_util);
2859 ctx_Meters_Set_CalcCurrent(ctx, &value[0], value.size());
2860 return *this;
2861 }
2862
2866 int32_t CountBranches() // getter
2867 {
2868 APIUtil::ErrorChecker error_checker(api_util);
2869 return ctx_Meters_Get_CountBranches(ctx);
2870 }
2871
2875 int32_t CountEndElements() // getter
2876 {
2877 APIUtil::ErrorChecker error_checker(api_util);
2878 return ctx_Meters_Get_CountEndElements(ctx);
2879 }
2880
2884 double CustInterrupts() // getter
2885 {
2886 APIUtil::ErrorChecker error_checker(api_util);
2887 return ctx_Meters_Get_CustInterrupts(ctx);
2888 }
2889
2893 bool DIFilesAreOpen() // getter
2894 {
2895 APIUtil::ErrorChecker error_checker(api_util);
2896 return (ctx_Meters_Get_DIFilesAreOpen(ctx) != 0);
2897 }
2898
2902 double FaultRateXRepairHrs() // getter
2903 {
2904 APIUtil::ErrorChecker error_checker(api_util);
2905 return ctx_Meters_Get_FaultRateXRepairHrs(ctx);
2906 }
2907
2911 string MeteredElement() // getter
2912 {
2913 APIUtil::ErrorChecker error_checker(api_util);
2914 return ctx_Meters_Get_MeteredElement(ctx);
2915 }
2916 IMeters& MeteredElement(const char *value) // setter
2917 {
2918 APIUtil::ErrorChecker error_checker(api_util);
2919 ctx_Meters_Set_MeteredElement(ctx, value);
2920 return *this;
2921 }
2922 IMeters& MeteredElement(const string &value) // setter
2923 {
2924 APIUtil::ErrorChecker error_checker(api_util);
2925 ctx_Meters_Set_MeteredElement(ctx, value.c_str());
2926 return *this;
2927 }
2928
2932 int32_t MeteredTerminal() // getter
2933 {
2934 APIUtil::ErrorChecker error_checker(api_util);
2935 return ctx_Meters_Get_MeteredTerminal(ctx);
2936 }
2937 IMeters& MeteredTerminal(int32_t value) // setter
2938 {
2939 APIUtil::ErrorChecker error_checker(api_util);
2940 ctx_Meters_Set_MeteredTerminal(ctx, value);
2941 return *this;
2942 }
2943
2947 int32_t NumSectionBranches() // getter
2948 {
2949 APIUtil::ErrorChecker error_checker(api_util);
2950 return ctx_Meters_Get_NumSectionBranches(ctx);
2951 }
2952
2956 int32_t NumSectionCustomers() // getter
2957 {
2958 APIUtil::ErrorChecker error_checker(api_util);
2959 return ctx_Meters_Get_NumSectionCustomers(ctx);
2960 }
2961
2965 int32_t NumSections() // getter
2966 {
2967 APIUtil::ErrorChecker error_checker(api_util);
2968 return ctx_Meters_Get_NumSections(ctx);
2969 }
2970
2974 int32_t OCPDeviceType() // getter
2975 {
2976 APIUtil::ErrorChecker error_checker(api_util);
2977 return ctx_Meters_Get_OCPDeviceType(ctx);
2978 }
2979
2983 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2984 VectorT Peakcurrent() // getter
2985 {
2986 APIUtil::ErrorChecker error_checker(api_util);
2987 ctx_Meters_Get_Peakcurrent_GR(ctx);
2988 return api_util->get_float64_gr_array<VectorT>();
2989 }
2990 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
2991 IMeters& Peakcurrent(const VectorT &value) // setter
2992 {
2993 APIUtil::ErrorChecker error_checker(api_util);
2994 ctx_Meters_Set_Peakcurrent(ctx, &value[0], value.size());
2995 return *this;
2996 }
2997
3001 strings RegisterNames() // getter
3002 {
3003 APIUtil::ErrorChecker error_checker(api_util);
3004 return api_util->get_string_array(ctx_Meters_Get_RegisterNames);
3005 }
3006
3010 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3011 VectorT RegisterValues() // getter
3012 {
3013 APIUtil::ErrorChecker error_checker(api_util);
3014 ctx_Meters_Get_RegisterValues_GR(ctx);
3015 return api_util->get_float64_gr_array<VectorT>();
3016 }
3017
3021 double SAIDI() // getter
3022 {
3023 APIUtil::ErrorChecker error_checker(api_util);
3024 return ctx_Meters_Get_SAIDI(ctx);
3025 }
3026
3030 double SAIFI() // getter
3031 {
3032 APIUtil::ErrorChecker error_checker(api_util);
3033 return ctx_Meters_Get_SAIFI(ctx);
3034 }
3035
3039 double SAIFIKW() // getter
3040 {
3041 APIUtil::ErrorChecker error_checker(api_util);
3042 return ctx_Meters_Get_SAIFIKW(ctx);
3043 }
3044
3048 int32_t SectSeqIdx() // getter
3049 {
3050 APIUtil::ErrorChecker error_checker(api_util);
3051 return ctx_Meters_Get_SectSeqIdx(ctx);
3052 }
3053
3057 int32_t SectTotalCust() // getter
3058 {
3059 APIUtil::ErrorChecker error_checker(api_util);
3060 return ctx_Meters_Get_SectTotalCust(ctx);
3061 }
3062
3066 int32_t SeqListSize() // getter
3067 {
3068 APIUtil::ErrorChecker error_checker(api_util);
3069 return ctx_Meters_Get_SeqListSize(ctx);
3070 }
3071
3075 int32_t SequenceIndex() // getter
3076 {
3077 APIUtil::ErrorChecker error_checker(api_util);
3078 return ctx_Meters_Get_SequenceIndex(ctx);
3079 }
3080 IMeters& SequenceIndex(int32_t value) // setter
3081 {
3082 APIUtil::ErrorChecker error_checker(api_util);
3083 ctx_Meters_Set_SequenceIndex(ctx, value);
3084 return *this;
3085 }
3086
3090 double SumBranchFltRates() // getter
3091 {
3092 APIUtil::ErrorChecker error_checker(api_util);
3093 return ctx_Meters_Get_SumBranchFltRates(ctx);
3094 }
3095
3099 int32_t TotalCustomers() // getter
3100 {
3101 APIUtil::ErrorChecker error_checker(api_util);
3102 return ctx_Meters_Get_TotalCustomers(ctx);
3103 }
3104
3108 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3109 VectorT Totals() // getter
3110 {
3111 APIUtil::ErrorChecker error_checker(api_util);
3112 ctx_Meters_Get_Totals_GR(ctx);
3113 return api_util->get_float64_gr_array<VectorT>();
3114 }
3115
3116 };
3117
3119 {
3120 public:
3121
3122 IPDElements(dss::APIUtil *util) :
3123 ContextState(util)
3124 {
3125 }
3126
3130 double AccumulatedL() // getter
3131 {
3132 APIUtil::ErrorChecker error_checker(api_util);
3133 return ctx_PDElements_Get_AccumulatedL(ctx);
3134 }
3135
3139 int32_t Count() // getter
3140 {
3141 APIUtil::ErrorChecker error_checker(api_util);
3142 return ctx_PDElements_Get_Count(ctx);
3143 }
3144
3149 double FaultRate() // getter
3150 {
3151 APIUtil::ErrorChecker error_checker(api_util);
3152 return ctx_PDElements_Get_FaultRate(ctx);
3153 }
3154 IPDElements& FaultRate(double value) // setter
3155 {
3156 APIUtil::ErrorChecker error_checker(api_util);
3157 ctx_PDElements_Set_FaultRate(ctx, value);
3158 return *this;
3159 }
3160
3165 int32_t First() // getter
3166 {
3167 APIUtil::ErrorChecker error_checker(api_util);
3168 return ctx_PDElements_Get_First(ctx);
3169 }
3170
3175 int32_t FromTerminal() // getter
3176 {
3177 APIUtil::ErrorChecker error_checker(api_util);
3178 return ctx_PDElements_Get_FromTerminal(ctx);
3179 }
3180
3186 bool IsShunt() // getter
3187 {
3188 APIUtil::ErrorChecker error_checker(api_util);
3189 return (ctx_PDElements_Get_IsShunt(ctx) != 0);
3190 }
3191
3195 double Lambda() // getter
3196 {
3197 APIUtil::ErrorChecker error_checker(api_util);
3198 return ctx_PDElements_Get_Lambda(ctx);
3199 }
3200
3205 string Name() // getter
3206 {
3207 APIUtil::ErrorChecker error_checker(api_util);
3208 return ctx_PDElements_Get_Name(ctx);
3209 }
3210 IPDElements& Name(const char *value) // setter
3211 {
3212 APIUtil::ErrorChecker error_checker(api_util);
3213 ctx_PDElements_Set_Name(ctx, value);
3214 return *this;
3215 }
3216 IPDElements& Name(const string &value) // setter
3217 {
3218 APIUtil::ErrorChecker error_checker(api_util);
3219 ctx_PDElements_Set_Name(ctx, value.c_str());
3220 return *this;
3221 }
3222
3227 int32_t Next() // getter
3228 {
3229 APIUtil::ErrorChecker error_checker(api_util);
3230 return ctx_PDElements_Get_Next(ctx);
3231 }
3232
3236 int32_t Numcustomers() // getter
3237 {
3238 APIUtil::ErrorChecker error_checker(api_util);
3239 return ctx_PDElements_Get_Numcustomers(ctx);
3240 }
3241
3246 int32_t ParentPDElement() // getter
3247 {
3248 APIUtil::ErrorChecker error_checker(api_util);
3249 return ctx_PDElements_Get_ParentPDElement(ctx);
3250 }
3251
3255 double RepairTime() // getter
3256 {
3257 APIUtil::ErrorChecker error_checker(api_util);
3258 return ctx_PDElements_Get_RepairTime(ctx);
3259 }
3260 IPDElements& RepairTime(double value) // setter
3261 {
3262 APIUtil::ErrorChecker error_checker(api_util);
3263 ctx_PDElements_Set_RepairTime(ctx, value);
3264 return *this;
3265 }
3266
3270 int32_t SectionID() // getter
3271 {
3272 APIUtil::ErrorChecker error_checker(api_util);
3273 return ctx_PDElements_Get_SectionID(ctx);
3274 }
3275
3279 double TotalMiles() // getter
3280 {
3281 APIUtil::ErrorChecker error_checker(api_util);
3282 return ctx_PDElements_Get_TotalMiles(ctx);
3283 }
3284
3288 int32_t Totalcustomers() // getter
3289 {
3290 APIUtil::ErrorChecker error_checker(api_util);
3291 return ctx_PDElements_Get_Totalcustomers(ctx);
3292 }
3293
3297 double pctPermanent() // getter
3298 {
3299 APIUtil::ErrorChecker error_checker(api_util);
3300 return ctx_PDElements_Get_pctPermanent(ctx);
3301 }
3302 IPDElements& pctPermanent(double value) // setter
3303 {
3304 APIUtil::ErrorChecker error_checker(api_util);
3305 ctx_PDElements_Set_pctPermanent(ctx, value);
3306 return *this;
3307 }
3308
3314 strings AllNames() // getter
3315 {
3316 APIUtil::ErrorChecker error_checker(api_util);
3317 return api_util->get_string_array(ctx_PDElements_Get_AllNames);
3318 }
3332 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3333 VectorT AllMaxCurrents(bool AllNodes=false)
3334 {
3335 APIUtil::ErrorChecker error_checker(api_util);
3336 ctx_PDElements_Get_AllMaxCurrents_GR(ctx, AllNodes);
3337 return api_util->get_float64_gr_array<VectorT>();
3338 }
3352 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3353 VectorT AllPctNorm(bool AllNodes=false)
3354 {
3355 APIUtil::ErrorChecker error_checker(api_util);
3356 ctx_PDElements_Get_AllPctNorm_GR(ctx, AllNodes);
3357 return api_util->get_float64_gr_array<VectorT>();
3358 }
3372 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3373 VectorT AllPctEmerg(bool AllNodes=false)
3374 {
3375 APIUtil::ErrorChecker error_checker(api_util);
3376 ctx_PDElements_Get_AllPctEmerg_GR(ctx, AllNodes);
3377 return api_util->get_float64_gr_array<VectorT>();
3378 }
3379
3385 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3386 VectorT AllCurrents() // getter
3387 {
3388 APIUtil::ErrorChecker error_checker(api_util);
3389 ctx_PDElements_Get_AllCurrents_GR(ctx);
3390 return api_util->get_float64_gr_array<VectorT>();
3391 }
3392
3398 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3399 VectorT AllCurrentsMagAng() // getter
3400 {
3401 APIUtil::ErrorChecker error_checker(api_util);
3402 ctx_PDElements_Get_AllCurrentsMagAng_GR(ctx);
3403 return api_util->get_float64_gr_array<VectorT>();
3404 }
3405
3411 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3412 VectorT AllCplxSeqCurrents() // getter
3413 {
3414 APIUtil::ErrorChecker error_checker(api_util);
3415 ctx_PDElements_Get_AllCplxSeqCurrents_GR(ctx);
3416 return api_util->get_float64_gr_array<VectorT>();
3417 }
3418
3424 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3425 VectorT AllSeqCurrents() // getter
3426 {
3427 APIUtil::ErrorChecker error_checker(api_util);
3428 ctx_PDElements_Get_AllSeqCurrents_GR(ctx);
3429 return api_util->get_float64_gr_array<VectorT>();
3430 }
3431
3437 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3438 VectorT AllPowers() // getter
3439 {
3440 APIUtil::ErrorChecker error_checker(api_util);
3441 ctx_PDElements_Get_AllPowers_GR(ctx);
3442 return api_util->get_float64_gr_array<VectorT>();
3443 }
3444
3450 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3451 VectorT AllSeqPowers() // getter
3452 {
3453 APIUtil::ErrorChecker error_checker(api_util);
3454 ctx_PDElements_Get_AllSeqPowers_GR(ctx);
3455 return api_util->get_float64_gr_array<VectorT>();
3456 }
3457
3463 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
3464 VectorT AllNumPhases() // getter
3465 {
3466 APIUtil::ErrorChecker error_checker(api_util);
3467 ctx_PDElements_Get_AllNumPhases_GR(ctx);
3468 return api_util->get_int32_gr_array<VectorT>();
3469 }
3470
3476 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
3477 VectorT AllNumConductors() // getter
3478 {
3479 APIUtil::ErrorChecker error_checker(api_util);
3480 ctx_PDElements_Get_AllNumConductors_GR(ctx);
3481 return api_util->get_int32_gr_array<VectorT>();
3482 }
3483
3489 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
3490 VectorT AllNumTerminals() // getter
3491 {
3492 APIUtil::ErrorChecker error_checker(api_util);
3493 ctx_PDElements_Get_AllNumTerminals_GR(ctx);
3494 return api_util->get_int32_gr_array<VectorT>();
3495 }
3496 };
3497
3499 {
3500 public:
3501
3502 IPVSystems(dss::APIUtil *util) :
3503 ContextState(util)
3504 {
3505 }
3506
3510 strings AllNames() // getter
3511 {
3512 APIUtil::ErrorChecker error_checker(api_util);
3513 return api_util->get_string_array(ctx_PVSystems_Get_AllNames);
3514 }
3515
3519 int32_t Count() // getter
3520 {
3521 APIUtil::ErrorChecker error_checker(api_util);
3522 return ctx_PVSystems_Get_Count(ctx);
3523 }
3524
3528 int32_t First() // getter
3529 {
3530 APIUtil::ErrorChecker error_checker(api_util);
3531 return ctx_PVSystems_Get_First(ctx);
3532 }
3533
3537 string Name() // getter
3538 {
3539 APIUtil::ErrorChecker error_checker(api_util);
3540 return ctx_PVSystems_Get_Name(ctx);
3541 }
3542
3546 IPVSystems& Name(const char *value)
3547 {
3548 APIUtil::ErrorChecker error_checker(api_util);
3549 ctx_PVSystems_Set_Name(ctx, value);
3550 return *this;
3551 }
3552 IPVSystems& Name(const string &value)
3553 {
3554 return Name(value.c_str());
3555 }
3556
3560 int32_t Next() // getter
3561 {
3562 APIUtil::ErrorChecker error_checker(api_util);
3563 return ctx_PVSystems_Get_Next(ctx);
3564 }
3565
3569 int32_t idx() // getter
3570 {
3571 APIUtil::ErrorChecker error_checker(api_util);
3572 return ctx_PVSystems_Get_idx(ctx);
3573 }
3574
3578 void idx(int32_t value) // setter
3579 {
3580 APIUtil::ErrorChecker error_checker(api_util);
3581 ctx_PVSystems_Set_idx(ctx, value);
3582 }
3583
3587 double Irradiance() // getter
3588 {
3589 APIUtil::ErrorChecker error_checker(api_util);
3590 return ctx_PVSystems_Get_Irradiance(ctx);
3591 }
3592 IPVSystems& Irradiance(double value) // setter
3593 {
3594 APIUtil::ErrorChecker error_checker(api_util);
3595 ctx_PVSystems_Set_Irradiance(ctx, value);
3596 return *this;
3597 }
3598
3602 double PF() // getter
3603 {
3604 APIUtil::ErrorChecker error_checker(api_util);
3605 return ctx_PVSystems_Get_PF(ctx);
3606 }
3607 IPVSystems& PF(double value) // setter
3608 {
3609 APIUtil::ErrorChecker error_checker(api_util);
3610 ctx_PVSystems_Set_PF(ctx, value);
3611 return *this;
3612 }
3613
3617 strings RegisterNames() // getter
3618 {
3619 APIUtil::ErrorChecker error_checker(api_util);
3620 return api_util->get_string_array(ctx_PVSystems_Get_RegisterNames);
3621 }
3622
3626 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
3627 VectorT RegisterValues() // getter
3628 {
3629 APIUtil::ErrorChecker error_checker(api_util);
3630 ctx_PVSystems_Get_RegisterValues_GR(ctx);
3631 return api_util->get_float64_gr_array<VectorT>();
3632 }
3633
3637 double kVArated() // getter
3638 {
3639 APIUtil::ErrorChecker error_checker(api_util);
3640 return ctx_PVSystems_Get_kVArated(ctx);
3641 }
3642 IPVSystems& kVArated(double value) // setter
3643 {
3644 APIUtil::ErrorChecker error_checker(api_util);
3645 ctx_PVSystems_Set_kVArated(ctx, value);
3646 return *this;
3647 }
3648
3652 double kW() // getter
3653 {
3654 APIUtil::ErrorChecker error_checker(api_util);
3655 return ctx_PVSystems_Get_kW(ctx);
3656 }
3657
3661 double kvar() // getter
3662 {
3663 APIUtil::ErrorChecker error_checker(api_util);
3664 return ctx_PVSystems_Get_kvar(ctx);
3665 }
3666 IPVSystems& kvar(double value) // setter
3667 {
3668 APIUtil::ErrorChecker error_checker(api_util);
3669 ctx_PVSystems_Set_kvar(ctx, value);
3670 return *this;
3671 }
3672
3676 string daily() // getter
3677 {
3678 APIUtil::ErrorChecker error_checker(api_util);
3679 return ctx_PVSystems_Get_daily(ctx);
3680 }
3681 IPVSystems& daily(const char *value) // setter
3682 {
3683 APIUtil::ErrorChecker error_checker(api_util);
3684 ctx_PVSystems_Set_daily(ctx, value);
3685 return *this;
3686 }
3687 IPVSystems& daily(const string &value) // setter
3688 {
3689 APIUtil::ErrorChecker error_checker(api_util);
3690 ctx_PVSystems_Set_daily(ctx, value.c_str());
3691 return *this;
3692 }
3693
3699 string duty() // getter
3700 {
3701 APIUtil::ErrorChecker error_checker(api_util);
3702 return ctx_PVSystems_Get_duty(ctx);
3703 }
3704 IPVSystems& duty(const char *value) // setter
3705 {
3706 APIUtil::ErrorChecker error_checker(api_util);
3707 ctx_PVSystems_Set_duty(ctx, value);
3708 return *this;
3709 }
3710 IPVSystems& duty(const string &value) // setter
3711 {
3712 APIUtil::ErrorChecker error_checker(api_util);
3713 ctx_PVSystems_Set_duty(ctx, value.c_str());
3714 return *this;
3715 }
3716
3723 string yearly() // getter
3724 {
3725 APIUtil::ErrorChecker error_checker(api_util);
3726 return ctx_PVSystems_Get_yearly(ctx);
3727 }
3728 IPVSystems& yearly(const char *value) // setter
3729 {
3730 APIUtil::ErrorChecker error_checker(api_util);
3731 ctx_PVSystems_Set_yearly(ctx, value);
3732 return *this;
3733 }
3734 IPVSystems& yearly(const string &value) // setter
3735 {
3736 APIUtil::ErrorChecker error_checker(api_util);
3737 ctx_PVSystems_Set_yearly(ctx, value.c_str());
3738 return *this;
3739 }
3740
3747 string Tdaily() // getter
3748 {
3749 APIUtil::ErrorChecker error_checker(api_util);
3750 return ctx_PVSystems_Get_Tdaily(ctx);
3751 }
3752 IPVSystems& Tdaily(const char *value) // setter
3753 {
3754 APIUtil::ErrorChecker error_checker(api_util);
3755 ctx_PVSystems_Set_Tdaily(ctx, value);
3756 return *this;
3757 }
3758 IPVSystems& Tdaily(const string &value) // setter
3759 {
3760 APIUtil::ErrorChecker error_checker(api_util);
3761 ctx_PVSystems_Set_Tdaily(ctx, value.c_str());
3762 return *this;
3763 }
3764
3774 string Tduty() // getter
3775 {
3776 APIUtil::ErrorChecker error_checker(api_util);
3777 return ctx_PVSystems_Get_Tduty(ctx);
3778 }
3779 IPVSystems& Tduty(const char *value) // setter
3780 {
3781 APIUtil::ErrorChecker error_checker(api_util);
3782 ctx_PVSystems_Set_Tduty(ctx, value);
3783 return *this;
3784 }
3785 IPVSystems& Tduty(const string &value) // setter
3786 {
3787 APIUtil::ErrorChecker error_checker(api_util);
3788 ctx_PVSystems_Set_Tduty(ctx, value.c_str());
3789 return *this;
3790 }
3791
3799 string Tyearly() // getter
3800 {
3801 APIUtil::ErrorChecker error_checker(api_util);
3802 return ctx_PVSystems_Get_Tyearly(ctx);
3803 }
3804 IPVSystems& Tyearly(const char *value) // setter
3805 {
3806 APIUtil::ErrorChecker error_checker(api_util);
3807 ctx_PVSystems_Set_Tyearly(ctx, value);
3808 return *this;
3809 }
3810 IPVSystems& Tyearly(const string &value) // setter
3811 {
3812 APIUtil::ErrorChecker error_checker(api_util);
3813 ctx_PVSystems_Set_Tyearly(ctx, value.c_str());
3814 return *this;
3815 }
3816
3821 double IrradianceNow() // getter
3822 {
3823 APIUtil::ErrorChecker error_checker(api_util);
3824 return ctx_PVSystems_Get_IrradianceNow(ctx);
3825 }
3826
3831 double Pmpp() // getter
3832 {
3833 APIUtil::ErrorChecker error_checker(api_util);
3834 return ctx_PVSystems_Get_Pmpp(ctx);
3835 }
3836 IPVSystems& Pmpp(double value) // setter
3837 {
3838 APIUtil::ErrorChecker error_checker(api_util);
3839 ctx_PVSystems_Set_Pmpp(ctx, value);
3840 return *this;
3841 }
3842
3846 string Sensor() // getter
3847 {
3848 APIUtil::ErrorChecker error_checker(api_util);
3849 return ctx_PVSystems_Get_Sensor(ctx);
3850 }
3851 };
3852
3854 {
3855 public:
3856
3857 IParallel(dss::APIUtil *util) :
3858 ContextState(util)
3859 {
3860 }
3861 void CreateActor()
3862 {
3863 APIUtil::ErrorChecker error_checker(api_util);
3864 ctx_Parallel_CreateActor(ctx);
3865 }
3866 void Wait()
3867 {
3868 APIUtil::ErrorChecker error_checker(api_util);
3869 ctx_Parallel_Wait(ctx);
3870 }
3871
3875 int32_t ActiveActor() // getter
3876 {
3877 APIUtil::ErrorChecker error_checker(api_util);
3878 return ctx_Parallel_Get_ActiveActor(ctx);
3879 }
3880 IParallel& ActiveActor(int32_t value) // setter
3881 {
3882 APIUtil::ErrorChecker error_checker(api_util);
3883 ctx_Parallel_Set_ActiveActor(ctx, value);
3884 return *this;
3885 }
3886
3891 int32_t ActiveParallel() // getter
3892 {
3893 APIUtil::ErrorChecker error_checker(api_util);
3894 return ctx_Parallel_Get_ActiveParallel(ctx);
3895 }
3896 IParallel& ActiveParallel(int32_t value) // setter
3897 {
3898 APIUtil::ErrorChecker error_checker(api_util);
3899 ctx_Parallel_Set_ActiveParallel(ctx, value);
3900 return *this;
3901 }
3902
3906 int32_t ActorCPU() // getter
3907 {
3908 APIUtil::ErrorChecker error_checker(api_util);
3909 return ctx_Parallel_Get_ActorCPU(ctx);
3910 }
3911 IParallel& ActorCPU(int32_t value) // setter
3912 {
3913 APIUtil::ErrorChecker error_checker(api_util);
3914 ctx_Parallel_Set_ActorCPU(ctx, value);
3915 return *this;
3916 }
3917
3921 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
3922 VectorT ActorProgress() // getter
3923 {
3924 APIUtil::ErrorChecker error_checker(api_util);
3925 ctx_Parallel_Get_ActorProgress_GR(ctx);
3926 return api_util->get_int32_gr_array<VectorT>();
3927 }
3928
3932 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
3933 VectorT ActorStatus() // getter
3934 {
3935 APIUtil::ErrorChecker error_checker(api_util);
3936 ctx_Parallel_Get_ActorStatus_GR(ctx);
3937 return api_util->get_int32_gr_array<VectorT>();
3938 }
3939
3944 int32_t ConcatenateReports() // getter
3945 {
3946 APIUtil::ErrorChecker error_checker(api_util);
3947 return ctx_Parallel_Get_ConcatenateReports(ctx);
3948 }
3949 IParallel& ConcatenateReports(int32_t value) // setter
3950 {
3951 APIUtil::ErrorChecker error_checker(api_util);
3952 ctx_Parallel_Set_ConcatenateReports(ctx, value);
3953 return *this;
3954 }
3955
3959 int32_t NumCPUs() // getter
3960 {
3961 APIUtil::ErrorChecker error_checker(api_util);
3962 return ctx_Parallel_Get_NumCPUs(ctx);
3963 }
3964
3968 int32_t NumCores() // getter
3969 {
3970 APIUtil::ErrorChecker error_checker(api_util);
3971 return ctx_Parallel_Get_NumCores(ctx);
3972 }
3973
3977 int32_t NumOfActors() // getter
3978 {
3979 APIUtil::ErrorChecker error_checker(api_util);
3980 return ctx_Parallel_Get_NumOfActors(ctx);
3981 }
3982 };
3983
3985 {
3986 public:
3987
3988 IReactors(dss::APIUtil *util) :
3989 ContextState(util)
3990 {
3991 }
3992
3996 strings AllNames() // getter
3997 {
3998 APIUtil::ErrorChecker error_checker(api_util);
3999 return api_util->get_string_array(ctx_Reactors_Get_AllNames);
4000 }
4001
4005 int32_t Count() // getter
4006 {
4007 APIUtil::ErrorChecker error_checker(api_util);
4008 return ctx_Reactors_Get_Count(ctx);
4009 }
4010
4014 int32_t First() // getter
4015 {
4016 APIUtil::ErrorChecker error_checker(api_util);
4017 return ctx_Reactors_Get_First(ctx);
4018 }
4019
4023 string Name() // getter
4024 {
4025 APIUtil::ErrorChecker error_checker(api_util);
4026 return ctx_Reactors_Get_Name(ctx);
4027 }
4028
4032 IReactors& Name(const char *value)
4033 {
4034 APIUtil::ErrorChecker error_checker(api_util);
4035 ctx_Reactors_Set_Name(ctx, value);
4036 return *this;
4037 }
4038 IReactors& Name(const string &value)
4039 {
4040 return Name(value.c_str());
4041 }
4042
4046 int32_t Next() // getter
4047 {
4048 APIUtil::ErrorChecker error_checker(api_util);
4049 return ctx_Reactors_Get_Next(ctx);
4050 }
4051
4055 int32_t idx() // getter
4056 {
4057 APIUtil::ErrorChecker error_checker(api_util);
4058 return ctx_Reactors_Get_idx(ctx);
4059 }
4060
4064 void idx(int32_t value) // setter
4065 {
4066 APIUtil::ErrorChecker error_checker(api_util);
4067 ctx_Reactors_Set_idx(ctx, value);
4068 }
4069
4074 int32_t SpecType() // getter
4075 {
4076 APIUtil::ErrorChecker error_checker(api_util);
4077 return ctx_Reactors_Get_SpecType(ctx);
4078 }
4079
4083 bool IsDelta() // getter
4084 {
4085 APIUtil::ErrorChecker error_checker(api_util);
4086 return (ctx_Reactors_Get_IsDelta(ctx) != 0);
4087 }
4088 IReactors& IsDelta(bool value) // setter
4089 {
4090 APIUtil::ErrorChecker error_checker(api_util);
4091 ctx_Reactors_Set_IsDelta(ctx, value);
4092 return *this;
4093 }
4094
4098 bool Parallel() // getter
4099 {
4100 APIUtil::ErrorChecker error_checker(api_util);
4101 return (ctx_Reactors_Get_Parallel(ctx) != 0);
4102 }
4103 IReactors& Parallel(bool value) // setter
4104 {
4105 APIUtil::ErrorChecker error_checker(api_util);
4106 ctx_Reactors_Set_Parallel(ctx, value);
4107 return *this;
4108 }
4109
4113 double LmH() // getter
4114 {
4115 APIUtil::ErrorChecker error_checker(api_util);
4116 return ctx_Reactors_Get_LmH(ctx);
4117 }
4118 IReactors& LmH(double value) // setter
4119 {
4120 APIUtil::ErrorChecker error_checker(api_util);
4121 ctx_Reactors_Set_LmH(ctx, value);
4122 return *this;
4123 }
4124
4128 double kV() // getter
4129 {
4130 APIUtil::ErrorChecker error_checker(api_util);
4131 return ctx_Reactors_Get_kV(ctx);
4132 }
4133 IReactors& kV(double value) // setter
4134 {
4135 APIUtil::ErrorChecker error_checker(api_util);
4136 ctx_Reactors_Set_kV(ctx, value);
4137 return *this;
4138 }
4139
4143 double kvar() // getter
4144 {
4145 APIUtil::ErrorChecker error_checker(api_util);
4146 return ctx_Reactors_Get_kvar(ctx);
4147 }
4148 IReactors& kvar(double value) // setter
4149 {
4150 APIUtil::ErrorChecker error_checker(api_util);
4151 ctx_Reactors_Set_kvar(ctx, value);
4152 return *this;
4153 }
4154
4158 int32_t Phases() // getter
4159 {
4160 APIUtil::ErrorChecker error_checker(api_util);
4161 return ctx_Reactors_Get_Phases(ctx);
4162 }
4163 IReactors& Phases(int32_t value) // setter
4164 {
4165 APIUtil::ErrorChecker error_checker(api_util);
4166 ctx_Reactors_Set_Phases(ctx, value);
4167 return *this;
4168 }
4169
4175 string Bus1() // getter
4176 {
4177 APIUtil::ErrorChecker error_checker(api_util);
4178 return ctx_Reactors_Get_Bus1(ctx);
4179 }
4180 IReactors& Bus1(const char *value) // setter
4181 {
4182 APIUtil::ErrorChecker error_checker(api_util);
4183 ctx_Reactors_Set_Bus1(ctx, value);
4184 return *this;
4185 }
4186 IReactors& Bus1(const string &value) // setter
4187 {
4188 APIUtil::ErrorChecker error_checker(api_util);
4189 ctx_Reactors_Set_Bus1(ctx, value.c_str());
4190 return *this;
4191 }
4192
4197 string Bus2() // getter
4198 {
4199 APIUtil::ErrorChecker error_checker(api_util);
4200 return ctx_Reactors_Get_Bus2(ctx);
4201 }
4202 IReactors& Bus2(const char *value) // setter
4203 {
4204 APIUtil::ErrorChecker error_checker(api_util);
4205 ctx_Reactors_Set_Bus2(ctx, value);
4206 return *this;
4207 }
4208 IReactors& Bus2(const string &value) // setter
4209 {
4210 APIUtil::ErrorChecker error_checker(api_util);
4211 ctx_Reactors_Set_Bus2(ctx, value.c_str());
4212 return *this;
4213 }
4214
4218 string LCurve() // getter
4219 {
4220 APIUtil::ErrorChecker error_checker(api_util);
4221 return ctx_Reactors_Get_LCurve(ctx);
4222 }
4223 IReactors& LCurve(const char *value) // setter
4224 {
4225 APIUtil::ErrorChecker error_checker(api_util);
4226 ctx_Reactors_Set_LCurve(ctx, value);
4227 return *this;
4228 }
4229 IReactors& LCurve(const string &value) // setter
4230 {
4231 APIUtil::ErrorChecker error_checker(api_util);
4232 ctx_Reactors_Set_LCurve(ctx, value.c_str());
4233 return *this;
4234 }
4235
4239 string RCurve() // getter
4240 {
4241 APIUtil::ErrorChecker error_checker(api_util);
4242 return ctx_Reactors_Get_RCurve(ctx);
4243 }
4244 IReactors& RCurve(const char *value) // setter
4245 {
4246 APIUtil::ErrorChecker error_checker(api_util);
4247 ctx_Reactors_Set_RCurve(ctx, value);
4248 return *this;
4249 }
4250 IReactors& RCurve(const string &value) // setter
4251 {
4252 APIUtil::ErrorChecker error_checker(api_util);
4253 ctx_Reactors_Set_RCurve(ctx, value.c_str());
4254 return *this;
4255 }
4256
4260 double R() // getter
4261 {
4262 APIUtil::ErrorChecker error_checker(api_util);
4263 return ctx_Reactors_Get_R(ctx);
4264 }
4265 IReactors& R(double value) // setter
4266 {
4267 APIUtil::ErrorChecker error_checker(api_util);
4268 ctx_Reactors_Set_R(ctx, value);
4269 return *this;
4270 }
4271
4275 double X() // getter
4276 {
4277 APIUtil::ErrorChecker error_checker(api_util);
4278 return ctx_Reactors_Get_X(ctx);
4279 }
4280 IReactors& X(double value) // setter
4281 {
4282 APIUtil::ErrorChecker error_checker(api_util);
4283 ctx_Reactors_Set_X(ctx, value);
4284 return *this;
4285 }
4286
4290 double Rp() // getter
4291 {
4292 APIUtil::ErrorChecker error_checker(api_util);
4293 return ctx_Reactors_Get_Rp(ctx);
4294 }
4295 IReactors& Rp(double value) // setter
4296 {
4297 APIUtil::ErrorChecker error_checker(api_util);
4298 ctx_Reactors_Set_Rp(ctx, value);
4299 return *this;
4300 }
4301
4305 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4306 VectorT Rmatrix() // getter
4307 {
4308 APIUtil::ErrorChecker error_checker(api_util);
4309 ctx_Reactors_Get_Rmatrix_GR(ctx);
4310 return api_util->get_float64_gr_array<VectorT>();
4311 }
4312 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4313 IReactors& Rmatrix(const VectorT &value) // setter
4314 {
4315 APIUtil::ErrorChecker error_checker(api_util);
4316 ctx_Reactors_Set_Rmatrix(ctx, &value[0], value.size());
4317 return *this;
4318 }
4319
4323 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4324 VectorT Xmatrix() // getter
4325 {
4326 APIUtil::ErrorChecker error_checker(api_util);
4327 ctx_Reactors_Get_Xmatrix_GR(ctx);
4328 return api_util->get_float64_gr_array<VectorT>();
4329 }
4330 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4331 IReactors& Xmatrix(const VectorT &value) // setter
4332 {
4333 APIUtil::ErrorChecker error_checker(api_util);
4334 ctx_Reactors_Set_Xmatrix(ctx, &value[0], value.size());
4335 return *this;
4336 }
4337
4341 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4342 VectorT Z() // getter
4343 {
4344 APIUtil::ErrorChecker error_checker(api_util);
4345 ctx_Reactors_Get_Z_GR(ctx);
4346 return api_util->get_float64_gr_array<VectorT>();
4347 }
4348 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4349 IReactors& Z(const VectorT &value) // setter
4350 {
4351 APIUtil::ErrorChecker error_checker(api_util);
4352 ctx_Reactors_Set_Z(ctx, &value[0], value.size());
4353 return *this;
4354 }
4355
4365 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4366 VectorT Z1() // getter
4367 {
4368 APIUtil::ErrorChecker error_checker(api_util);
4369 ctx_Reactors_Get_Z1_GR(ctx);
4370 return api_util->get_float64_gr_array<VectorT>();
4371 }
4372 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4373 IReactors& Z1(const VectorT &value) // setter
4374 {
4375 APIUtil::ErrorChecker error_checker(api_util);
4376 ctx_Reactors_Set_Z1(ctx, &value[0], value.size());
4377 return *this;
4378 }
4379
4387 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4388 VectorT Z2() // getter
4389 {
4390 APIUtil::ErrorChecker error_checker(api_util);
4391 ctx_Reactors_Get_Z2_GR(ctx);
4392 return api_util->get_float64_gr_array<VectorT>();
4393 }
4394 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4395 IReactors& Z2(const VectorT &value) // setter
4396 {
4397 APIUtil::ErrorChecker error_checker(api_util);
4398 ctx_Reactors_Set_Z2(ctx, &value[0], value.size());
4399 return *this;
4400 }
4401
4409 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4410 VectorT Z0() // getter
4411 {
4412 APIUtil::ErrorChecker error_checker(api_util);
4413 ctx_Reactors_Get_Z0_GR(ctx);
4414 return api_util->get_float64_gr_array<VectorT>();
4415 }
4416 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4417 IReactors& Z0(const VectorT &value) // setter
4418 {
4419 APIUtil::ErrorChecker error_checker(api_util);
4420 ctx_Reactors_Set_Z0(ctx, &value[0], value.size());
4421 return *this;
4422 }
4423 };
4424
4426 {
4427 public:
4428
4429 IReclosers(dss::APIUtil *util) :
4430 ContextState(util)
4431 {
4432 }
4433
4437 strings AllNames() // getter
4438 {
4439 APIUtil::ErrorChecker error_checker(api_util);
4440 return api_util->get_string_array(ctx_Reclosers_Get_AllNames);
4441 }
4442
4446 int32_t Count() // getter
4447 {
4448 APIUtil::ErrorChecker error_checker(api_util);
4449 return ctx_Reclosers_Get_Count(ctx);
4450 }
4451
4455 int32_t First() // getter
4456 {
4457 APIUtil::ErrorChecker error_checker(api_util);
4458 return ctx_Reclosers_Get_First(ctx);
4459 }
4460
4464 string Name() // getter
4465 {
4466 APIUtil::ErrorChecker error_checker(api_util);
4467 return ctx_Reclosers_Get_Name(ctx);
4468 }
4469
4473 IReclosers& Name(const char *value)
4474 {
4475 APIUtil::ErrorChecker error_checker(api_util);
4476 ctx_Reclosers_Set_Name(ctx, value);
4477 return *this;
4478 }
4479 IReclosers& Name(const string &value)
4480 {
4481 return Name(value.c_str());
4482 }
4483
4487 int32_t Next() // getter
4488 {
4489 APIUtil::ErrorChecker error_checker(api_util);
4490 return ctx_Reclosers_Get_Next(ctx);
4491 }
4492
4496 int32_t idx() // getter
4497 {
4498 APIUtil::ErrorChecker error_checker(api_util);
4499 return ctx_Reclosers_Get_idx(ctx);
4500 }
4501
4505 void idx(int32_t value) // setter
4506 {
4507 APIUtil::ErrorChecker error_checker(api_util);
4508 ctx_Reclosers_Set_idx(ctx, value);
4509 }
4510 void Close()
4511 {
4512 APIUtil::ErrorChecker error_checker(api_util);
4513 ctx_Reclosers_Close(ctx);
4514 }
4515 void Open()
4516 {
4517 APIUtil::ErrorChecker error_checker(api_util);
4518 ctx_Reclosers_Open(ctx);
4519 }
4520
4524 double GroundInst() // getter
4525 {
4526 APIUtil::ErrorChecker error_checker(api_util);
4527 return ctx_Reclosers_Get_GroundInst(ctx);
4528 }
4529 IReclosers& GroundInst(double value) // setter
4530 {
4531 APIUtil::ErrorChecker error_checker(api_util);
4532 ctx_Reclosers_Set_GroundInst(ctx, value);
4533 return *this;
4534 }
4535
4539 double GroundTrip() // getter
4540 {
4541 APIUtil::ErrorChecker error_checker(api_util);
4542 return ctx_Reclosers_Get_GroundTrip(ctx);
4543 }
4544 IReclosers& GroundTrip(double value) // setter
4545 {
4546 APIUtil::ErrorChecker error_checker(api_util);
4547 ctx_Reclosers_Set_GroundTrip(ctx, value);
4548 return *this;
4549 }
4550
4554 string MonitoredObj() // getter
4555 {
4556 APIUtil::ErrorChecker error_checker(api_util);
4557 return ctx_Reclosers_Get_MonitoredObj(ctx);
4558 }
4559 IReclosers& MonitoredObj(const char *value) // setter
4560 {
4561 APIUtil::ErrorChecker error_checker(api_util);
4562 ctx_Reclosers_Set_MonitoredObj(ctx, value);
4563 return *this;
4564 }
4565 IReclosers& MonitoredObj(const string &value) // setter
4566 {
4567 APIUtil::ErrorChecker error_checker(api_util);
4568 ctx_Reclosers_Set_MonitoredObj(ctx, value.c_str());
4569 return *this;
4570 }
4571
4575 int32_t MonitoredTerm() // getter
4576 {
4577 APIUtil::ErrorChecker error_checker(api_util);
4578 return ctx_Reclosers_Get_MonitoredTerm(ctx);
4579 }
4580 IReclosers& MonitoredTerm(int32_t value) // setter
4581 {
4582 APIUtil::ErrorChecker error_checker(api_util);
4583 ctx_Reclosers_Set_MonitoredTerm(ctx, value);
4584 return *this;
4585 }
4586
4590 int32_t NumFast() // getter
4591 {
4592 APIUtil::ErrorChecker error_checker(api_util);
4593 return ctx_Reclosers_Get_NumFast(ctx);
4594 }
4595 IReclosers& NumFast(int32_t value) // setter
4596 {
4597 APIUtil::ErrorChecker error_checker(api_util);
4598 ctx_Reclosers_Set_NumFast(ctx, value);
4599 return *this;
4600 }
4601
4605 double PhaseInst() // getter
4606 {
4607 APIUtil::ErrorChecker error_checker(api_util);
4608 return ctx_Reclosers_Get_PhaseInst(ctx);
4609 }
4610 IReclosers& PhaseInst(double value) // setter
4611 {
4612 APIUtil::ErrorChecker error_checker(api_util);
4613 ctx_Reclosers_Set_PhaseInst(ctx, value);
4614 return *this;
4615 }
4616
4620 double PhaseTrip() // getter
4621 {
4622 APIUtil::ErrorChecker error_checker(api_util);
4623 return ctx_Reclosers_Get_PhaseTrip(ctx);
4624 }
4625 IReclosers& PhaseTrip(double value) // setter
4626 {
4627 APIUtil::ErrorChecker error_checker(api_util);
4628 ctx_Reclosers_Set_PhaseTrip(ctx, value);
4629 return *this;
4630 }
4631
4635 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
4636 VectorT RecloseIntervals() // getter
4637 {
4638 APIUtil::ErrorChecker error_checker(api_util);
4639 ctx_Reclosers_Get_RecloseIntervals_GR(ctx);
4640 return api_util->get_float64_gr_array<VectorT>();
4641 }
4642
4646 int32_t Shots() // getter
4647 {
4648 APIUtil::ErrorChecker error_checker(api_util);
4649 return ctx_Reclosers_Get_Shots(ctx);
4650 }
4651 IReclosers& Shots(int32_t value) // setter
4652 {
4653 APIUtil::ErrorChecker error_checker(api_util);
4654 ctx_Reclosers_Set_Shots(ctx, value);
4655 return *this;
4656 }
4657
4661 string SwitchedObj() // getter
4662 {
4663 APIUtil::ErrorChecker error_checker(api_util);
4664 return ctx_Reclosers_Get_SwitchedObj(ctx);
4665 }
4666 IReclosers& SwitchedObj(const char *value) // setter
4667 {
4668 APIUtil::ErrorChecker error_checker(api_util);
4669 ctx_Reclosers_Set_SwitchedObj(ctx, value);
4670 return *this;
4671 }
4672 IReclosers& SwitchedObj(const string &value) // setter
4673 {
4674 APIUtil::ErrorChecker error_checker(api_util);
4675 ctx_Reclosers_Set_SwitchedObj(ctx, value.c_str());
4676 return *this;
4677 }
4678
4682 int32_t SwitchedTerm() // getter
4683 {
4684 APIUtil::ErrorChecker error_checker(api_util);
4685 return ctx_Reclosers_Get_SwitchedTerm(ctx);
4686 }
4687 IReclosers& SwitchedTerm(int32_t value) // setter
4688 {
4689 APIUtil::ErrorChecker error_checker(api_util);
4690 ctx_Reclosers_Set_SwitchedTerm(ctx, value);
4691 return *this;
4692 }
4698 void Reset()
4699 {
4700 APIUtil::ErrorChecker error_checker(api_util);
4701 ctx_Reclosers_Reset(ctx);
4702 }
4703
4709 int32_t State() // getter
4710 {
4711 APIUtil::ErrorChecker error_checker(api_util);
4712 return ctx_Reclosers_Get_State(ctx);
4713 }
4714 IReclosers& State(int32_t value) // setter
4715 {
4716 APIUtil::ErrorChecker error_checker(api_util);
4717 ctx_Reclosers_Set_State(ctx, value);
4718 return *this;
4719 }
4720
4724 int32_t NormalState() // getter
4725 {
4726 APIUtil::ErrorChecker error_checker(api_util);
4727 return ctx_Reclosers_Get_NormalState(ctx);
4728 }
4729 IReclosers& NormalState(int32_t value) // setter
4730 {
4731 APIUtil::ErrorChecker error_checker(api_util);
4732 ctx_Reclosers_Set_NormalState(ctx, value);
4733 return *this;
4734 }
4735 };
4736
4738 {
4739 public:
4740
4741 IRegControls(dss::APIUtil *util) :
4742 ContextState(util)
4743 {
4744 }
4745
4749 strings AllNames() // getter
4750 {
4751 APIUtil::ErrorChecker error_checker(api_util);
4752 return api_util->get_string_array(ctx_RegControls_Get_AllNames);
4753 }
4754
4758 int32_t Count() // getter
4759 {
4760 APIUtil::ErrorChecker error_checker(api_util);
4761 return ctx_RegControls_Get_Count(ctx);
4762 }
4763
4767 int32_t First() // getter
4768 {
4769 APIUtil::ErrorChecker error_checker(api_util);
4770 return ctx_RegControls_Get_First(ctx);
4771 }
4772
4776 string Name() // getter
4777 {
4778 APIUtil::ErrorChecker error_checker(api_util);
4779 return ctx_RegControls_Get_Name(ctx);
4780 }
4781
4785 IRegControls& Name(const char *value)
4786 {
4787 APIUtil::ErrorChecker error_checker(api_util);
4788 ctx_RegControls_Set_Name(ctx, value);
4789 return *this;
4790 }
4791 IRegControls& Name(const string &value)
4792 {
4793 return Name(value.c_str());
4794 }
4795
4799 int32_t Next() // getter
4800 {
4801 APIUtil::ErrorChecker error_checker(api_util);
4802 return ctx_RegControls_Get_Next(ctx);
4803 }
4804
4808 int32_t idx() // getter
4809 {
4810 APIUtil::ErrorChecker error_checker(api_util);
4811 return ctx_RegControls_Get_idx(ctx);
4812 }
4813
4817 void idx(int32_t value) // setter
4818 {
4819 APIUtil::ErrorChecker error_checker(api_util);
4820 ctx_RegControls_Set_idx(ctx, value);
4821 }
4822 void Reset()
4823 {
4824 APIUtil::ErrorChecker error_checker(api_util);
4825 ctx_RegControls_Reset(ctx);
4826 }
4827
4831 double CTPrimary() // getter
4832 {
4833 APIUtil::ErrorChecker error_checker(api_util);
4834 return ctx_RegControls_Get_CTPrimary(ctx);
4835 }
4836 IRegControls& CTPrimary(double value) // setter
4837 {
4838 APIUtil::ErrorChecker error_checker(api_util);
4839 ctx_RegControls_Set_CTPrimary(ctx, value);
4840 return *this;
4841 }
4842
4846 double Delay() // getter
4847 {
4848 APIUtil::ErrorChecker error_checker(api_util);
4849 return ctx_RegControls_Get_Delay(ctx);
4850 }
4851 IRegControls& Delay(double value) // setter
4852 {
4853 APIUtil::ErrorChecker error_checker(api_util);
4854 ctx_RegControls_Set_Delay(ctx, value);
4855 return *this;
4856 }
4857
4861 double ForwardBand() // getter
4862 {
4863 APIUtil::ErrorChecker error_checker(api_util);
4864 return ctx_RegControls_Get_ForwardBand(ctx);
4865 }
4866 IRegControls& ForwardBand(double value) // setter
4867 {
4868 APIUtil::ErrorChecker error_checker(api_util);
4869 ctx_RegControls_Set_ForwardBand(ctx, value);
4870 return *this;
4871 }
4872
4876 double ForwardR() // getter
4877 {
4878 APIUtil::ErrorChecker error_checker(api_util);
4879 return ctx_RegControls_Get_ForwardR(ctx);
4880 }
4881 IRegControls& ForwardR(double value) // setter
4882 {
4883 APIUtil::ErrorChecker error_checker(api_util);
4884 ctx_RegControls_Set_ForwardR(ctx, value);
4885 return *this;
4886 }
4887
4891 double ForwardVreg() // getter
4892 {
4893 APIUtil::ErrorChecker error_checker(api_util);
4894 return ctx_RegControls_Get_ForwardVreg(ctx);
4895 }
4896 IRegControls& ForwardVreg(double value) // setter
4897 {
4898 APIUtil::ErrorChecker error_checker(api_util);
4899 ctx_RegControls_Set_ForwardVreg(ctx, value);
4900 return *this;
4901 }
4902
4906 double ForwardX() // getter
4907 {
4908 APIUtil::ErrorChecker error_checker(api_util);
4909 return ctx_RegControls_Get_ForwardX(ctx);
4910 }
4911 IRegControls& ForwardX(double value) // setter
4912 {
4913 APIUtil::ErrorChecker error_checker(api_util);
4914 ctx_RegControls_Set_ForwardX(ctx, value);
4915 return *this;
4916 }
4917
4921 bool IsInverseTime() // getter
4922 {
4923 APIUtil::ErrorChecker error_checker(api_util);
4924 return (ctx_RegControls_Get_IsInverseTime(ctx) != 0);
4925 }
4926 IRegControls& IsInverseTime(bool value) // setter
4927 {
4928 APIUtil::ErrorChecker error_checker(api_util);
4929 ctx_RegControls_Set_IsInverseTime(ctx, value);
4930 return *this;
4931 }
4932
4936 bool IsReversible() // getter
4937 {
4938 APIUtil::ErrorChecker error_checker(api_util);
4939 return (ctx_RegControls_Get_IsReversible(ctx) != 0);
4940 }
4941 IRegControls& IsReversible(bool value) // setter
4942 {
4943 APIUtil::ErrorChecker error_checker(api_util);
4944 ctx_RegControls_Set_IsReversible(ctx, value);
4945 return *this;
4946 }
4947
4951 int32_t MaxTapChange() // getter
4952 {
4953 APIUtil::ErrorChecker error_checker(api_util);
4954 return ctx_RegControls_Get_MaxTapChange(ctx);
4955 }
4956 IRegControls& MaxTapChange(int32_t value) // setter
4957 {
4958 APIUtil::ErrorChecker error_checker(api_util);
4959 ctx_RegControls_Set_MaxTapChange(ctx, value);
4960 return *this;
4961 }
4962
4966 string MonitoredBus() // getter
4967 {
4968 APIUtil::ErrorChecker error_checker(api_util);
4969 return ctx_RegControls_Get_MonitoredBus(ctx);
4970 }
4971 IRegControls& MonitoredBus(const char *value) // setter
4972 {
4973 APIUtil::ErrorChecker error_checker(api_util);
4974 ctx_RegControls_Set_MonitoredBus(ctx, value);
4975 return *this;
4976 }
4977 IRegControls& MonitoredBus(const string &value) // setter
4978 {
4979 APIUtil::ErrorChecker error_checker(api_util);
4980 ctx_RegControls_Set_MonitoredBus(ctx, value.c_str());
4981 return *this;
4982 }
4983
4987 double PTratio() // getter
4988 {
4989 APIUtil::ErrorChecker error_checker(api_util);
4990 return ctx_RegControls_Get_PTratio(ctx);
4991 }
4992 IRegControls& PTratio(double value) // setter
4993 {
4994 APIUtil::ErrorChecker error_checker(api_util);
4995 ctx_RegControls_Set_PTratio(ctx, value);
4996 return *this;
4997 }
4998
5002 double ReverseBand() // getter
5003 {
5004 APIUtil::ErrorChecker error_checker(api_util);
5005 return ctx_RegControls_Get_ReverseBand(ctx);
5006 }
5007 IRegControls& ReverseBand(double value) // setter
5008 {
5009 APIUtil::ErrorChecker error_checker(api_util);
5010 ctx_RegControls_Set_ReverseBand(ctx, value);
5011 return *this;
5012 }
5013
5017 double ReverseR() // getter
5018 {
5019 APIUtil::ErrorChecker error_checker(api_util);
5020 return ctx_RegControls_Get_ReverseR(ctx);
5021 }
5022 IRegControls& ReverseR(double value) // setter
5023 {
5024 APIUtil::ErrorChecker error_checker(api_util);
5025 ctx_RegControls_Set_ReverseR(ctx, value);
5026 return *this;
5027 }
5028
5032 double ReverseVreg() // getter
5033 {
5034 APIUtil::ErrorChecker error_checker(api_util);
5035 return ctx_RegControls_Get_ReverseVreg(ctx);
5036 }
5037 IRegControls& ReverseVreg(double value) // setter
5038 {
5039 APIUtil::ErrorChecker error_checker(api_util);
5040 ctx_RegControls_Set_ReverseVreg(ctx, value);
5041 return *this;
5042 }
5043
5047 double ReverseX() // getter
5048 {
5049 APIUtil::ErrorChecker error_checker(api_util);
5050 return ctx_RegControls_Get_ReverseX(ctx);
5051 }
5052 IRegControls& ReverseX(double value) // setter
5053 {
5054 APIUtil::ErrorChecker error_checker(api_util);
5055 ctx_RegControls_Set_ReverseX(ctx, value);
5056 return *this;
5057 }
5058
5062 double TapDelay() // getter
5063 {
5064 APIUtil::ErrorChecker error_checker(api_util);
5065 return ctx_RegControls_Get_TapDelay(ctx);
5066 }
5067 IRegControls& TapDelay(double value) // setter
5068 {
5069 APIUtil::ErrorChecker error_checker(api_util);
5070 ctx_RegControls_Set_TapDelay(ctx, value);
5071 return *this;
5072 }
5073
5077 int32_t TapNumber() // getter
5078 {
5079 APIUtil::ErrorChecker error_checker(api_util);
5080 return ctx_RegControls_Get_TapNumber(ctx);
5081 }
5082 IRegControls& TapNumber(int32_t value) // setter
5083 {
5084 APIUtil::ErrorChecker error_checker(api_util);
5085 ctx_RegControls_Set_TapNumber(ctx, value);
5086 return *this;
5087 }
5088
5092 int32_t TapWinding() // getter
5093 {
5094 APIUtil::ErrorChecker error_checker(api_util);
5095 return ctx_RegControls_Get_TapWinding(ctx);
5096 }
5097 IRegControls& TapWinding(int32_t value) // setter
5098 {
5099 APIUtil::ErrorChecker error_checker(api_util);
5100 ctx_RegControls_Set_TapWinding(ctx, value);
5101 return *this;
5102 }
5103
5107 string Transformer() // getter
5108 {
5109 APIUtil::ErrorChecker error_checker(api_util);
5110 return ctx_RegControls_Get_Transformer(ctx);
5111 }
5112 IRegControls& Transformer(const char *value) // setter
5113 {
5114 APIUtil::ErrorChecker error_checker(api_util);
5115 ctx_RegControls_Set_Transformer(ctx, value);
5116 return *this;
5117 }
5118 IRegControls& Transformer(const string &value) // setter
5119 {
5120 APIUtil::ErrorChecker error_checker(api_util);
5121 ctx_RegControls_Set_Transformer(ctx, value.c_str());
5122 return *this;
5123 }
5124
5128 double VoltageLimit() // getter
5129 {
5130 APIUtil::ErrorChecker error_checker(api_util);
5131 return ctx_RegControls_Get_VoltageLimit(ctx);
5132 }
5133 IRegControls& VoltageLimit(double value) // setter
5134 {
5135 APIUtil::ErrorChecker error_checker(api_util);
5136 ctx_RegControls_Set_VoltageLimit(ctx, value);
5137 return *this;
5138 }
5139
5143 int32_t Winding() // getter
5144 {
5145 APIUtil::ErrorChecker error_checker(api_util);
5146 return ctx_RegControls_Get_Winding(ctx);
5147 }
5148 IRegControls& Winding(int32_t value) // setter
5149 {
5150 APIUtil::ErrorChecker error_checker(api_util);
5151 ctx_RegControls_Set_Winding(ctx, value);
5152 return *this;
5153 }
5154 };
5155
5156 class IRelays: public ContextState
5157 {
5158 public:
5159
5160 IRelays(dss::APIUtil *util) :
5161 ContextState(util)
5162 {
5163 }
5164
5168 strings AllNames() // getter
5169 {
5170 APIUtil::ErrorChecker error_checker(api_util);
5171 return api_util->get_string_array(ctx_Relays_Get_AllNames);
5172 }
5173
5177 int32_t Count() // getter
5178 {
5179 APIUtil::ErrorChecker error_checker(api_util);
5180 return ctx_Relays_Get_Count(ctx);
5181 }
5182
5186 int32_t First() // getter
5187 {
5188 APIUtil::ErrorChecker error_checker(api_util);
5189 return ctx_Relays_Get_First(ctx);
5190 }
5191
5195 string Name() // getter
5196 {
5197 APIUtil::ErrorChecker error_checker(api_util);
5198 return ctx_Relays_Get_Name(ctx);
5199 }
5200
5204 IRelays& Name(const char *value)
5205 {
5206 APIUtil::ErrorChecker error_checker(api_util);
5207 ctx_Relays_Set_Name(ctx, value);
5208 return *this;
5209 }
5210 IRelays& Name(const string &value)
5211 {
5212 return Name(value.c_str());
5213 }
5214
5218 int32_t Next() // getter
5219 {
5220 APIUtil::ErrorChecker error_checker(api_util);
5221 return ctx_Relays_Get_Next(ctx);
5222 }
5223
5227 int32_t idx() // getter
5228 {
5229 APIUtil::ErrorChecker error_checker(api_util);
5230 return ctx_Relays_Get_idx(ctx);
5231 }
5232
5236 void idx(int32_t value) // setter
5237 {
5238 APIUtil::ErrorChecker error_checker(api_util);
5239 ctx_Relays_Set_idx(ctx, value);
5240 }
5241
5245 string MonitoredObj() // getter
5246 {
5247 APIUtil::ErrorChecker error_checker(api_util);
5248 return ctx_Relays_Get_MonitoredObj(ctx);
5249 }
5250 IRelays& MonitoredObj(const char *value) // setter
5251 {
5252 APIUtil::ErrorChecker error_checker(api_util);
5253 ctx_Relays_Set_MonitoredObj(ctx, value);
5254 return *this;
5255 }
5256 IRelays& MonitoredObj(const string &value) // setter
5257 {
5258 APIUtil::ErrorChecker error_checker(api_util);
5259 ctx_Relays_Set_MonitoredObj(ctx, value.c_str());
5260 return *this;
5261 }
5262
5266 int32_t MonitoredTerm() // getter
5267 {
5268 APIUtil::ErrorChecker error_checker(api_util);
5269 return ctx_Relays_Get_MonitoredTerm(ctx);
5270 }
5271 IRelays& MonitoredTerm(int32_t value) // setter
5272 {
5273 APIUtil::ErrorChecker error_checker(api_util);
5274 ctx_Relays_Set_MonitoredTerm(ctx, value);
5275 return *this;
5276 }
5277
5281 string SwitchedObj() // getter
5282 {
5283 APIUtil::ErrorChecker error_checker(api_util);
5284 return ctx_Relays_Get_SwitchedObj(ctx);
5285 }
5286 IRelays& SwitchedObj(const char *value) // setter
5287 {
5288 APIUtil::ErrorChecker error_checker(api_util);
5289 ctx_Relays_Set_SwitchedObj(ctx, value);
5290 return *this;
5291 }
5292 IRelays& SwitchedObj(const string &value) // setter
5293 {
5294 APIUtil::ErrorChecker error_checker(api_util);
5295 ctx_Relays_Set_SwitchedObj(ctx, value.c_str());
5296 return *this;
5297 }
5298
5302 int32_t SwitchedTerm() // getter
5303 {
5304 APIUtil::ErrorChecker error_checker(api_util);
5305 return ctx_Relays_Get_SwitchedTerm(ctx);
5306 }
5307 IRelays& SwitchedTerm(int32_t value) // setter
5308 {
5309 APIUtil::ErrorChecker error_checker(api_util);
5310 ctx_Relays_Set_SwitchedTerm(ctx, value);
5311 return *this;
5312 }
5316 void Open()
5317 {
5318 APIUtil::ErrorChecker error_checker(api_util);
5319 ctx_Relays_Open(ctx);
5320 }
5324 void Close()
5325 {
5326 APIUtil::ErrorChecker error_checker(api_util);
5327 ctx_Relays_Close(ctx);
5328 }
5334 void Reset()
5335 {
5336 APIUtil::ErrorChecker error_checker(api_util);
5337 ctx_Relays_Reset(ctx);
5338 }
5339
5345 int32_t State() // getter
5346 {
5347 APIUtil::ErrorChecker error_checker(api_util);
5348 return ctx_Relays_Get_State(ctx);
5349 }
5350 IRelays& State(int32_t value) // setter
5351 {
5352 APIUtil::ErrorChecker error_checker(api_util);
5353 ctx_Relays_Set_State(ctx, value);
5354 return *this;
5355 }
5356
5360 int32_t NormalState() // getter
5361 {
5362 APIUtil::ErrorChecker error_checker(api_util);
5363 return ctx_Relays_Get_NormalState(ctx);
5364 }
5365 IRelays& NormalState(int32_t value) // setter
5366 {
5367 APIUtil::ErrorChecker error_checker(api_util);
5368 ctx_Relays_Set_NormalState(ctx, value);
5369 return *this;
5370 }
5371 };
5372
5374 {
5375 public:
5376
5377 ISensors(dss::APIUtil *util) :
5378 ContextState(util)
5379 {
5380 }
5381
5385 strings AllNames() // getter
5386 {
5387 APIUtil::ErrorChecker error_checker(api_util);
5388 return api_util->get_string_array(ctx_Sensors_Get_AllNames);
5389 }
5390
5394 int32_t Count() // getter
5395 {
5396 APIUtil::ErrorChecker error_checker(api_util);
5397 return ctx_Sensors_Get_Count(ctx);
5398 }
5399
5403 int32_t First() // getter
5404 {
5405 APIUtil::ErrorChecker error_checker(api_util);
5406 return ctx_Sensors_Get_First(ctx);
5407 }
5408
5412 string Name() // getter
5413 {
5414 APIUtil::ErrorChecker error_checker(api_util);
5415 return ctx_Sensors_Get_Name(ctx);
5416 }
5417
5421 ISensors& Name(const char *value)
5422 {
5423 APIUtil::ErrorChecker error_checker(api_util);
5424 ctx_Sensors_Set_Name(ctx, value);
5425 return *this;
5426 }
5427 ISensors& Name(const string &value)
5428 {
5429 return Name(value.c_str());
5430 }
5431
5435 int32_t Next() // getter
5436 {
5437 APIUtil::ErrorChecker error_checker(api_util);
5438 return ctx_Sensors_Get_Next(ctx);
5439 }
5440
5444 int32_t idx() // getter
5445 {
5446 APIUtil::ErrorChecker error_checker(api_util);
5447 return ctx_Sensors_Get_idx(ctx);
5448 }
5449
5453 void idx(int32_t value) // setter
5454 {
5455 APIUtil::ErrorChecker error_checker(api_util);
5456 ctx_Sensors_Set_idx(ctx, value);
5457 }
5458 void Reset()
5459 {
5460 APIUtil::ErrorChecker error_checker(api_util);
5461 ctx_Sensors_Reset(ctx);
5462 }
5463 void ResetAll()
5464 {
5465 APIUtil::ErrorChecker error_checker(api_util);
5466 ctx_Sensors_ResetAll(ctx);
5467 }
5468
5472 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5473 VectorT Currents() // getter
5474 {
5475 APIUtil::ErrorChecker error_checker(api_util);
5476 ctx_Sensors_Get_Currents_GR(ctx);
5477 return api_util->get_float64_gr_array<VectorT>();
5478 }
5479 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5480 ISensors& Currents(const VectorT &value) // setter
5481 {
5482 APIUtil::ErrorChecker error_checker(api_util);
5483 ctx_Sensors_Set_Currents(ctx, &value[0], value.size());
5484 return *this;
5485 }
5486
5490 bool IsDelta() // getter
5491 {
5492 APIUtil::ErrorChecker error_checker(api_util);
5493 return (ctx_Sensors_Get_IsDelta(ctx) != 0);
5494 }
5495 ISensors& IsDelta(bool value) // setter
5496 {
5497 APIUtil::ErrorChecker error_checker(api_util);
5498 ctx_Sensors_Set_IsDelta(ctx, value);
5499 return *this;
5500 }
5501
5505 string MeteredElement() // getter
5506 {
5507 APIUtil::ErrorChecker error_checker(api_util);
5508 return ctx_Sensors_Get_MeteredElement(ctx);
5509 }
5510 ISensors& MeteredElement(const char *value) // setter
5511 {
5512 APIUtil::ErrorChecker error_checker(api_util);
5513 ctx_Sensors_Set_MeteredElement(ctx, value);
5514 return *this;
5515 }
5516 ISensors& MeteredElement(const string &value) // setter
5517 {
5518 APIUtil::ErrorChecker error_checker(api_util);
5519 ctx_Sensors_Set_MeteredElement(ctx, value.c_str());
5520 return *this;
5521 }
5522
5526 int32_t MeteredTerminal() // getter
5527 {
5528 APIUtil::ErrorChecker error_checker(api_util);
5529 return ctx_Sensors_Get_MeteredTerminal(ctx);
5530 }
5531 ISensors& MeteredTerminal(int32_t value) // setter
5532 {
5533 APIUtil::ErrorChecker error_checker(api_util);
5534 ctx_Sensors_Set_MeteredTerminal(ctx, value);
5535 return *this;
5536 }
5537
5541 double PctError() // getter
5542 {
5543 APIUtil::ErrorChecker error_checker(api_util);
5544 return ctx_Sensors_Get_PctError(ctx);
5545 }
5546 ISensors& PctError(double value) // setter
5547 {
5548 APIUtil::ErrorChecker error_checker(api_util);
5549 ctx_Sensors_Set_PctError(ctx, value);
5550 return *this;
5551 }
5552
5556 bool ReverseDelta() // getter
5557 {
5558 APIUtil::ErrorChecker error_checker(api_util);
5559 return (ctx_Sensors_Get_ReverseDelta(ctx) != 0);
5560 }
5561 ISensors& ReverseDelta(bool value) // setter
5562 {
5563 APIUtil::ErrorChecker error_checker(api_util);
5564 ctx_Sensors_Set_ReverseDelta(ctx, value);
5565 return *this;
5566 }
5567
5571 double Weight() // getter
5572 {
5573 APIUtil::ErrorChecker error_checker(api_util);
5574 return ctx_Sensors_Get_Weight(ctx);
5575 }
5576 ISensors& Weight(double value) // setter
5577 {
5578 APIUtil::ErrorChecker error_checker(api_util);
5579 ctx_Sensors_Set_Weight(ctx, value);
5580 return *this;
5581 }
5582
5586 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5587 VectorT kVARS() // getter
5588 {
5589 APIUtil::ErrorChecker error_checker(api_util);
5590 ctx_Sensors_Get_kVARS_GR(ctx);
5591 return api_util->get_float64_gr_array<VectorT>();
5592 }
5593 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5594 ISensors& kVARS(const VectorT &value) // setter
5595 {
5596 APIUtil::ErrorChecker error_checker(api_util);
5597 ctx_Sensors_Set_kVARS(ctx, &value[0], value.size());
5598 return *this;
5599 }
5600
5604 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5605 VectorT kVS() // getter
5606 {
5607 APIUtil::ErrorChecker error_checker(api_util);
5608 ctx_Sensors_Get_kVS_GR(ctx);
5609 return api_util->get_float64_gr_array<VectorT>();
5610 }
5611 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5612 ISensors& kVS(const VectorT &value) // setter
5613 {
5614 APIUtil::ErrorChecker error_checker(api_util);
5615 ctx_Sensors_Set_kVS(ctx, &value[0], value.size());
5616 return *this;
5617 }
5618
5622 double kVbase() // getter
5623 {
5624 APIUtil::ErrorChecker error_checker(api_util);
5625 return ctx_Sensors_Get_kVbase(ctx);
5626 }
5627 ISensors& kVbase(double value) // setter
5628 {
5629 APIUtil::ErrorChecker error_checker(api_util);
5630 ctx_Sensors_Set_kVbase(ctx, value);
5631 return *this;
5632 }
5633
5637 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5638 VectorT kWS() // getter
5639 {
5640 APIUtil::ErrorChecker error_checker(api_util);
5641 ctx_Sensors_Get_kWS_GR(ctx);
5642 return api_util->get_float64_gr_array<VectorT>();
5643 }
5644 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5645 ISensors& kWS(const VectorT &value) // setter
5646 {
5647 APIUtil::ErrorChecker error_checker(api_util);
5648 ctx_Sensors_Set_kWS(ctx, &value[0], value.size());
5649 return *this;
5650 }
5651
5655 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
5656 VectorT AllocationFactor() // getter
5657 {
5658 APIUtil::ErrorChecker error_checker(api_util);
5659 ctx_Sensors_Get_AllocationFactor_GR(ctx);
5660 return api_util->get_float64_gr_array<VectorT>();
5661 }
5662 };
5663
5665 {
5666 public:
5667
5668 ISwtControls(dss::APIUtil *util) :
5669 ContextState(util)
5670 {
5671 }
5672
5676 strings AllNames() // getter
5677 {
5678 APIUtil::ErrorChecker error_checker(api_util);
5679 return api_util->get_string_array(ctx_SwtControls_Get_AllNames);
5680 }
5681
5685 int32_t Count() // getter
5686 {
5687 APIUtil::ErrorChecker error_checker(api_util);
5688 return ctx_SwtControls_Get_Count(ctx);
5689 }
5690
5694 int32_t First() // getter
5695 {
5696 APIUtil::ErrorChecker error_checker(api_util);
5697 return ctx_SwtControls_Get_First(ctx);
5698 }
5699
5703 string Name() // getter
5704 {
5705 APIUtil::ErrorChecker error_checker(api_util);
5706 return ctx_SwtControls_Get_Name(ctx);
5707 }
5708
5712 ISwtControls& Name(const char *value)
5713 {
5714 APIUtil::ErrorChecker error_checker(api_util);
5715 ctx_SwtControls_Set_Name(ctx, value);
5716 return *this;
5717 }
5718 ISwtControls& Name(const string &value)
5719 {
5720 return Name(value.c_str());
5721 }
5722
5726 int32_t Next() // getter
5727 {
5728 APIUtil::ErrorChecker error_checker(api_util);
5729 return ctx_SwtControls_Get_Next(ctx);
5730 }
5731
5735 int32_t idx() // getter
5736 {
5737 APIUtil::ErrorChecker error_checker(api_util);
5738 return ctx_SwtControls_Get_idx(ctx);
5739 }
5740
5744 void idx(int32_t value) // setter
5745 {
5746 APIUtil::ErrorChecker error_checker(api_util);
5747 ctx_SwtControls_Set_idx(ctx, value);
5748 }
5749 void Reset()
5750 {
5751 APIUtil::ErrorChecker error_checker(api_util);
5752 ctx_SwtControls_Reset(ctx);
5753 }
5754
5758 int32_t Action() // getter
5759 {
5760 APIUtil::ErrorChecker error_checker(api_util);
5761 return ctx_SwtControls_Get_Action(ctx);
5762 }
5763 ISwtControls& Action(int32_t value) // setter
5764 {
5765 APIUtil::ErrorChecker error_checker(api_util);
5766 ctx_SwtControls_Set_Action(ctx, value);
5767 return *this;
5768 }
5769
5773 double Delay() // getter
5774 {
5775 APIUtil::ErrorChecker error_checker(api_util);
5776 return ctx_SwtControls_Get_Delay(ctx);
5777 }
5778 ISwtControls& Delay(double value) // setter
5779 {
5780 APIUtil::ErrorChecker error_checker(api_util);
5781 ctx_SwtControls_Set_Delay(ctx, value);
5782 return *this;
5783 }
5784
5788 bool IsLocked() // getter
5789 {
5790 APIUtil::ErrorChecker error_checker(api_util);
5791 return (ctx_SwtControls_Get_IsLocked(ctx) != 0);
5792 }
5793 ISwtControls& IsLocked(bool value) // setter
5794 {
5795 APIUtil::ErrorChecker error_checker(api_util);
5796 ctx_SwtControls_Set_IsLocked(ctx, value);
5797 return *this;
5798 }
5799
5803 int32_t NormalState() // getter
5804 {
5805 APIUtil::ErrorChecker error_checker(api_util);
5806 return ctx_SwtControls_Get_NormalState(ctx);
5807 }
5808 ISwtControls& NormalState(int32_t value) // setter
5809 {
5810 APIUtil::ErrorChecker error_checker(api_util);
5811 ctx_SwtControls_Set_NormalState(ctx, value);
5812 return *this;
5813 }
5814
5818 int32_t State() // getter
5819 {
5820 APIUtil::ErrorChecker error_checker(api_util);
5821 return ctx_SwtControls_Get_State(ctx);
5822 }
5823 ISwtControls& State(int32_t value) // setter
5824 {
5825 APIUtil::ErrorChecker error_checker(api_util);
5826 ctx_SwtControls_Set_State(ctx, value);
5827 return *this;
5828 }
5829
5833 string SwitchedObj() // getter
5834 {
5835 APIUtil::ErrorChecker error_checker(api_util);
5836 return ctx_SwtControls_Get_SwitchedObj(ctx);
5837 }
5838 ISwtControls& SwitchedObj(const char *value) // setter
5839 {
5840 APIUtil::ErrorChecker error_checker(api_util);
5841 ctx_SwtControls_Set_SwitchedObj(ctx, value);
5842 return *this;
5843 }
5844 ISwtControls& SwitchedObj(const string &value) // setter
5845 {
5846 APIUtil::ErrorChecker error_checker(api_util);
5847 ctx_SwtControls_Set_SwitchedObj(ctx, value.c_str());
5848 return *this;
5849 }
5850
5854 int32_t SwitchedTerm() // getter
5855 {
5856 APIUtil::ErrorChecker error_checker(api_util);
5857 return ctx_SwtControls_Get_SwitchedTerm(ctx);
5858 }
5859 ISwtControls& SwitchedTerm(int32_t value) // setter
5860 {
5861 APIUtil::ErrorChecker error_checker(api_util);
5862 ctx_SwtControls_Set_SwitchedTerm(ctx, value);
5863 return *this;
5864 }
5865 };
5866
5867 class ITSData: public ContextState
5868 {
5869 public:
5870
5871 ITSData(dss::APIUtil *util) :
5872 ContextState(util)
5873 {
5874 }
5875
5879 strings AllNames() // getter
5880 {
5881 APIUtil::ErrorChecker error_checker(api_util);
5882 return api_util->get_string_array(ctx_TSData_Get_AllNames);
5883 }
5884
5888 int32_t Count() // getter
5889 {
5890 APIUtil::ErrorChecker error_checker(api_util);
5891 return ctx_TSData_Get_Count(ctx);
5892 }
5893
5897 int32_t First() // getter
5898 {
5899 APIUtil::ErrorChecker error_checker(api_util);
5900 return ctx_TSData_Get_First(ctx);
5901 }
5902
5906 string Name() // getter
5907 {
5908 APIUtil::ErrorChecker error_checker(api_util);
5909 return ctx_TSData_Get_Name(ctx);
5910 }
5911
5915 ITSData& Name(const char *value)
5916 {
5917 APIUtil::ErrorChecker error_checker(api_util);
5918 ctx_TSData_Set_Name(ctx, value);
5919 return *this;
5920 }
5921 ITSData& Name(const string &value)
5922 {
5923 return Name(value.c_str());
5924 }
5925
5929 int32_t Next() // getter
5930 {
5931 APIUtil::ErrorChecker error_checker(api_util);
5932 return ctx_TSData_Get_Next(ctx);
5933 }
5934
5938 int32_t idx() // getter
5939 {
5940 APIUtil::ErrorChecker error_checker(api_util);
5941 return ctx_TSData_Get_idx(ctx);
5942 }
5943
5947 void idx(int32_t value) // setter
5948 {
5949 APIUtil::ErrorChecker error_checker(api_util);
5950 ctx_TSData_Set_idx(ctx, value);
5951 }
5952
5956 double EmergAmps() // getter
5957 {
5958 APIUtil::ErrorChecker error_checker(api_util);
5959 return ctx_TSData_Get_EmergAmps(ctx);
5960 }
5961 ITSData& EmergAmps(double value) // setter
5962 {
5963 APIUtil::ErrorChecker error_checker(api_util);
5964 ctx_TSData_Set_EmergAmps(ctx, value);
5965 return *this;
5966 }
5967
5971 double NormAmps() // getter
5972 {
5973 APIUtil::ErrorChecker error_checker(api_util);
5974 return ctx_TSData_Get_NormAmps(ctx);
5975 }
5976 ITSData& NormAmps(double value) // setter
5977 {
5978 APIUtil::ErrorChecker error_checker(api_util);
5979 ctx_TSData_Set_NormAmps(ctx, value);
5980 return *this;
5981 }
5982
5983 double Rdc() // getter
5984 {
5985 APIUtil::ErrorChecker error_checker(api_util);
5986 return ctx_TSData_Get_Rdc(ctx);
5987 }
5988 ITSData& Rdc(double value) // setter
5989 {
5990 APIUtil::ErrorChecker error_checker(api_util);
5991 ctx_TSData_Set_Rdc(ctx, value);
5992 return *this;
5993 }
5994
5995 double Rac() // getter
5996 {
5997 APIUtil::ErrorChecker error_checker(api_util);
5998 return ctx_TSData_Get_Rac(ctx);
5999 }
6000 ITSData& Rac(double value) // setter
6001 {
6002 APIUtil::ErrorChecker error_checker(api_util);
6003 ctx_TSData_Set_Rac(ctx, value);
6004 return *this;
6005 }
6006
6007 double GMRac() // getter
6008 {
6009 APIUtil::ErrorChecker error_checker(api_util);
6010 return ctx_TSData_Get_GMRac(ctx);
6011 }
6012 ITSData& GMRac(double value) // setter
6013 {
6014 APIUtil::ErrorChecker error_checker(api_util);
6015 ctx_TSData_Set_GMRac(ctx, value);
6016 return *this;
6017 }
6018
6019 int32_t GMRUnits() // getter
6020 {
6021 APIUtil::ErrorChecker error_checker(api_util);
6022 return ctx_TSData_Get_GMRUnits(ctx);
6023 }
6024 ITSData& GMRUnits(int32_t value) // setter
6025 {
6026 APIUtil::ErrorChecker error_checker(api_util);
6027 ctx_TSData_Set_GMRUnits(ctx, value);
6028 return *this;
6029 }
6030
6031 double Radius() // getter
6032 {
6033 APIUtil::ErrorChecker error_checker(api_util);
6034 return ctx_TSData_Get_Radius(ctx);
6035 }
6036 ITSData& Radius(double value) // setter
6037 {
6038 APIUtil::ErrorChecker error_checker(api_util);
6039 ctx_TSData_Set_Radius(ctx, value);
6040 return *this;
6041 }
6042
6043 int32_t RadiusUnits() // getter
6044 {
6045 APIUtil::ErrorChecker error_checker(api_util);
6046 return ctx_TSData_Get_RadiusUnits(ctx);
6047 }
6048 ITSData& RadiusUnits(int32_t value) // setter
6049 {
6050 APIUtil::ErrorChecker error_checker(api_util);
6051 ctx_TSData_Set_RadiusUnits(ctx, value);
6052 return *this;
6053 }
6054
6055 int32_t ResistanceUnits() // getter
6056 {
6057 APIUtil::ErrorChecker error_checker(api_util);
6058 return ctx_TSData_Get_ResistanceUnits(ctx);
6059 }
6060 ITSData& ResistanceUnits(int32_t value) // setter
6061 {
6062 APIUtil::ErrorChecker error_checker(api_util);
6063 ctx_TSData_Set_ResistanceUnits(ctx, value);
6064 return *this;
6065 }
6066
6067 double Diameter() // getter
6068 {
6069 APIUtil::ErrorChecker error_checker(api_util);
6070 return ctx_TSData_Get_Diameter(ctx);
6071 }
6072 ITSData& Diameter(double value) // setter
6073 {
6074 APIUtil::ErrorChecker error_checker(api_util);
6075 ctx_TSData_Set_Diameter(ctx, value);
6076 return *this;
6077 }
6078
6079 double EpsR() // getter
6080 {
6081 APIUtil::ErrorChecker error_checker(api_util);
6082 return ctx_TSData_Get_EpsR(ctx);
6083 }
6084 ITSData& EpsR(double value) // setter
6085 {
6086 APIUtil::ErrorChecker error_checker(api_util);
6087 ctx_TSData_Set_EpsR(ctx, value);
6088 return *this;
6089 }
6090
6091 double InsLayer() // getter
6092 {
6093 APIUtil::ErrorChecker error_checker(api_util);
6094 return ctx_TSData_Get_InsLayer(ctx);
6095 }
6096 ITSData& InsLayer(double value) // setter
6097 {
6098 APIUtil::ErrorChecker error_checker(api_util);
6099 ctx_TSData_Set_InsLayer(ctx, value);
6100 return *this;
6101 }
6102
6103 double DiaIns() // getter
6104 {
6105 APIUtil::ErrorChecker error_checker(api_util);
6106 return ctx_TSData_Get_DiaIns(ctx);
6107 }
6108 ITSData& DiaIns(double value) // setter
6109 {
6110 APIUtil::ErrorChecker error_checker(api_util);
6111 ctx_TSData_Set_DiaIns(ctx, value);
6112 return *this;
6113 }
6114
6115 double DiaCable() // getter
6116 {
6117 APIUtil::ErrorChecker error_checker(api_util);
6118 return ctx_TSData_Get_DiaCable(ctx);
6119 }
6120 ITSData& DiaCable(double value) // setter
6121 {
6122 APIUtil::ErrorChecker error_checker(api_util);
6123 ctx_TSData_Set_DiaCable(ctx, value);
6124 return *this;
6125 }
6126
6127 double DiaShield() // getter
6128 {
6129 APIUtil::ErrorChecker error_checker(api_util);
6130 return ctx_TSData_Get_DiaShield(ctx);
6131 }
6132 ITSData& DiaShield(double value) // setter
6133 {
6134 APIUtil::ErrorChecker error_checker(api_util);
6135 ctx_TSData_Set_DiaShield(ctx, value);
6136 return *this;
6137 }
6138
6139 double TapeLayer() // getter
6140 {
6141 APIUtil::ErrorChecker error_checker(api_util);
6142 return ctx_TSData_Get_TapeLayer(ctx);
6143 }
6144 ITSData& TapeLayer(double value) // setter
6145 {
6146 APIUtil::ErrorChecker error_checker(api_util);
6147 ctx_TSData_Set_TapeLayer(ctx, value);
6148 return *this;
6149 }
6150
6151 double TapeLap() // getter
6152 {
6153 APIUtil::ErrorChecker error_checker(api_util);
6154 return ctx_TSData_Get_TapeLap(ctx);
6155 }
6156 ITSData& TapeLap(double value) // setter
6157 {
6158 APIUtil::ErrorChecker error_checker(api_util);
6159 ctx_TSData_Set_TapeLap(ctx, value);
6160 return *this;
6161 }
6162 };
6163
6164 class IText: public ContextState
6165 {
6166 public:
6167
6168 IText(dss::APIUtil *util) :
6169 ContextState(util)
6170 {
6171 }
6172
6177 void Commands(const string &value)
6178 {
6179 APIUtil::ErrorChecker error_checker(api_util);
6180 ctx_Text_CommandBlock(ctx, value.c_str());
6181 }
6182
6187 void Commands(const strings &value)
6188 {
6189 APIUtil::ErrorChecker error_checker(api_util);
6190 api_util->set_string_array(ctx_Text_CommandArray, value);
6191 }
6192
6196 string Command() // getter
6197 {
6198 APIUtil::ErrorChecker error_checker(api_util);
6199 return ctx_Text_Get_Command(ctx);
6200 }
6201 IText& Command(const char *value) // setter
6202 {
6203 APIUtil::ErrorChecker error_checker(api_util);
6204 ctx_Text_Set_Command(ctx, value);
6205 return *this;
6206 }
6207 IText& Command(const string &value) // setter
6208 {
6209 APIUtil::ErrorChecker error_checker(api_util);
6210 ctx_Text_Set_Command(ctx, value.c_str());
6211 return *this;
6212 }
6213
6217 string Result() // getter
6218 {
6219 APIUtil::ErrorChecker error_checker(api_util);
6220 return ctx_Text_Get_Result(ctx);
6221 }
6222 };
6223
6225 {
6226 public:
6227
6228 ITopology(dss::APIUtil *util) :
6229 ContextState(util)
6230 {
6231 }
6232
6236 int32_t ActiveBranch() // getter
6237 {
6238 APIUtil::ErrorChecker error_checker(api_util);
6239 return ctx_Topology_Get_ActiveBranch(ctx);
6240 }
6241
6245 int32_t ActiveLevel() // getter
6246 {
6247 APIUtil::ErrorChecker error_checker(api_util);
6248 return ctx_Topology_Get_ActiveLevel(ctx);
6249 }
6250
6254 strings AllIsolatedBranches() // getter
6255 {
6256 APIUtil::ErrorChecker error_checker(api_util);
6257 return api_util->get_string_array(ctx_Topology_Get_AllIsolatedBranches);
6258 }
6259
6263 strings AllIsolatedLoads() // getter
6264 {
6265 APIUtil::ErrorChecker error_checker(api_util);
6266 return api_util->get_string_array(ctx_Topology_Get_AllIsolatedLoads);
6267 }
6268
6272 strings AllLoopedPairs() // getter
6273 {
6274 APIUtil::ErrorChecker error_checker(api_util);
6275 return api_util->get_string_array(ctx_Topology_Get_AllLoopedPairs);
6276 }
6277
6281 int32_t BackwardBranch() // getter
6282 {
6283 APIUtil::ErrorChecker error_checker(api_util);
6284 return ctx_Topology_Get_BackwardBranch(ctx);
6285 }
6286
6290 string BranchName() // getter
6291 {
6292 APIUtil::ErrorChecker error_checker(api_util);
6293 return ctx_Topology_Get_BranchName(ctx);
6294 }
6295 ITopology& BranchName(const char *value) // setter
6296 {
6297 APIUtil::ErrorChecker error_checker(api_util);
6298 ctx_Topology_Set_BranchName(ctx, value);
6299 return *this;
6300 }
6301 ITopology& BranchName(const string &value) // setter
6302 {
6303 APIUtil::ErrorChecker error_checker(api_util);
6304 ctx_Topology_Set_BranchName(ctx, value.c_str());
6305 return *this;
6306 }
6307
6311 string BusName() // getter
6312 {
6313 APIUtil::ErrorChecker error_checker(api_util);
6314 return ctx_Topology_Get_BusName(ctx);
6315 }
6316 ITopology& BusName(const char *value) // setter
6317 {
6318 APIUtil::ErrorChecker error_checker(api_util);
6319 ctx_Topology_Set_BusName(ctx, value);
6320 return *this;
6321 }
6322 ITopology& BusName(const string &value) // setter
6323 {
6324 APIUtil::ErrorChecker error_checker(api_util);
6325 ctx_Topology_Set_BusName(ctx, value.c_str());
6326 return *this;
6327 }
6328
6332 int32_t First() // getter
6333 {
6334 APIUtil::ErrorChecker error_checker(api_util);
6335 return ctx_Topology_Get_First(ctx);
6336 }
6337
6341 int32_t FirstLoad() // getter
6342 {
6343 APIUtil::ErrorChecker error_checker(api_util);
6344 return ctx_Topology_Get_FirstLoad(ctx);
6345 }
6346
6350 int32_t ForwardBranch() // getter
6351 {
6352 APIUtil::ErrorChecker error_checker(api_util);
6353 return ctx_Topology_Get_ForwardBranch(ctx);
6354 }
6355
6359 int32_t LoopedBranch() // getter
6360 {
6361 APIUtil::ErrorChecker error_checker(api_util);
6362 return ctx_Topology_Get_LoopedBranch(ctx);
6363 }
6364
6368 int32_t Next() // getter
6369 {
6370 APIUtil::ErrorChecker error_checker(api_util);
6371 return ctx_Topology_Get_Next(ctx);
6372 }
6373
6377 int32_t NextLoad() // getter
6378 {
6379 APIUtil::ErrorChecker error_checker(api_util);
6380 return ctx_Topology_Get_NextLoad(ctx);
6381 }
6382
6386 int32_t NumIsolatedBranches() // getter
6387 {
6388 APIUtil::ErrorChecker error_checker(api_util);
6389 return ctx_Topology_Get_NumIsolatedBranches(ctx);
6390 }
6391
6395 int32_t NumIsolatedLoads() // getter
6396 {
6397 APIUtil::ErrorChecker error_checker(api_util);
6398 return ctx_Topology_Get_NumIsolatedLoads(ctx);
6399 }
6400
6404 int32_t NumLoops() // getter
6405 {
6406 APIUtil::ErrorChecker error_checker(api_util);
6407 return ctx_Topology_Get_NumLoops(ctx);
6408 }
6409
6413 int32_t ParallelBranch() // getter
6414 {
6415 APIUtil::ErrorChecker error_checker(api_util);
6416 return ctx_Topology_Get_ParallelBranch(ctx);
6417 }
6418 };
6419
6421 {
6422 public:
6423
6425 ContextState(util)
6426 {
6427 }
6428
6432 strings AllNames() // getter
6433 {
6434 APIUtil::ErrorChecker error_checker(api_util);
6435 return api_util->get_string_array(ctx_Transformers_Get_AllNames);
6436 }
6437
6441 int32_t Count() // getter
6442 {
6443 APIUtil::ErrorChecker error_checker(api_util);
6444 return ctx_Transformers_Get_Count(ctx);
6445 }
6446
6450 int32_t First() // getter
6451 {
6452 APIUtil::ErrorChecker error_checker(api_util);
6453 return ctx_Transformers_Get_First(ctx);
6454 }
6455
6459 string Name() // getter
6460 {
6461 APIUtil::ErrorChecker error_checker(api_util);
6462 return ctx_Transformers_Get_Name(ctx);
6463 }
6464
6468 ITransformers& Name(const char *value)
6469 {
6470 APIUtil::ErrorChecker error_checker(api_util);
6471 ctx_Transformers_Set_Name(ctx, value);
6472 return *this;
6473 }
6474 ITransformers& Name(const string &value)
6475 {
6476 return Name(value.c_str());
6477 }
6478
6482 int32_t Next() // getter
6483 {
6484 APIUtil::ErrorChecker error_checker(api_util);
6485 return ctx_Transformers_Get_Next(ctx);
6486 }
6487
6491 int32_t idx() // getter
6492 {
6493 APIUtil::ErrorChecker error_checker(api_util);
6494 return ctx_Transformers_Get_idx(ctx);
6495 }
6496
6500 void idx(int32_t value) // setter
6501 {
6502 APIUtil::ErrorChecker error_checker(api_util);
6503 ctx_Transformers_Set_idx(ctx, value);
6504 }
6505
6509 bool IsDelta() // getter
6510 {
6511 APIUtil::ErrorChecker error_checker(api_util);
6512 return (ctx_Transformers_Get_IsDelta(ctx) != 0);
6513 }
6514 ITransformers& IsDelta(bool value) // setter
6515 {
6516 APIUtil::ErrorChecker error_checker(api_util);
6517 ctx_Transformers_Set_IsDelta(ctx, value);
6518 return *this;
6519 }
6520
6524 double MaxTap() // getter
6525 {
6526 APIUtil::ErrorChecker error_checker(api_util);
6527 return ctx_Transformers_Get_MaxTap(ctx);
6528 }
6529 ITransformers& MaxTap(double value) // setter
6530 {
6531 APIUtil::ErrorChecker error_checker(api_util);
6532 ctx_Transformers_Set_MaxTap(ctx, value);
6533 return *this;
6534 }
6535
6539 double MinTap() // getter
6540 {
6541 APIUtil::ErrorChecker error_checker(api_util);
6542 return ctx_Transformers_Get_MinTap(ctx);
6543 }
6544 ITransformers& MinTap(double value) // setter
6545 {
6546 APIUtil::ErrorChecker error_checker(api_util);
6547 ctx_Transformers_Set_MinTap(ctx, value);
6548 return *this;
6549 }
6550
6554 int32_t NumTaps() // getter
6555 {
6556 APIUtil::ErrorChecker error_checker(api_util);
6557 return ctx_Transformers_Get_NumTaps(ctx);
6558 }
6559 ITransformers& NumTaps(int32_t value) // setter
6560 {
6561 APIUtil::ErrorChecker error_checker(api_util);
6562 ctx_Transformers_Set_NumTaps(ctx, value);
6563 return *this;
6564 }
6565
6569 int32_t NumWindings() // getter
6570 {
6571 APIUtil::ErrorChecker error_checker(api_util);
6572 return ctx_Transformers_Get_NumWindings(ctx);
6573 }
6574 ITransformers& NumWindings(int32_t value) // setter
6575 {
6576 APIUtil::ErrorChecker error_checker(api_util);
6577 ctx_Transformers_Set_NumWindings(ctx, value);
6578 return *this;
6579 }
6580
6584 double R() // getter
6585 {
6586 APIUtil::ErrorChecker error_checker(api_util);
6587 return ctx_Transformers_Get_R(ctx);
6588 }
6589 ITransformers& R(double value) // setter
6590 {
6591 APIUtil::ErrorChecker error_checker(api_util);
6592 ctx_Transformers_Set_R(ctx, value);
6593 return *this;
6594 }
6595
6599 double Rneut() // getter
6600 {
6601 APIUtil::ErrorChecker error_checker(api_util);
6602 return ctx_Transformers_Get_Rneut(ctx);
6603 }
6604 ITransformers& Rneut(double value) // setter
6605 {
6606 APIUtil::ErrorChecker error_checker(api_util);
6607 ctx_Transformers_Set_Rneut(ctx, value);
6608 return *this;
6609 }
6610
6614 double Tap() // getter
6615 {
6616 APIUtil::ErrorChecker error_checker(api_util);
6617 return ctx_Transformers_Get_Tap(ctx);
6618 }
6619 ITransformers& Tap(double value) // setter
6620 {
6621 APIUtil::ErrorChecker error_checker(api_util);
6622 ctx_Transformers_Set_Tap(ctx, value);
6623 return *this;
6624 }
6625
6629 int32_t Wdg() // getter
6630 {
6631 APIUtil::ErrorChecker error_checker(api_util);
6632 return ctx_Transformers_Get_Wdg(ctx);
6633 }
6634 ITransformers& Wdg(int32_t value) // setter
6635 {
6636 APIUtil::ErrorChecker error_checker(api_util);
6637 ctx_Transformers_Set_Wdg(ctx, value);
6638 return *this;
6639 }
6640
6644 string XfmrCode() // getter
6645 {
6646 APIUtil::ErrorChecker error_checker(api_util);
6647 return ctx_Transformers_Get_XfmrCode(ctx);
6648 }
6649 ITransformers& XfmrCode(const char *value) // setter
6650 {
6651 APIUtil::ErrorChecker error_checker(api_util);
6652 ctx_Transformers_Set_XfmrCode(ctx, value);
6653 return *this;
6654 }
6655 ITransformers& XfmrCode(const string &value) // setter
6656 {
6657 APIUtil::ErrorChecker error_checker(api_util);
6658 ctx_Transformers_Set_XfmrCode(ctx, value.c_str());
6659 return *this;
6660 }
6661
6665 double Xhl() // getter
6666 {
6667 APIUtil::ErrorChecker error_checker(api_util);
6668 return ctx_Transformers_Get_Xhl(ctx);
6669 }
6670 ITransformers& Xhl(double value) // setter
6671 {
6672 APIUtil::ErrorChecker error_checker(api_util);
6673 ctx_Transformers_Set_Xhl(ctx, value);
6674 return *this;
6675 }
6676
6680 double Xht() // getter
6681 {
6682 APIUtil::ErrorChecker error_checker(api_util);
6683 return ctx_Transformers_Get_Xht(ctx);
6684 }
6685 ITransformers& Xht(double value) // setter
6686 {
6687 APIUtil::ErrorChecker error_checker(api_util);
6688 ctx_Transformers_Set_Xht(ctx, value);
6689 return *this;
6690 }
6691
6695 double Xlt() // getter
6696 {
6697 APIUtil::ErrorChecker error_checker(api_util);
6698 return ctx_Transformers_Get_Xlt(ctx);
6699 }
6700 ITransformers& Xlt(double value) // setter
6701 {
6702 APIUtil::ErrorChecker error_checker(api_util);
6703 ctx_Transformers_Set_Xlt(ctx, value);
6704 return *this;
6705 }
6706
6710 double Xneut() // getter
6711 {
6712 APIUtil::ErrorChecker error_checker(api_util);
6713 return ctx_Transformers_Get_Xneut(ctx);
6714 }
6715 ITransformers& Xneut(double value) // setter
6716 {
6717 APIUtil::ErrorChecker error_checker(api_util);
6718 ctx_Transformers_Set_Xneut(ctx, value);
6719 return *this;
6720 }
6721
6725 double kV() // getter
6726 {
6727 APIUtil::ErrorChecker error_checker(api_util);
6728 return ctx_Transformers_Get_kV(ctx);
6729 }
6730 ITransformers& kV(double value) // setter
6731 {
6732 APIUtil::ErrorChecker error_checker(api_util);
6733 ctx_Transformers_Set_kV(ctx, value);
6734 return *this;
6735 }
6736
6740 double kVA() // getter
6741 {
6742 APIUtil::ErrorChecker error_checker(api_util);
6743 return ctx_Transformers_Get_kVA(ctx);
6744 }
6745 ITransformers& kVA(double value) // setter
6746 {
6747 APIUtil::ErrorChecker error_checker(api_util);
6748 ctx_Transformers_Set_kVA(ctx, value);
6749 return *this;
6750 }
6751
6755 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
6756 VectorT WdgVoltages() // getter
6757 {
6758 APIUtil::ErrorChecker error_checker(api_util);
6759 ctx_Transformers_Get_WdgVoltages_GR(ctx);
6760 return api_util->get_float64_gr_array<VectorT>();
6761 }
6762
6766 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
6767 VectorT WdgCurrents() // getter
6768 {
6769 APIUtil::ErrorChecker error_checker(api_util);
6770 ctx_Transformers_Get_WdgCurrents_GR(ctx);
6771 return api_util->get_float64_gr_array<VectorT>();
6772 }
6773
6777 string strWdgCurrents() // getter
6778 {
6779 APIUtil::ErrorChecker error_checker(api_util);
6780 return ctx_Transformers_Get_strWdgCurrents(ctx);
6781 }
6782
6786 int32_t CoreType() // getter
6787 {
6788 APIUtil::ErrorChecker error_checker(api_util);
6789 return ctx_Transformers_Get_CoreType(ctx);
6790 }
6791 ITransformers& CoreType(int32_t value) // setter
6792 {
6793 APIUtil::ErrorChecker error_checker(api_util);
6794 ctx_Transformers_Set_CoreType(ctx, value);
6795 return *this;
6796 }
6797
6801 double RdcOhms() // getter
6802 {
6803 APIUtil::ErrorChecker error_checker(api_util);
6804 return ctx_Transformers_Get_RdcOhms(ctx);
6805 }
6806 ITransformers& RdcOhms(double value) // setter
6807 {
6808 APIUtil::ErrorChecker error_checker(api_util);
6809 ctx_Transformers_Set_RdcOhms(ctx, value);
6810 return *this;
6811 }
6812
6816 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
6817 VectorT LossesByType() // getter
6818 {
6819 APIUtil::ErrorChecker error_checker(api_util);
6820 ctx_Transformers_Get_LossesByType_GR(ctx);
6821 return api_util->get_float64_gr_array<VectorT>();
6822 }
6823
6827 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
6828 VectorT AllLossesByType() // getter
6829 {
6830 APIUtil::ErrorChecker error_checker(api_util);
6831 ctx_Transformers_Get_AllLossesByType_GR(ctx);
6832 return api_util->get_float64_gr_array<VectorT>();
6833 }
6834 };
6835
6837 {
6838 public:
6839
6840 IVsources(dss::APIUtil *util) :
6841 ContextState(util)
6842 {
6843 }
6844
6848 strings AllNames() // getter
6849 {
6850 APIUtil::ErrorChecker error_checker(api_util);
6851 return api_util->get_string_array(ctx_Vsources_Get_AllNames);
6852 }
6853
6857 int32_t Count() // getter
6858 {
6859 APIUtil::ErrorChecker error_checker(api_util);
6860 return ctx_Vsources_Get_Count(ctx);
6861 }
6862
6866 int32_t First() // getter
6867 {
6868 APIUtil::ErrorChecker error_checker(api_util);
6869 return ctx_Vsources_Get_First(ctx);
6870 }
6871
6875 string Name() // getter
6876 {
6877 APIUtil::ErrorChecker error_checker(api_util);
6878 return ctx_Vsources_Get_Name(ctx);
6879 }
6880
6884 IVsources& Name(const char *value)
6885 {
6886 APIUtil::ErrorChecker error_checker(api_util);
6887 ctx_Vsources_Set_Name(ctx, value);
6888 return *this;
6889 }
6890 IVsources& Name(const string &value)
6891 {
6892 return Name(value.c_str());
6893 }
6894
6898 int32_t Next() // getter
6899 {
6900 APIUtil::ErrorChecker error_checker(api_util);
6901 return ctx_Vsources_Get_Next(ctx);
6902 }
6903
6907 int32_t idx() // getter
6908 {
6909 APIUtil::ErrorChecker error_checker(api_util);
6910 return ctx_Vsources_Get_idx(ctx);
6911 }
6912
6916 void idx(int32_t value) // setter
6917 {
6918 APIUtil::ErrorChecker error_checker(api_util);
6919 ctx_Vsources_Set_idx(ctx, value);
6920 }
6921
6925 double AngleDeg() // getter
6926 {
6927 APIUtil::ErrorChecker error_checker(api_util);
6928 return ctx_Vsources_Get_AngleDeg(ctx);
6929 }
6930 IVsources& AngleDeg(double value) // setter
6931 {
6932 APIUtil::ErrorChecker error_checker(api_util);
6933 ctx_Vsources_Set_AngleDeg(ctx, value);
6934 return *this;
6935 }
6936
6940 double BasekV() // getter
6941 {
6942 APIUtil::ErrorChecker error_checker(api_util);
6943 return ctx_Vsources_Get_BasekV(ctx);
6944 }
6945 IVsources& BasekV(double value) // setter
6946 {
6947 APIUtil::ErrorChecker error_checker(api_util);
6948 ctx_Vsources_Set_BasekV(ctx, value);
6949 return *this;
6950 }
6951
6955 double Frequency() // getter
6956 {
6957 APIUtil::ErrorChecker error_checker(api_util);
6958 return ctx_Vsources_Get_Frequency(ctx);
6959 }
6960 IVsources& Frequency(double value) // setter
6961 {
6962 APIUtil::ErrorChecker error_checker(api_util);
6963 ctx_Vsources_Set_Frequency(ctx, value);
6964 return *this;
6965 }
6966
6970 int32_t Phases() // getter
6971 {
6972 APIUtil::ErrorChecker error_checker(api_util);
6973 return ctx_Vsources_Get_Phases(ctx);
6974 }
6975 IVsources& Phases(int32_t value) // setter
6976 {
6977 APIUtil::ErrorChecker error_checker(api_util);
6978 ctx_Vsources_Set_Phases(ctx, value);
6979 return *this;
6980 }
6981
6985 double pu() // getter
6986 {
6987 APIUtil::ErrorChecker error_checker(api_util);
6988 return ctx_Vsources_Get_pu(ctx);
6989 }
6990 IVsources& pu(double value) // setter
6991 {
6992 APIUtil::ErrorChecker error_checker(api_util);
6993 ctx_Vsources_Set_pu(ctx, value);
6994 return *this;
6995 }
6996 };
6997
6999 {
7000 public:
7001
7002 IWireData(dss::APIUtil *util) :
7003 ContextState(util)
7004 {
7005 }
7006
7010 strings AllNames() // getter
7011 {
7012 APIUtil::ErrorChecker error_checker(api_util);
7013 return api_util->get_string_array(ctx_WireData_Get_AllNames);
7014 }
7015
7019 int32_t Count() // getter
7020 {
7021 APIUtil::ErrorChecker error_checker(api_util);
7022 return ctx_WireData_Get_Count(ctx);
7023 }
7024
7028 int32_t First() // getter
7029 {
7030 APIUtil::ErrorChecker error_checker(api_util);
7031 return ctx_WireData_Get_First(ctx);
7032 }
7033
7037 string Name() // getter
7038 {
7039 APIUtil::ErrorChecker error_checker(api_util);
7040 return ctx_WireData_Get_Name(ctx);
7041 }
7042
7046 IWireData& Name(const char *value)
7047 {
7048 APIUtil::ErrorChecker error_checker(api_util);
7049 ctx_WireData_Set_Name(ctx, value);
7050 return *this;
7051 }
7052 IWireData& Name(const string &value)
7053 {
7054 return Name(value.c_str());
7055 }
7056
7060 int32_t Next() // getter
7061 {
7062 APIUtil::ErrorChecker error_checker(api_util);
7063 return ctx_WireData_Get_Next(ctx);
7064 }
7065
7069 int32_t idx() // getter
7070 {
7071 APIUtil::ErrorChecker error_checker(api_util);
7072 return ctx_WireData_Get_idx(ctx);
7073 }
7074
7078 void idx(int32_t value) // setter
7079 {
7080 APIUtil::ErrorChecker error_checker(api_util);
7081 ctx_WireData_Set_idx(ctx, value);
7082 }
7083
7087 double EmergAmps() // getter
7088 {
7089 APIUtil::ErrorChecker error_checker(api_util);
7090 return ctx_WireData_Get_EmergAmps(ctx);
7091 }
7092 IWireData& EmergAmps(double value) // setter
7093 {
7094 APIUtil::ErrorChecker error_checker(api_util);
7095 ctx_WireData_Set_EmergAmps(ctx, value);
7096 return *this;
7097 }
7098
7102 double NormAmps() // getter
7103 {
7104 APIUtil::ErrorChecker error_checker(api_util);
7105 return ctx_WireData_Get_NormAmps(ctx);
7106 }
7107 IWireData& NormAmps(double value) // setter
7108 {
7109 APIUtil::ErrorChecker error_checker(api_util);
7110 ctx_WireData_Set_NormAmps(ctx, value);
7111 return *this;
7112 }
7113
7114 double Rdc() // getter
7115 {
7116 APIUtil::ErrorChecker error_checker(api_util);
7117 return ctx_WireData_Get_Rdc(ctx);
7118 }
7119 IWireData& Rdc(double value) // setter
7120 {
7121 APIUtil::ErrorChecker error_checker(api_util);
7122 ctx_WireData_Set_Rdc(ctx, value);
7123 return *this;
7124 }
7125
7126 double Rac() // getter
7127 {
7128 APIUtil::ErrorChecker error_checker(api_util);
7129 return ctx_WireData_Get_Rac(ctx);
7130 }
7131 IWireData& Rac(double value) // setter
7132 {
7133 APIUtil::ErrorChecker error_checker(api_util);
7134 ctx_WireData_Set_Rac(ctx, value);
7135 return *this;
7136 }
7137
7138 double GMRac() // getter
7139 {
7140 APIUtil::ErrorChecker error_checker(api_util);
7141 return ctx_WireData_Get_GMRac(ctx);
7142 }
7143 IWireData& GMRac(double value) // setter
7144 {
7145 APIUtil::ErrorChecker error_checker(api_util);
7146 ctx_WireData_Set_GMRac(ctx, value);
7147 return *this;
7148 }
7149
7150 int32_t GMRUnits() // getter
7151 {
7152 APIUtil::ErrorChecker error_checker(api_util);
7153 return ctx_WireData_Get_GMRUnits(ctx);
7154 }
7155 IWireData& GMRUnits(int32_t value) // setter
7156 {
7157 APIUtil::ErrorChecker error_checker(api_util);
7158 ctx_WireData_Set_GMRUnits(ctx, value);
7159 return *this;
7160 }
7161
7162 double Radius() // getter
7163 {
7164 APIUtil::ErrorChecker error_checker(api_util);
7165 return ctx_WireData_Get_Radius(ctx);
7166 }
7167 IWireData& Radius(double value) // setter
7168 {
7169 APIUtil::ErrorChecker error_checker(api_util);
7170 ctx_WireData_Set_Radius(ctx, value);
7171 return *this;
7172 }
7173
7174 int32_t RadiusUnits() // getter
7175 {
7176 APIUtil::ErrorChecker error_checker(api_util);
7177 return ctx_WireData_Get_RadiusUnits(ctx);
7178 }
7179 IWireData& RadiusUnits(int32_t value) // setter
7180 {
7181 APIUtil::ErrorChecker error_checker(api_util);
7182 ctx_WireData_Set_RadiusUnits(ctx, value);
7183 return *this;
7184 }
7185
7186 int32_t ResistanceUnits() // getter
7187 {
7188 APIUtil::ErrorChecker error_checker(api_util);
7189 return ctx_WireData_Get_ResistanceUnits(ctx);
7190 }
7191 IWireData& ResistanceUnits(int32_t value) // setter
7192 {
7193 APIUtil::ErrorChecker error_checker(api_util);
7194 ctx_WireData_Set_ResistanceUnits(ctx, value);
7195 return *this;
7196 }
7197
7198 double Diameter() // getter
7199 {
7200 APIUtil::ErrorChecker error_checker(api_util);
7201 return ctx_WireData_Get_Diameter(ctx);
7202 }
7203 IWireData& Diameter(double value) // setter
7204 {
7205 APIUtil::ErrorChecker error_checker(api_util);
7206 ctx_WireData_Set_Diameter(ctx, value);
7207 return *this;
7208 }
7209
7213 double CapRadius() // getter
7214 {
7215 APIUtil::ErrorChecker error_checker(api_util);
7216 return ctx_WireData_Get_CapRadius(ctx);
7217 }
7218 IWireData& CapRadius(double value) // setter
7219 {
7220 APIUtil::ErrorChecker error_checker(api_util);
7221 ctx_WireData_Set_CapRadius(ctx, value);
7222 return *this;
7223 }
7224 };
7225
7227 {
7228 public:
7229
7230 IXYCurves(dss::APIUtil *util) :
7231 ContextState(util)
7232 {
7233 }
7234
7238 strings AllNames() // getter
7239 {
7240 APIUtil::ErrorChecker error_checker(api_util);
7241 return api_util->get_string_array(ctx_XYCurves_Get_AllNames);
7242 }
7243
7247 int32_t Count() // getter
7248 {
7249 APIUtil::ErrorChecker error_checker(api_util);
7250 return ctx_XYCurves_Get_Count(ctx);
7251 }
7252
7256 int32_t First() // getter
7257 {
7258 APIUtil::ErrorChecker error_checker(api_util);
7259 return ctx_XYCurves_Get_First(ctx);
7260 }
7261
7265 string Name() // getter
7266 {
7267 APIUtil::ErrorChecker error_checker(api_util);
7268 return ctx_XYCurves_Get_Name(ctx);
7269 }
7270
7274 IXYCurves& Name(const char *value)
7275 {
7276 APIUtil::ErrorChecker error_checker(api_util);
7277 ctx_XYCurves_Set_Name(ctx, value);
7278 return *this;
7279 }
7280 IXYCurves& Name(const string &value)
7281 {
7282 return Name(value.c_str());
7283 }
7284
7288 int32_t Next() // getter
7289 {
7290 APIUtil::ErrorChecker error_checker(api_util);
7291 return ctx_XYCurves_Get_Next(ctx);
7292 }
7293
7297 int32_t idx() // getter
7298 {
7299 APIUtil::ErrorChecker error_checker(api_util);
7300 return ctx_XYCurves_Get_idx(ctx);
7301 }
7302
7306 void idx(int32_t value) // setter
7307 {
7308 APIUtil::ErrorChecker error_checker(api_util);
7309 ctx_XYCurves_Set_idx(ctx, value);
7310 }
7311
7315 int32_t Npts() // getter
7316 {
7317 APIUtil::ErrorChecker error_checker(api_util);
7318 return ctx_XYCurves_Get_Npts(ctx);
7319 }
7320 IXYCurves& Npts(int32_t value) // setter
7321 {
7322 APIUtil::ErrorChecker error_checker(api_util);
7323 ctx_XYCurves_Set_Npts(ctx, value);
7324 return *this;
7325 }
7326
7330 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7331 VectorT Xarray() // getter
7332 {
7333 APIUtil::ErrorChecker error_checker(api_util);
7334 ctx_XYCurves_Get_Xarray_GR(ctx);
7335 return api_util->get_float64_gr_array<VectorT>();
7336 }
7337 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7338 IXYCurves& Xarray(const VectorT &value) // setter
7339 {
7340 APIUtil::ErrorChecker error_checker(api_util);
7341 ctx_XYCurves_Set_Xarray(ctx, &value[0], value.size());
7342 return *this;
7343 }
7344
7348 double Xscale() // getter
7349 {
7350 APIUtil::ErrorChecker error_checker(api_util);
7351 return ctx_XYCurves_Get_Xscale(ctx);
7352 }
7353 IXYCurves& Xscale(double value) // setter
7354 {
7355 APIUtil::ErrorChecker error_checker(api_util);
7356 ctx_XYCurves_Set_Xscale(ctx, value);
7357 return *this;
7358 }
7359
7363 double Xshift() // getter
7364 {
7365 APIUtil::ErrorChecker error_checker(api_util);
7366 return ctx_XYCurves_Get_Xshift(ctx);
7367 }
7368 IXYCurves& Xshift(double value) // setter
7369 {
7370 APIUtil::ErrorChecker error_checker(api_util);
7371 ctx_XYCurves_Set_Xshift(ctx, value);
7372 return *this;
7373 }
7374
7378 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7379 VectorT Yarray() // getter
7380 {
7381 APIUtil::ErrorChecker error_checker(api_util);
7382 ctx_XYCurves_Get_Yarray_GR(ctx);
7383 return api_util->get_float64_gr_array<VectorT>();
7384 }
7385 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7386 IXYCurves& Yarray(const VectorT &value) // setter
7387 {
7388 APIUtil::ErrorChecker error_checker(api_util);
7389 ctx_XYCurves_Set_Yarray(ctx, &value[0], value.size());
7390 return *this;
7391 }
7392
7396 double Yscale() // getter
7397 {
7398 APIUtil::ErrorChecker error_checker(api_util);
7399 return ctx_XYCurves_Get_Yscale(ctx);
7400 }
7401 IXYCurves& Yscale(double value) // setter
7402 {
7403 APIUtil::ErrorChecker error_checker(api_util);
7404 ctx_XYCurves_Set_Yscale(ctx, value);
7405 return *this;
7406 }
7407
7411 double Yshift() // getter
7412 {
7413 APIUtil::ErrorChecker error_checker(api_util);
7414 return ctx_XYCurves_Get_Yshift(ctx);
7415 }
7416 IXYCurves& Yshift(double value) // setter
7417 {
7418 APIUtil::ErrorChecker error_checker(api_util);
7419 ctx_XYCurves_Set_Yshift(ctx, value);
7420 return *this;
7421 }
7422
7426 double x() // getter
7427 {
7428 APIUtil::ErrorChecker error_checker(api_util);
7429 return ctx_XYCurves_Get_x(ctx);
7430 }
7431 IXYCurves& x(double value) // setter
7432 {
7433 APIUtil::ErrorChecker error_checker(api_util);
7434 ctx_XYCurves_Set_x(ctx, value);
7435 return *this;
7436 }
7437
7441 double y() // getter
7442 {
7443 APIUtil::ErrorChecker error_checker(api_util);
7444 return ctx_XYCurves_Get_y(ctx);
7445 }
7446 IXYCurves& y(double value) // setter
7447 {
7448 APIUtil::ErrorChecker error_checker(api_util);
7449 ctx_XYCurves_Set_y(ctx, value);
7450 return *this;
7451 }
7452 };
7453
7454 class IZIP: public ContextState
7455 {
7456 public:
7457
7458 IZIP(dss::APIUtil *util) :
7459 ContextState(util)
7460 {
7461 }
7462
7470 strings List(const char *regexp="")
7471 {
7472 APIUtil::ErrorChecker error_checker(api_util);
7473 return api_util->get_string_array(ctx_ZIP_List, regexp);
7474 }
7475 strings List(const string& regexp)
7476 {
7477 return List(regexp.c_str());
7478 }
7487 void Open(const char *FileName)
7488 {
7489 APIUtil::ErrorChecker error_checker(api_util);
7490 ctx_ZIP_Open(ctx, FileName);
7491 }
7500 void Open(const string &FileName)
7501 {
7502 APIUtil::ErrorChecker error_checker(api_util);
7503 ctx_ZIP_Open(ctx, FileName.c_str());
7504 }
7510 void Close()
7511 {
7512 APIUtil::ErrorChecker error_checker(api_util);
7513 ctx_ZIP_Close(ctx);
7514 }
7523 void Redirect(const char *FileInZip)
7524 {
7525 APIUtil::ErrorChecker error_checker(api_util);
7526 ctx_ZIP_Redirect(ctx, FileInZip);
7527 }
7536 void Redirect(const string &FileInZip)
7537 {
7538 APIUtil::ErrorChecker error_checker(api_util);
7539 ctx_ZIP_Redirect(ctx, FileInZip.c_str());
7540 }
7547 template <typename VectorT=Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
7548 VectorT Extract(const char *FileName)
7549 {
7550 APIUtil::ErrorChecker error_checker(api_util);
7551 ctx_ZIP_Extract_GR(ctx, FileName);
7552 return api_util->get_int8_gr_array<VectorT>();
7553 }
7560 template <typename VectorT=Eigen::Matrix<int8_t, Eigen::Dynamic, 1>>
7561 VectorT Extract(const string &FileName)
7562 {
7563 APIUtil::ErrorChecker error_checker(api_util);
7564 ctx_ZIP_Extract_GR(ctx, FileName.c_str());
7565 return api_util->get_int8_gr_array<VectorT>();
7566 }
7572 bool Contains(const char *Name)
7573 {
7574 APIUtil::ErrorChecker error_checker(api_util);
7575 return (ctx_ZIP_Contains(ctx, Name) != 0);
7576 }
7582 bool Contains(const string &Name)
7583 {
7584 APIUtil::ErrorChecker error_checker(api_util);
7585 return (ctx_ZIP_Contains(ctx, Name.c_str()) != 0);
7586 }
7587 };
7588
7590 {
7591 public:
7592
7593 IActiveClass(dss::APIUtil *util) :
7594 ContextState(util)
7595 {
7596 }
7597
7601 string ActiveClassName() // getter
7602 {
7603 APIUtil::ErrorChecker error_checker(api_util);
7604 return ctx_ActiveClass_Get_ActiveClassName(ctx);
7605 }
7606
7610 strings AllNames() // getter
7611 {
7612 APIUtil::ErrorChecker error_checker(api_util);
7613 return api_util->get_string_array(ctx_ActiveClass_Get_AllNames);
7614 }
7615
7619 int32_t Count() // getter
7620 {
7621 APIUtil::ErrorChecker error_checker(api_util);
7622 return ctx_ActiveClass_Get_Count(ctx);
7623 }
7624
7628 int32_t First() // getter
7629 {
7630 APIUtil::ErrorChecker error_checker(api_util);
7631 return ctx_ActiveClass_Get_First(ctx);
7632 }
7633
7637 string Name() // getter
7638 {
7639 APIUtil::ErrorChecker error_checker(api_util);
7640 return ctx_ActiveClass_Get_Name(ctx);
7641 }
7642 IActiveClass& Name(const char *value) // setter
7643 {
7644 APIUtil::ErrorChecker error_checker(api_util);
7645 ctx_ActiveClass_Set_Name(ctx, value);
7646 return *this;
7647 }
7648 IActiveClass& Name(const string &value) // setter
7649 {
7650 APIUtil::ErrorChecker error_checker(api_util);
7651 ctx_ActiveClass_Set_Name(ctx, value.c_str());
7652 return *this;
7653 }
7654
7658 int32_t Next() // getter
7659 {
7660 APIUtil::ErrorChecker error_checker(api_util);
7661 return ctx_ActiveClass_Get_Next(ctx);
7662 }
7663
7667 int32_t NumElements() // getter
7668 {
7669 APIUtil::ErrorChecker error_checker(api_util);
7670 return ctx_ActiveClass_Get_NumElements(ctx);
7671 }
7672
7676 string ActiveClassParent() // getter
7677 {
7678 APIUtil::ErrorChecker error_checker(api_util);
7679 return ctx_ActiveClass_Get_ActiveClassParent(ctx);
7680 }
7691 string ToJSON(int32_t options=0)
7692 {
7693 APIUtil::ErrorChecker error_checker(api_util);
7694 return ctx_ActiveClass_ToJSON(ctx, options);
7695 }
7696 };
7697
7698 class IBus: public ContextState
7699 {
7700 public:
7701
7702 IBus(dss::APIUtil *util) :
7703 ContextState(util)
7704 {
7705 }
7706
7707 IBus& operator[](int32_t key) // getter
7708 {
7709 APIUtil::ErrorChecker error_checker(api_util);
7710 ctx_Circuit_SetActiveBusi(ctx, key);
7711 return *this;
7712 }
7713
7714 IBus& operator[](const char *key) // getter
7715 {
7716 APIUtil::ErrorChecker error_checker(api_util);
7717 ctx_Circuit_SetActiveBus(ctx, key);
7718 return *this;
7719 }
7720 IBus& operator[](const string &key) // getter
7721 {
7722 return (*this)[key.c_str()];
7723 }
7724
7728 strings AllPCEatBus() // getter
7729 {
7730 APIUtil::ErrorChecker error_checker(api_util);
7731 return api_util->get_string_array(ctx_Bus_Get_AllPCEatBus);
7732 }
7733
7737 strings AllPDEatBus() // getter
7738 {
7739 APIUtil::ErrorChecker error_checker(api_util);
7740 return api_util->get_string_array(ctx_Bus_Get_AllPDEatBus);
7741 }
7742 int32_t GetUniqueNodeNumber(int32_t StartNumber)
7743 {
7744 APIUtil::ErrorChecker error_checker(api_util);
7745 return ctx_Bus_GetUniqueNodeNumber(ctx, StartNumber);
7746 }
7747 bool ZscRefresh()
7748 {
7749 APIUtil::ErrorChecker error_checker(api_util);
7750 return (ctx_Bus_ZscRefresh(ctx) != 0);
7751 }
7752
7756 bool Coorddefined() // getter
7757 {
7758 APIUtil::ErrorChecker error_checker(api_util);
7759 return (ctx_Bus_Get_Coorddefined(ctx) != 0);
7760 }
7761
7765 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7766 VectorT CplxSeqVoltages() // getter
7767 {
7768 APIUtil::ErrorChecker error_checker(api_util);
7769 ctx_Bus_Get_CplxSeqVoltages_GR(ctx);
7770 return api_util->get_float64_gr_array<VectorT>();
7771 }
7772
7776 double Cust_Duration() // getter
7777 {
7778 APIUtil::ErrorChecker error_checker(api_util);
7779 return ctx_Bus_Get_Cust_Duration(ctx);
7780 }
7781
7785 double Cust_Interrupts() // getter
7786 {
7787 APIUtil::ErrorChecker error_checker(api_util);
7788 return ctx_Bus_Get_Cust_Interrupts(ctx);
7789 }
7790
7794 double Distance() // getter
7795 {
7796 APIUtil::ErrorChecker error_checker(api_util);
7797 return ctx_Bus_Get_Distance(ctx);
7798 }
7799
7803 double Int_Duration() // getter
7804 {
7805 APIUtil::ErrorChecker error_checker(api_util);
7806 return ctx_Bus_Get_Int_Duration(ctx);
7807 }
7808
7812 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7813 VectorT Isc() // getter
7814 {
7815 APIUtil::ErrorChecker error_checker(api_util);
7816 ctx_Bus_Get_Isc_GR(ctx);
7817 return api_util->get_float64_gr_array<VectorT>();
7818 }
7819
7823 double Lambda() // getter
7824 {
7825 APIUtil::ErrorChecker error_checker(api_util);
7826 return ctx_Bus_Get_Lambda(ctx);
7827 }
7828
7832 int32_t N_Customers() // getter
7833 {
7834 APIUtil::ErrorChecker error_checker(api_util);
7835 return ctx_Bus_Get_N_Customers(ctx);
7836 }
7837
7841 double N_interrupts() // getter
7842 {
7843 APIUtil::ErrorChecker error_checker(api_util);
7844 return ctx_Bus_Get_N_interrupts(ctx);
7845 }
7846
7850 string Name() // getter
7851 {
7852 APIUtil::ErrorChecker error_checker(api_util);
7853 return ctx_Bus_Get_Name(ctx);
7854 }
7855
7859 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
7860 VectorT Nodes() // getter
7861 {
7862 APIUtil::ErrorChecker error_checker(api_util);
7863 ctx_Bus_Get_Nodes_GR(ctx);
7864 return api_util->get_int32_gr_array<VectorT>();
7865 }
7866
7870 int32_t NumNodes() // getter
7871 {
7872 APIUtil::ErrorChecker error_checker(api_util);
7873 return ctx_Bus_Get_NumNodes(ctx);
7874 }
7875
7879 int32_t SectionID() // getter
7880 {
7881 APIUtil::ErrorChecker error_checker(api_util);
7882 return ctx_Bus_Get_SectionID(ctx);
7883 }
7884
7888 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7889 VectorT SeqVoltages() // getter
7890 {
7891 APIUtil::ErrorChecker error_checker(api_util);
7892 ctx_Bus_Get_SeqVoltages_GR(ctx);
7893 return api_util->get_float64_gr_array<VectorT>();
7894 }
7895
7899 double TotalMiles() // getter
7900 {
7901 APIUtil::ErrorChecker error_checker(api_util);
7902 return ctx_Bus_Get_TotalMiles(ctx);
7903 }
7904
7908 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7909 VectorT VLL() // getter
7910 {
7911 APIUtil::ErrorChecker error_checker(api_util);
7912 ctx_Bus_Get_VLL_GR(ctx);
7913 return api_util->get_float64_gr_array<VectorT>();
7914 }
7915
7919 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7920 VectorT VMagAngle() // getter
7921 {
7922 APIUtil::ErrorChecker error_checker(api_util);
7923 ctx_Bus_Get_VMagAngle_GR(ctx);
7924 return api_util->get_float64_gr_array<VectorT>();
7925 }
7926
7930 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7931 VectorT Voc() // getter
7932 {
7933 APIUtil::ErrorChecker error_checker(api_util);
7934 ctx_Bus_Get_Voc_GR(ctx);
7935 return api_util->get_float64_gr_array<VectorT>();
7936 }
7937
7941 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7942 VectorT Voltages() // getter
7943 {
7944 APIUtil::ErrorChecker error_checker(api_util);
7945 ctx_Bus_Get_Voltages_GR(ctx);
7946 return api_util->get_float64_gr_array<VectorT>();
7947 }
7948
7952 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7953 VectorT YscMatrix() // getter
7954 {
7955 APIUtil::ErrorChecker error_checker(api_util);
7956 ctx_Bus_Get_YscMatrix_GR(ctx);
7957 return api_util->get_float64_gr_array<VectorT>();
7958 }
7959
7963 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7964 VectorT Zsc0() // getter
7965 {
7966 APIUtil::ErrorChecker error_checker(api_util);
7967 ctx_Bus_Get_Zsc0_GR(ctx);
7968 return api_util->get_float64_gr_array<VectorT>();
7969 }
7970
7974 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7975 VectorT Zsc1() // getter
7976 {
7977 APIUtil::ErrorChecker error_checker(api_util);
7978 ctx_Bus_Get_Zsc1_GR(ctx);
7979 return api_util->get_float64_gr_array<VectorT>();
7980 }
7981
7985 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
7986 VectorT ZscMatrix() // getter
7987 {
7988 APIUtil::ErrorChecker error_checker(api_util);
7989 ctx_Bus_Get_ZscMatrix_GR(ctx);
7990 return api_util->get_float64_gr_array<VectorT>();
7991 }
7992
7996 double kVBase() // getter
7997 {
7998 APIUtil::ErrorChecker error_checker(api_util);
7999 return ctx_Bus_Get_kVBase(ctx);
8000 }
8001
8005 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
8006 VectorT puVLL() // getter
8007 {
8008 APIUtil::ErrorChecker error_checker(api_util);
8009 ctx_Bus_Get_puVLL_GR(ctx);
8010 return api_util->get_float64_gr_array<VectorT>();
8011 }
8012
8016 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
8017 VectorT puVmagAngle() // getter
8018 {
8019 APIUtil::ErrorChecker error_checker(api_util);
8020 ctx_Bus_Get_puVmagAngle_GR(ctx);
8021 return api_util->get_float64_gr_array<VectorT>();
8022 }
8023
8027 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
8028 VectorT puVoltages() // getter
8029 {
8030 APIUtil::ErrorChecker error_checker(api_util);
8031 ctx_Bus_Get_puVoltages_GR(ctx);
8032 return api_util->get_float64_gr_array<VectorT>();
8033 }
8034
8038 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
8039 VectorT ZSC012Matrix() // getter
8040 {
8041 APIUtil::ErrorChecker error_checker(api_util);
8042 ctx_Bus_Get_ZSC012Matrix_GR(ctx);
8043 return api_util->get_float64_gr_array<VectorT>();
8044 }
8045
8049 double x() // getter
8050 {
8051 APIUtil::ErrorChecker error_checker(api_util);
8052 return ctx_Bus_Get_x(ctx);
8053 }
8054 IBus& x(double value) // setter
8055 {
8056 APIUtil::ErrorChecker error_checker(api_util);
8057 ctx_Bus_Set_x(ctx, value);
8058 return *this;
8059 }
8060
8064 double y() // getter
8065 {
8066 APIUtil::ErrorChecker error_checker(api_util);
8067 return ctx_Bus_Get_y(ctx);
8068 }
8069 IBus& y(double value) // setter
8070 {
8071 APIUtil::ErrorChecker error_checker(api_util);
8072 ctx_Bus_Set_y(ctx, value);
8073 return *this;
8074 }
8075
8079 strings LoadList() // getter
8080 {
8081 APIUtil::ErrorChecker error_checker(api_util);
8082 return api_util->get_string_array(ctx_Bus_Get_LoadList);
8083 }
8084
8088 strings LineList() // getter
8089 {
8090 APIUtil::ErrorChecker error_checker(api_util);
8091 return api_util->get_string_array(ctx_Bus_Get_LineList);
8092 }
8093
8094 };
8095
8096 class ICNData: public ContextState
8097 {
8098 public:
8099
8100 ICNData(dss::APIUtil *util) :
8101 ContextState(util)
8102 {
8103 }
8104
8108 strings AllNames() // getter
8109 {
8110 APIUtil::ErrorChecker error_checker(api_util);
8111 return api_util->get_string_array(ctx_CNData_Get_AllNames);
8112 }
8113
8117 int32_t Count() // getter
8118 {
8119 APIUtil::ErrorChecker error_checker(api_util);
8120 return ctx_CNData_Get_Count(ctx);
8121 }
8122
8126 int32_t First() // getter
8127 {
8128 APIUtil::ErrorChecker error_checker(api_util);
8129 return ctx_CNData_Get_First(ctx);
8130 }
8131
8135 string Name() // getter
8136 {
8137 APIUtil::ErrorChecker error_checker(api_util);
8138 return ctx_CNData_Get_Name(ctx);
8139 }
8140
8144 ICNData& Name(const char *value)
8145 {
8146 APIUtil::ErrorChecker error_checker(api_util);
8147 ctx_CNData_Set_Name(ctx, value);
8148 return *this;
8149 }
8150 ICNData& Name(const string &value)
8151 {
8152 return Name(value.c_str());
8153 }
8154
8158 int32_t Next() // getter
8159 {
8160 APIUtil::ErrorChecker error_checker(api_util);
8161 return ctx_CNData_Get_Next(ctx);
8162 }
8163
8167 int32_t idx() // getter
8168 {
8169 APIUtil::ErrorChecker error_checker(api_util);
8170 return ctx_CNData_Get_idx(ctx);
8171 }
8172
8176 void idx(int32_t value) // setter
8177 {
8178 APIUtil::ErrorChecker error_checker(api_util);
8179 ctx_CNData_Set_idx(ctx, value);
8180 }
8181
8185 double EmergAmps() // getter
8186 {
8187 APIUtil::ErrorChecker error_checker(api_util);
8188 return ctx_CNData_Get_EmergAmps(ctx);
8189 }
8190 ICNData& EmergAmps(double value) // setter
8191 {
8192 APIUtil::ErrorChecker error_checker(api_util);
8193 ctx_CNData_Set_EmergAmps(ctx, value);
8194 return *this;
8195 }
8196
8200 double NormAmps() // getter
8201 {
8202 APIUtil::ErrorChecker error_checker(api_util);
8203 return ctx_CNData_Get_NormAmps(ctx);
8204 }
8205 ICNData& NormAmps(double value) // setter
8206 {
8207 APIUtil::ErrorChecker error_checker(api_util);
8208 ctx_CNData_Set_NormAmps(ctx, value);
8209 return *this;
8210 }
8211
8212 double Rdc() // getter
8213 {
8214 APIUtil::ErrorChecker error_checker(api_util);
8215 return ctx_CNData_Get_Rdc(ctx);
8216 }
8217 ICNData& Rdc(double value) // setter
8218 {
8219 APIUtil::ErrorChecker error_checker(api_util);
8220 ctx_CNData_Set_Rdc(ctx, value);
8221 return *this;
8222 }
8223
8224 double Rac() // getter
8225 {
8226 APIUtil::ErrorChecker error_checker(api_util);
8227 return ctx_CNData_Get_Rac(ctx);
8228 }
8229 ICNData& Rac(double value) // setter
8230 {
8231 APIUtil::ErrorChecker error_checker(api_util);
8232 ctx_CNData_Set_Rac(ctx, value);
8233 return *this;
8234 }
8235
8236 double GMRac() // getter
8237 {
8238 APIUtil::ErrorChecker error_checker(api_util);
8239 return ctx_CNData_Get_GMRac(ctx);
8240 }
8241 ICNData& GMRac(double value) // setter
8242 {
8243 APIUtil::ErrorChecker error_checker(api_util);
8244 ctx_CNData_Set_GMRac(ctx, value);
8245 return *this;
8246 }
8247
8248 int32_t GMRUnits() // getter
8249 {
8250 APIUtil::ErrorChecker error_checker(api_util);
8251 return ctx_CNData_Get_GMRUnits(ctx);
8252 }
8253 ICNData& GMRUnits(int32_t value) // setter
8254 {
8255 APIUtil::ErrorChecker error_checker(api_util);
8256 ctx_CNData_Set_GMRUnits(ctx, value);
8257 return *this;
8258 }
8259
8260 double Radius() // getter
8261 {
8262 APIUtil::ErrorChecker error_checker(api_util);
8263 return ctx_CNData_Get_Radius(ctx);
8264 }
8265 ICNData& Radius(double value) // setter
8266 {
8267 APIUtil::ErrorChecker error_checker(api_util);
8268 ctx_CNData_Set_Radius(ctx, value);
8269 return *this;
8270 }
8271
8272 int32_t RadiusUnits() // getter
8273 {
8274 APIUtil::ErrorChecker error_checker(api_util);
8275 return ctx_CNData_Get_RadiusUnits(ctx);
8276 }
8277 ICNData& RadiusUnits(int32_t value) // setter
8278 {
8279 APIUtil::ErrorChecker error_checker(api_util);
8280 ctx_CNData_Set_RadiusUnits(ctx, value);
8281 return *this;
8282 }
8283
8284 int32_t ResistanceUnits() // getter
8285 {
8286 APIUtil::ErrorChecker error_checker(api_util);
8287 return ctx_CNData_Get_ResistanceUnits(ctx);
8288 }
8289 ICNData& ResistanceUnits(int32_t value) // setter
8290 {
8291 APIUtil::ErrorChecker error_checker(api_util);
8292 ctx_CNData_Set_ResistanceUnits(ctx, value);
8293 return *this;
8294 }
8295
8296 double Diameter() // getter
8297 {
8298 APIUtil::ErrorChecker error_checker(api_util);
8299 return ctx_CNData_Get_Diameter(ctx);
8300 }
8301 ICNData& Diameter(double value) // setter
8302 {
8303 APIUtil::ErrorChecker error_checker(api_util);
8304 ctx_CNData_Set_Diameter(ctx, value);
8305 return *this;
8306 }
8307
8308 double EpsR() // getter
8309 {
8310 APIUtil::ErrorChecker error_checker(api_util);
8311 return ctx_CNData_Get_EpsR(ctx);
8312 }
8313 ICNData& EpsR(double value) // setter
8314 {
8315 APIUtil::ErrorChecker error_checker(api_util);
8316 ctx_CNData_Set_EpsR(ctx, value);
8317 return *this;
8318 }
8319
8320 double InsLayer() // getter
8321 {
8322 APIUtil::ErrorChecker error_checker(api_util);
8323 return ctx_CNData_Get_InsLayer(ctx);
8324 }
8325 ICNData& InsLayer(double value) // setter
8326 {
8327 APIUtil::ErrorChecker error_checker(api_util);
8328 ctx_CNData_Set_InsLayer(ctx, value);
8329 return *this;
8330 }
8331
8332 double DiaIns() // getter
8333 {
8334 APIUtil::ErrorChecker error_checker(api_util);
8335 return ctx_CNData_Get_DiaIns(ctx);
8336 }
8337 ICNData& DiaIns(double value) // setter
8338 {
8339 APIUtil::ErrorChecker error_checker(api_util);
8340 ctx_CNData_Set_DiaIns(ctx, value);
8341 return *this;
8342 }
8343
8344 double DiaCable() // getter
8345 {
8346 APIUtil::ErrorChecker error_checker(api_util);
8347 return ctx_CNData_Get_DiaCable(ctx);
8348 }
8349 ICNData& DiaCable(double value) // setter
8350 {
8351 APIUtil::ErrorChecker error_checker(api_util);
8352 ctx_CNData_Set_DiaCable(ctx, value);
8353 return *this;
8354 }
8355
8356 int32_t k() // getter
8357 {
8358 APIUtil::ErrorChecker error_checker(api_util);
8359 return ctx_CNData_Get_k(ctx);
8360 }
8361 ICNData& k(int32_t value) // setter
8362 {
8363 APIUtil::ErrorChecker error_checker(api_util);
8364 ctx_CNData_Set_k(ctx, value);
8365 return *this;
8366 }
8367
8368 double DiaStrand() // getter
8369 {
8370 APIUtil::ErrorChecker error_checker(api_util);
8371 return ctx_CNData_Get_DiaStrand(ctx);
8372 }
8373 ICNData& DiaStrand(double value) // setter
8374 {
8375 APIUtil::ErrorChecker error_checker(api_util);
8376 ctx_CNData_Set_DiaStrand(ctx, value);
8377 return *this;
8378 }
8379
8380 double GmrStrand() // getter
8381 {
8382 APIUtil::ErrorChecker error_checker(api_util);
8383 return ctx_CNData_Get_GmrStrand(ctx);
8384 }
8385 ICNData& GmrStrand(double value) // setter
8386 {
8387 APIUtil::ErrorChecker error_checker(api_util);
8388 ctx_CNData_Set_GmrStrand(ctx, value);
8389 return *this;
8390 }
8391
8392 double RStrand() // getter
8393 {
8394 APIUtil::ErrorChecker error_checker(api_util);
8395 return ctx_CNData_Get_RStrand(ctx);
8396 }
8397 ICNData& RStrand(double value) // setter
8398 {
8399 APIUtil::ErrorChecker error_checker(api_util);
8400 ctx_CNData_Set_RStrand(ctx, value);
8401 return *this;
8402 }
8403 };
8404
8406 {
8407 public:
8408
8409 ICapControls(dss::APIUtil *util) :
8410 ContextState(util)
8411 {
8412 }
8413
8417 strings AllNames() // getter
8418 {
8419 APIUtil::ErrorChecker error_checker(api_util);
8420 return api_util->get_string_array(ctx_CapControls_Get_AllNames);
8421 }
8422
8426 int32_t Count() // getter
8427 {
8428 APIUtil::ErrorChecker error_checker(api_util);
8429 return ctx_CapControls_Get_Count(ctx);
8430 }
8431
8435 int32_t First() // getter
8436 {
8437 APIUtil::ErrorChecker error_checker(api_util);
8438 return ctx_CapControls_Get_First(ctx);
8439 }
8440
8444 string Name() // getter
8445 {
8446 APIUtil::ErrorChecker error_checker(api_util);
8447 return ctx_CapControls_Get_Name(ctx);
8448 }
8449
8453 ICapControls& Name(const char *value)
8454 {
8455 APIUtil::ErrorChecker error_checker(api_util);
8456 ctx_CapControls_Set_Name(ctx, value);
8457 return *this;
8458 }
8459 ICapControls& Name(const string &value)
8460 {
8461 return Name(value.c_str());
8462 }
8463
8467 int32_t Next() // getter
8468 {
8469 APIUtil::ErrorChecker error_checker(api_util);
8470 return ctx_CapControls_Get_Next(ctx);
8471 }
8472
8476 int32_t idx() // getter
8477 {
8478 APIUtil::ErrorChecker error_checker(api_util);
8479 return ctx_CapControls_Get_idx(ctx);
8480 }
8481
8485 void idx(int32_t value) // setter
8486 {
8487 APIUtil::ErrorChecker error_checker(api_util);
8488 ctx_CapControls_Set_idx(ctx, value);
8489 }
8490 void Reset()
8491 {
8492 APIUtil::ErrorChecker error_checker(api_util);
8493 ctx_CapControls_Reset(ctx);
8494 }
8495
8499 double CTratio() // getter
8500 {
8501 APIUtil::ErrorChecker error_checker(api_util);
8502 return ctx_CapControls_Get_CTratio(ctx);
8503 }
8504 ICapControls& CTratio(double value) // setter
8505 {
8506 APIUtil::ErrorChecker error_checker(api_util);
8507 ctx_CapControls_Set_CTratio(ctx, value);
8508 return *this;
8509 }
8510
8514 string Capacitor() // getter
8515 {
8516 APIUtil::ErrorChecker error_checker(api_util);
8517 return ctx_CapControls_Get_Capacitor(ctx);
8518 }
8519 ICapControls& Capacitor(const char *value) // setter
8520 {
8521 APIUtil::ErrorChecker error_checker(api_util);
8522 ctx_CapControls_Set_Capacitor(ctx, value);
8523 return *this;
8524 }
8525 ICapControls& Capacitor(const string &value) // setter
8526 {
8527 APIUtil::ErrorChecker error_checker(api_util);
8528 ctx_CapControls_Set_Capacitor(ctx, value.c_str());
8529 return *this;
8530 }
8531
8532 double DeadTime() // getter
8533 {
8534 APIUtil::ErrorChecker error_checker(api_util);
8535 return ctx_CapControls_Get_DeadTime(ctx);
8536 }
8537 ICapControls& DeadTime(double value) // setter
8538 {
8539 APIUtil::ErrorChecker error_checker(api_util);
8540 ctx_CapControls_Set_DeadTime(ctx, value);
8541 return *this;
8542 }
8543
8547 double Delay() // getter
8548 {
8549 APIUtil::ErrorChecker error_checker(api_util);
8550 return ctx_CapControls_Get_Delay(ctx);
8551 }
8552 ICapControls& Delay(double value) // setter
8553 {
8554 APIUtil::ErrorChecker error_checker(api_util);
8555 ctx_CapControls_Set_Delay(ctx, value);
8556 return *this;
8557 }
8558
8562 double DelayOff() // getter
8563 {
8564 APIUtil::ErrorChecker error_checker(api_util);
8565 return ctx_CapControls_Get_DelayOff(ctx);
8566 }
8567 ICapControls& DelayOff(double value) // setter
8568 {
8569 APIUtil::ErrorChecker error_checker(api_util);
8570 ctx_CapControls_Set_DelayOff(ctx, value);
8571 return *this;
8572 }
8573
8577 int32_t Mode() // getter
8578 {
8579 APIUtil::ErrorChecker error_checker(api_util);
8580 return ctx_CapControls_Get_Mode(ctx);
8581 }
8582 ICapControls& Mode(int32_t value) // setter
8583 {
8584 APIUtil::ErrorChecker error_checker(api_util);
8585 ctx_CapControls_Set_Mode(ctx, value);
8586 return *this;
8587 }
8588
8592 string MonitoredObj() // getter
8593 {
8594 APIUtil::ErrorChecker error_checker(api_util);
8595 return ctx_CapControls_Get_MonitoredObj(ctx);
8596 }
8597 ICapControls& MonitoredObj(const char *value) // setter
8598 {
8599 APIUtil::ErrorChecker error_checker(api_util);
8600 ctx_CapControls_Set_MonitoredObj(ctx, value);
8601 return *this;
8602 }
8603 ICapControls& MonitoredObj(const string &value) // setter
8604 {
8605 APIUtil::ErrorChecker error_checker(api_util);
8606 ctx_CapControls_Set_MonitoredObj(ctx, value.c_str());
8607 return *this;
8608 }
8609
8613 int32_t MonitoredTerm() // getter
8614 {
8615 APIUtil::ErrorChecker error_checker(api_util);
8616 return ctx_CapControls_Get_MonitoredTerm(ctx);
8617 }
8618 ICapControls& MonitoredTerm(int32_t value) // setter
8619 {
8620 APIUtil::ErrorChecker error_checker(api_util);
8621 ctx_CapControls_Set_MonitoredTerm(ctx, value);
8622 return *this;
8623 }
8624
8628 double OFFSetting() // getter
8629 {
8630 APIUtil::ErrorChecker error_checker(api_util);
8631 return ctx_CapControls_Get_OFFSetting(ctx);
8632 }
8633 ICapControls& OFFSetting(double value) // setter
8634 {
8635 APIUtil::ErrorChecker error_checker(api_util);
8636 ctx_CapControls_Set_OFFSetting(ctx, value);
8637 return *this;
8638 }
8639
8643 double ONSetting() // getter
8644 {
8645 APIUtil::ErrorChecker error_checker(api_util);
8646 return ctx_CapControls_Get_ONSetting(ctx);
8647 }
8648 ICapControls& ONSetting(double value) // setter
8649 {
8650 APIUtil::ErrorChecker error_checker(api_util);
8651 ctx_CapControls_Set_ONSetting(ctx, value);
8652 return *this;
8653 }
8654
8658 double PTratio() // getter
8659 {
8660 APIUtil::ErrorChecker error_checker(api_util);
8661 return ctx_CapControls_Get_PTratio(ctx);
8662 }
8663 ICapControls& PTratio(double value) // setter
8664 {
8665 APIUtil::ErrorChecker error_checker(api_util);
8666 ctx_CapControls_Set_PTratio(ctx, value);
8667 return *this;
8668 }
8669
8673 bool UseVoltOverride() // getter
8674 {
8675 APIUtil::ErrorChecker error_checker(api_util);
8676 return (ctx_CapControls_Get_UseVoltOverride(ctx) != 0);
8677 }
8678 ICapControls& UseVoltOverride(bool value) // setter
8679 {
8680 APIUtil::ErrorChecker error_checker(api_util);
8681 ctx_CapControls_Set_UseVoltOverride(ctx, value);
8682 return *this;
8683 }
8684
8688 double Vmax() // getter
8689 {
8690 APIUtil::ErrorChecker error_checker(api_util);
8691 return ctx_CapControls_Get_Vmax(ctx);
8692 }
8693 ICapControls& Vmax(double value) // setter
8694 {
8695 APIUtil::ErrorChecker error_checker(api_util);
8696 ctx_CapControls_Set_Vmax(ctx, value);
8697 return *this;
8698 }
8699
8703 double Vmin() // getter
8704 {
8705 APIUtil::ErrorChecker error_checker(api_util);
8706 return ctx_CapControls_Get_Vmin(ctx);
8707 }
8708 ICapControls& Vmin(double value) // setter
8709 {
8710 APIUtil::ErrorChecker error_checker(api_util);
8711 ctx_CapControls_Set_Vmin(ctx, value);
8712 return *this;
8713 }
8714 };
8715
8717 {
8718 public:
8719
8720 ICapacitors(dss::APIUtil *util) :
8721 ContextState(util)
8722 {
8723 }
8724
8728 strings AllNames() // getter
8729 {
8730 APIUtil::ErrorChecker error_checker(api_util);
8731 return api_util->get_string_array(ctx_Capacitors_Get_AllNames);
8732 }
8733
8737 int32_t Count() // getter
8738 {
8739 APIUtil::ErrorChecker error_checker(api_util);
8740 return ctx_Capacitors_Get_Count(ctx);
8741 }
8742
8746 int32_t First() // getter
8747 {
8748 APIUtil::ErrorChecker error_checker(api_util);
8749 return ctx_Capacitors_Get_First(ctx);
8750 }
8751
8755 string Name() // getter
8756 {
8757 APIUtil::ErrorChecker error_checker(api_util);
8758 return ctx_Capacitors_Get_Name(ctx);
8759 }
8760
8764 ICapacitors& Name(const char *value)
8765 {
8766 APIUtil::ErrorChecker error_checker(api_util);
8767 ctx_Capacitors_Set_Name(ctx, value);
8768 return *this;
8769 }
8770 ICapacitors& Name(const string &value)
8771 {
8772 return Name(value.c_str());
8773 }
8774
8778 int32_t Next() // getter
8779 {
8780 APIUtil::ErrorChecker error_checker(api_util);
8781 return ctx_Capacitors_Get_Next(ctx);
8782 }
8783
8787 int32_t idx() // getter
8788 {
8789 APIUtil::ErrorChecker error_checker(api_util);
8790 return ctx_Capacitors_Get_idx(ctx);
8791 }
8792
8796 void idx(int32_t value) // setter
8797 {
8798 APIUtil::ErrorChecker error_checker(api_util);
8799 ctx_Capacitors_Set_idx(ctx, value);
8800 }
8801 bool AddStep()
8802 {
8803 APIUtil::ErrorChecker error_checker(api_util);
8804 return (ctx_Capacitors_AddStep(ctx) != 0);
8805 }
8806 void Close()
8807 {
8808 APIUtil::ErrorChecker error_checker(api_util);
8809 ctx_Capacitors_Close(ctx);
8810 }
8811 void Open()
8812 {
8813 APIUtil::ErrorChecker error_checker(api_util);
8814 ctx_Capacitors_Open(ctx);
8815 }
8816 bool SubtractStep()
8817 {
8818 APIUtil::ErrorChecker error_checker(api_util);
8819 return (ctx_Capacitors_SubtractStep(ctx) != 0);
8820 }
8821
8825 int32_t AvailableSteps() // getter
8826 {
8827 APIUtil::ErrorChecker error_checker(api_util);
8828 return ctx_Capacitors_Get_AvailableSteps(ctx);
8829 }
8830
8834 bool IsDelta() // getter
8835 {
8836 APIUtil::ErrorChecker error_checker(api_util);
8837 return (ctx_Capacitors_Get_IsDelta(ctx) != 0);
8838 }
8839 ICapacitors& IsDelta(bool value) // setter
8840 {
8841 APIUtil::ErrorChecker error_checker(api_util);
8842 ctx_Capacitors_Set_IsDelta(ctx, value);
8843 return *this;
8844 }
8845
8849 int32_t NumSteps() // getter
8850 {
8851 APIUtil::ErrorChecker error_checker(api_util);
8852 return ctx_Capacitors_Get_NumSteps(ctx);
8853 }
8854 ICapacitors& NumSteps(int32_t value) // setter
8855 {
8856 APIUtil::ErrorChecker error_checker(api_util);
8857 ctx_Capacitors_Set_NumSteps(ctx, value);
8858 return *this;
8859 }
8860
8864 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
8865 VectorT States() // getter
8866 {
8867 APIUtil::ErrorChecker error_checker(api_util);
8868 ctx_Capacitors_Get_States_GR(ctx);
8869 return api_util->get_int32_gr_array<VectorT>();
8870 }
8871 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
8872 ICapacitors& States(const VectorT &value) // setter
8873 {
8874 APIUtil::ErrorChecker error_checker(api_util);
8875 ctx_Capacitors_Set_States(ctx, &value[0], value.size());
8876 return *this;
8877 }
8878
8882 double kV() // getter
8883 {
8884 APIUtil::ErrorChecker error_checker(api_util);
8885 return ctx_Capacitors_Get_kV(ctx);
8886 }
8887 ICapacitors& kV(double value) // setter
8888 {
8889 APIUtil::ErrorChecker error_checker(api_util);
8890 ctx_Capacitors_Set_kV(ctx, value);
8891 return *this;
8892 }
8893
8897 double kvar() // getter
8898 {
8899 APIUtil::ErrorChecker error_checker(api_util);
8900 return ctx_Capacitors_Get_kvar(ctx);
8901 }
8902 ICapacitors& kvar(double value) // setter
8903 {
8904 APIUtil::ErrorChecker error_checker(api_util);
8905 ctx_Capacitors_Set_kvar(ctx, value);
8906 return *this;
8907 }
8908 };
8909
8911 {
8912 public:
8913
8914 ICtrlQueue(dss::APIUtil *util) :
8915 ContextState(util)
8916 {
8917 }
8918 void ClearActions()
8919 {
8920 APIUtil::ErrorChecker error_checker(api_util);
8921 ctx_CtrlQueue_ClearActions(ctx);
8922 }
8923 void ClearQueue()
8924 {
8925 APIUtil::ErrorChecker error_checker(api_util);
8926 ctx_CtrlQueue_ClearQueue(ctx);
8927 }
8928 void Delete(int32_t ActionHandle)
8929 {
8930 APIUtil::ErrorChecker error_checker(api_util);
8931 ctx_CtrlQueue_Delete(ctx, ActionHandle);
8932 }
8933 void DoAllQueue()
8934 {
8935 APIUtil::ErrorChecker error_checker(api_util);
8936 ctx_CtrlQueue_DoAllQueue(ctx);
8937 }
8938 void Show()
8939 {
8940 APIUtil::ErrorChecker error_checker(api_util);
8941 ctx_CtrlQueue_Show(ctx);
8942 }
8943
8947 int32_t ActionCode() // getter
8948 {
8949 APIUtil::ErrorChecker error_checker(api_util);
8950 return ctx_CtrlQueue_Get_ActionCode(ctx);
8951 }
8952
8956 int32_t DeviceHandle() // getter
8957 {
8958 APIUtil::ErrorChecker error_checker(api_util);
8959 return ctx_CtrlQueue_Get_DeviceHandle(ctx);
8960 }
8961
8965 int32_t NumActions() // getter
8966 {
8967 APIUtil::ErrorChecker error_checker(api_util);
8968 return ctx_CtrlQueue_Get_NumActions(ctx);
8969 }
8973 int32_t Push(int32_t Hour, double Seconds, int32_t ActionCode, int32_t DeviceHandle)
8974 {
8975 APIUtil::ErrorChecker error_checker(api_util);
8976 return ctx_CtrlQueue_Push(ctx, Hour, Seconds, ActionCode, DeviceHandle);
8977 }
8978
8982 int32_t PopAction() // getter
8983 {
8984 APIUtil::ErrorChecker error_checker(api_util);
8985 return ctx_CtrlQueue_Get_PopAction(ctx);
8986 }
8987
8991 strings Queue() // getter
8992 {
8993 APIUtil::ErrorChecker error_checker(api_util);
8994 return api_util->get_string_array(ctx_CtrlQueue_Get_Queue);
8995 }
8996
9000 int32_t QueueSize() // getter
9001 {
9002 APIUtil::ErrorChecker error_checker(api_util);
9003 return ctx_CtrlQueue_Get_QueueSize(ctx);
9004 }
9005
9009 ICtrlQueue& Action(int32_t value) // setter
9010 {
9011 APIUtil::ErrorChecker error_checker(api_util);
9012 ctx_CtrlQueue_Set_Action(ctx, value);
9013 return *this;
9014 }
9015 };
9016
9018 {
9019 public:
9020 IDSSProperty Properties;
9021
9022 IDSSElement(dss::APIUtil *util) :
9023 ContextState(util),
9024 Properties(util)
9025 {
9026 }
9027
9031 strings AllPropertyNames() // getter
9032 {
9033 APIUtil::ErrorChecker error_checker(api_util);
9034 return api_util->get_string_array(ctx_DSSElement_Get_AllPropertyNames);
9035 }
9036
9040 string Name() // getter
9041 {
9042 APIUtil::ErrorChecker error_checker(api_util);
9043 return ctx_DSSElement_Get_Name(ctx);
9044 }
9045
9049 int32_t NumProperties() // getter
9050 {
9051 APIUtil::ErrorChecker error_checker(api_util);
9052 return ctx_DSSElement_Get_NumProperties(ctx);
9053 }
9062 string ToJSON(int32_t options=0)
9063 {
9064 APIUtil::ErrorChecker error_checker(api_util);
9065 return ctx_DSSElement_ToJSON(ctx, options);
9066 }
9067 };
9068
9070 {
9071 public:
9072
9074 ContextState(util)
9075 {
9076 }
9077
9081 strings AllNames() // getter
9082 {
9083 APIUtil::ErrorChecker error_checker(api_util);
9084 return api_util->get_string_array(ctx_LineGeometries_Get_AllNames);
9085 }
9086
9090 int32_t Count() // getter
9091 {
9092 APIUtil::ErrorChecker error_checker(api_util);
9093 return ctx_LineGeometries_Get_Count(ctx);
9094 }
9095
9099 int32_t First() // getter
9100 {
9101 APIUtil::ErrorChecker error_checker(api_util);
9102 return ctx_LineGeometries_Get_First(ctx);
9103 }
9104
9108 string Name() // getter
9109 {
9110 APIUtil::ErrorChecker error_checker(api_util);
9111 return ctx_LineGeometries_Get_Name(ctx);
9112 }
9113
9117 ILineGeometries& Name(const char *value)
9118 {
9119 APIUtil::ErrorChecker error_checker(api_util);
9120 ctx_LineGeometries_Set_Name(ctx, value);
9121 return *this;
9122 }
9123 ILineGeometries& Name(const string &value)
9124 {
9125 return Name(value.c_str());
9126 }
9127
9131 int32_t Next() // getter
9132 {
9133 APIUtil::ErrorChecker error_checker(api_util);
9134 return ctx_LineGeometries_Get_Next(ctx);
9135 }
9136
9140 int32_t idx() // getter
9141 {
9142 APIUtil::ErrorChecker error_checker(api_util);
9143 return ctx_LineGeometries_Get_idx(ctx);
9144 }
9145
9149 void idx(int32_t value) // setter
9150 {
9151 APIUtil::ErrorChecker error_checker(api_util);
9152 ctx_LineGeometries_Set_idx(ctx, value);
9153 }
9154
9158 strings Conductors() // getter
9159 {
9160 APIUtil::ErrorChecker error_checker(api_util);
9161 return api_util->get_string_array(ctx_LineGeometries_Get_Conductors);
9162 }
9163
9167 double EmergAmps() // getter
9168 {
9169 APIUtil::ErrorChecker error_checker(api_util);
9170 return ctx_LineGeometries_Get_EmergAmps(ctx);
9171 }
9172 ILineGeometries& EmergAmps(double value) // setter
9173 {
9174 APIUtil::ErrorChecker error_checker(api_util);
9175 ctx_LineGeometries_Set_EmergAmps(ctx, value);
9176 return *this;
9177 }
9178
9182 double NormAmps() // getter
9183 {
9184 APIUtil::ErrorChecker error_checker(api_util);
9185 return ctx_LineGeometries_Get_NormAmps(ctx);
9186 }
9187 ILineGeometries& NormAmps(double value) // setter
9188 {
9189 APIUtil::ErrorChecker error_checker(api_util);
9190 ctx_LineGeometries_Set_NormAmps(ctx, value);
9191 return *this;
9192 }
9193
9194 double RhoEarth() // getter
9195 {
9196 APIUtil::ErrorChecker error_checker(api_util);
9197 return ctx_LineGeometries_Get_RhoEarth(ctx);
9198 }
9199 ILineGeometries& RhoEarth(double value) // setter
9200 {
9201 APIUtil::ErrorChecker error_checker(api_util);
9202 ctx_LineGeometries_Set_RhoEarth(ctx, value);
9203 return *this;
9204 }
9205
9206 bool Reduce() // getter
9207 {
9208 APIUtil::ErrorChecker error_checker(api_util);
9209 return (ctx_LineGeometries_Get_Reduce(ctx) != 0);
9210 }
9211 ILineGeometries& Reduce(bool value) // setter
9212 {
9213 APIUtil::ErrorChecker error_checker(api_util);
9214 ctx_LineGeometries_Set_Reduce(ctx, value);
9215 return *this;
9216 }
9217
9221 int32_t Phases() // getter
9222 {
9223 APIUtil::ErrorChecker error_checker(api_util);
9224 return ctx_LineGeometries_Get_Phases(ctx);
9225 }
9226 ILineGeometries& Phases(int32_t value) // setter
9227 {
9228 APIUtil::ErrorChecker error_checker(api_util);
9229 ctx_LineGeometries_Set_Phases(ctx, value);
9230 return *this;
9231 }
9235 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9236 VectorT Rmatrix(double Frequency, double Length, int32_t Units)
9237 {
9238 APIUtil::ErrorChecker error_checker(api_util);
9239 ctx_LineGeometries_Get_Rmatrix_GR(ctx, Frequency, Length, Units);
9240 return api_util->get_float64_gr_array<VectorT>();
9241 }
9245 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9246 VectorT Xmatrix(double Frequency, double Length, int32_t Units)
9247 {
9248 APIUtil::ErrorChecker error_checker(api_util);
9249 ctx_LineGeometries_Get_Xmatrix_GR(ctx, Frequency, Length, Units);
9250 return api_util->get_float64_gr_array<VectorT>();
9251 }
9255 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9256 VectorT Zmatrix(double Frequency, double Length, int32_t Units)
9257 {
9258 APIUtil::ErrorChecker error_checker(api_util);
9259 ctx_LineGeometries_Get_Zmatrix_GR(ctx, Frequency, Length, Units);
9260 return api_util->get_float64_gr_array<VectorT>();
9261 }
9265 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9266 VectorT Cmatrix(double Frequency, double Length, int32_t Units)
9267 {
9268 APIUtil::ErrorChecker error_checker(api_util);
9269 ctx_LineGeometries_Get_Cmatrix_GR(ctx, Frequency, Length, Units);
9270 return api_util->get_float64_gr_array<VectorT>();
9271 }
9272
9273 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
9274 VectorT Units() // getter
9275 {
9276 APIUtil::ErrorChecker error_checker(api_util);
9277 ctx_LineGeometries_Get_Units_GR(ctx);
9278 return api_util->get_int32_gr_array<VectorT>();
9279 }
9280 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
9281 ILineGeometries& Units(const VectorT &value) // setter
9282 {
9283 APIUtil::ErrorChecker error_checker(api_util);
9284 ctx_LineGeometries_Set_Units(ctx, &value[0], value.size());
9285 return *this;
9286 }
9287
9291 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9292 VectorT Xcoords() // getter
9293 {
9294 APIUtil::ErrorChecker error_checker(api_util);
9295 ctx_LineGeometries_Get_Xcoords_GR(ctx);
9296 return api_util->get_float64_gr_array<VectorT>();
9297 }
9298 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9299 ILineGeometries& Xcoords(const VectorT &value) // setter
9300 {
9301 APIUtil::ErrorChecker error_checker(api_util);
9302 ctx_LineGeometries_Set_Xcoords(ctx, &value[0], value.size());
9303 return *this;
9304 }
9305
9309 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9310 VectorT Ycoords() // getter
9311 {
9312 APIUtil::ErrorChecker error_checker(api_util);
9313 ctx_LineGeometries_Get_Ycoords_GR(ctx);
9314 return api_util->get_float64_gr_array<VectorT>();
9315 }
9316 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9317 ILineGeometries& Ycoords(const VectorT &value) // setter
9318 {
9319 APIUtil::ErrorChecker error_checker(api_util);
9320 ctx_LineGeometries_Set_Ycoords(ctx, &value[0], value.size());
9321 return *this;
9322 }
9323
9327 int32_t Nconds() // getter
9328 {
9329 APIUtil::ErrorChecker error_checker(api_util);
9330 return ctx_LineGeometries_Get_Nconds(ctx);
9331 }
9332 ILineGeometries& Nconds(int32_t value) // setter
9333 {
9334 APIUtil::ErrorChecker error_checker(api_util);
9335 ctx_LineGeometries_Set_Nconds(ctx, value);
9336 return *this;
9337 }
9338 };
9339
9340 class ILines: public ContextState
9341 {
9342 public:
9343
9344 ILines(dss::APIUtil *util) :
9345 ContextState(util)
9346 {
9347 }
9348
9352 strings AllNames() // getter
9353 {
9354 APIUtil::ErrorChecker error_checker(api_util);
9355 return api_util->get_string_array(ctx_Lines_Get_AllNames);
9356 }
9357
9361 int32_t Count() // getter
9362 {
9363 APIUtil::ErrorChecker error_checker(api_util);
9364 return ctx_Lines_Get_Count(ctx);
9365 }
9366
9370 int32_t First() // getter
9371 {
9372 APIUtil::ErrorChecker error_checker(api_util);
9373 return ctx_Lines_Get_First(ctx);
9374 }
9375
9379 string Name() // getter
9380 {
9381 APIUtil::ErrorChecker error_checker(api_util);
9382 return ctx_Lines_Get_Name(ctx);
9383 }
9384
9388 ILines& Name(const char *value)
9389 {
9390 APIUtil::ErrorChecker error_checker(api_util);
9391 ctx_Lines_Set_Name(ctx, value);
9392 return *this;
9393 }
9394 ILines& Name(const string &value)
9395 {
9396 return Name(value.c_str());
9397 }
9398
9402 int32_t Next() // getter
9403 {
9404 APIUtil::ErrorChecker error_checker(api_util);
9405 return ctx_Lines_Get_Next(ctx);
9406 }
9407
9411 int32_t idx() // getter
9412 {
9413 APIUtil::ErrorChecker error_checker(api_util);
9414 return ctx_Lines_Get_idx(ctx);
9415 }
9416
9420 void idx(int32_t value) // setter
9421 {
9422 APIUtil::ErrorChecker error_checker(api_util);
9423 ctx_Lines_Set_idx(ctx, value);
9424 }
9425 int32_t New(const char *Name)
9426 {
9427 APIUtil::ErrorChecker error_checker(api_util);
9428 return ctx_Lines_New(ctx, Name);
9429 }
9430 int32_t New(const string &Name)
9431 {
9432 APIUtil::ErrorChecker error_checker(api_util);
9433 return ctx_Lines_New(ctx, Name.c_str());
9434 }
9435
9439 string Bus1() // getter
9440 {
9441 APIUtil::ErrorChecker error_checker(api_util);
9442 return ctx_Lines_Get_Bus1(ctx);
9443 }
9444 ILines& Bus1(const char *value) // setter
9445 {
9446 APIUtil::ErrorChecker error_checker(api_util);
9447 ctx_Lines_Set_Bus1(ctx, value);
9448 return *this;
9449 }
9450 ILines& Bus1(const string &value) // setter
9451 {
9452 APIUtil::ErrorChecker error_checker(api_util);
9453 ctx_Lines_Set_Bus1(ctx, value.c_str());
9454 return *this;
9455 }
9456
9460 string Bus2() // getter
9461 {
9462 APIUtil::ErrorChecker error_checker(api_util);
9463 return ctx_Lines_Get_Bus2(ctx);
9464 }
9465 ILines& Bus2(const char *value) // setter
9466 {
9467 APIUtil::ErrorChecker error_checker(api_util);
9468 ctx_Lines_Set_Bus2(ctx, value);
9469 return *this;
9470 }
9471 ILines& Bus2(const string &value) // setter
9472 {
9473 APIUtil::ErrorChecker error_checker(api_util);
9474 ctx_Lines_Set_Bus2(ctx, value.c_str());
9475 return *this;
9476 }
9477
9481 double C0() // getter
9482 {
9483 APIUtil::ErrorChecker error_checker(api_util);
9484 return ctx_Lines_Get_C0(ctx);
9485 }
9486 ILines& C0(double value) // setter
9487 {
9488 APIUtil::ErrorChecker error_checker(api_util);
9489 ctx_Lines_Set_C0(ctx, value);
9490 return *this;
9491 }
9492
9496 double C1() // getter
9497 {
9498 APIUtil::ErrorChecker error_checker(api_util);
9499 return ctx_Lines_Get_C1(ctx);
9500 }
9501 ILines& C1(double value) // setter
9502 {
9503 APIUtil::ErrorChecker error_checker(api_util);
9504 ctx_Lines_Set_C1(ctx, value);
9505 return *this;
9506 }
9507
9508 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9509 VectorT Cmatrix() // getter
9510 {
9511 APIUtil::ErrorChecker error_checker(api_util);
9512 ctx_Lines_Get_Cmatrix_GR(ctx);
9513 return api_util->get_float64_gr_array<VectorT>();
9514 }
9515 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9516 ILines& Cmatrix(const VectorT &value) // setter
9517 {
9518 APIUtil::ErrorChecker error_checker(api_util);
9519 ctx_Lines_Set_Cmatrix(ctx, &value[0], value.size());
9520 return *this;
9521 }
9522
9526 double EmergAmps() // getter
9527 {
9528 APIUtil::ErrorChecker error_checker(api_util);
9529 return ctx_Lines_Get_EmergAmps(ctx);
9530 }
9531 ILines& EmergAmps(double value) // setter
9532 {
9533 APIUtil::ErrorChecker error_checker(api_util);
9534 ctx_Lines_Set_EmergAmps(ctx, value);
9535 return *this;
9536 }
9537
9541 string Geometry() // getter
9542 {
9543 APIUtil::ErrorChecker error_checker(api_util);
9544 return ctx_Lines_Get_Geometry(ctx);
9545 }
9546 ILines& Geometry(const char *value) // setter
9547 {
9548 APIUtil::ErrorChecker error_checker(api_util);
9549 ctx_Lines_Set_Geometry(ctx, value);
9550 return *this;
9551 }
9552 ILines& Geometry(const string &value) // setter
9553 {
9554 APIUtil::ErrorChecker error_checker(api_util);
9555 ctx_Lines_Set_Geometry(ctx, value.c_str());
9556 return *this;
9557 }
9558
9562 double Length() // getter
9563 {
9564 APIUtil::ErrorChecker error_checker(api_util);
9565 return ctx_Lines_Get_Length(ctx);
9566 }
9567 ILines& Length(double value) // setter
9568 {
9569 APIUtil::ErrorChecker error_checker(api_util);
9570 ctx_Lines_Set_Length(ctx, value);
9571 return *this;
9572 }
9573
9577 string LineCode() // getter
9578 {
9579 APIUtil::ErrorChecker error_checker(api_util);
9580 return ctx_Lines_Get_LineCode(ctx);
9581 }
9582 ILines& LineCode(const char *value) // setter
9583 {
9584 APIUtil::ErrorChecker error_checker(api_util);
9585 ctx_Lines_Set_LineCode(ctx, value);
9586 return *this;
9587 }
9588 ILines& LineCode(const string &value) // setter
9589 {
9590 APIUtil::ErrorChecker error_checker(api_util);
9591 ctx_Lines_Set_LineCode(ctx, value.c_str());
9592 return *this;
9593 }
9594
9598 double NormAmps() // getter
9599 {
9600 APIUtil::ErrorChecker error_checker(api_util);
9601 return ctx_Lines_Get_NormAmps(ctx);
9602 }
9603 ILines& NormAmps(double value) // setter
9604 {
9605 APIUtil::ErrorChecker error_checker(api_util);
9606 ctx_Lines_Set_NormAmps(ctx, value);
9607 return *this;
9608 }
9609
9613 int32_t NumCust() // getter
9614 {
9615 APIUtil::ErrorChecker error_checker(api_util);
9616 return ctx_Lines_Get_NumCust(ctx);
9617 }
9618
9622 int32_t Parent() // getter
9623 {
9624 APIUtil::ErrorChecker error_checker(api_util);
9625 return ctx_Lines_Get_Parent(ctx);
9626 }
9627
9631 int32_t Phases() // getter
9632 {
9633 APIUtil::ErrorChecker error_checker(api_util);
9634 return ctx_Lines_Get_Phases(ctx);
9635 }
9636 ILines& Phases(int32_t value) // setter
9637 {
9638 APIUtil::ErrorChecker error_checker(api_util);
9639 ctx_Lines_Set_Phases(ctx, value);
9640 return *this;
9641 }
9642
9646 double R0() // getter
9647 {
9648 APIUtil::ErrorChecker error_checker(api_util);
9649 return ctx_Lines_Get_R0(ctx);
9650 }
9651 ILines& R0(double value) // setter
9652 {
9653 APIUtil::ErrorChecker error_checker(api_util);
9654 ctx_Lines_Set_R0(ctx, value);
9655 return *this;
9656 }
9657
9661 double R1() // getter
9662 {
9663 APIUtil::ErrorChecker error_checker(api_util);
9664 return ctx_Lines_Get_R1(ctx);
9665 }
9666 ILines& R1(double value) // setter
9667 {
9668 APIUtil::ErrorChecker error_checker(api_util);
9669 ctx_Lines_Set_R1(ctx, value);
9670 return *this;
9671 }
9672
9676 double Rg() // getter
9677 {
9678 APIUtil::ErrorChecker error_checker(api_util);
9679 return ctx_Lines_Get_Rg(ctx);
9680 }
9681 ILines& Rg(double value) // setter
9682 {
9683 APIUtil::ErrorChecker error_checker(api_util);
9684 ctx_Lines_Set_Rg(ctx, value);
9685 return *this;
9686 }
9687
9691 double Rho() // getter
9692 {
9693 APIUtil::ErrorChecker error_checker(api_util);
9694 return ctx_Lines_Get_Rho(ctx);
9695 }
9696 ILines& Rho(double value) // setter
9697 {
9698 APIUtil::ErrorChecker error_checker(api_util);
9699 ctx_Lines_Set_Rho(ctx, value);
9700 return *this;
9701 }
9702
9706 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9707 VectorT Rmatrix() // getter
9708 {
9709 APIUtil::ErrorChecker error_checker(api_util);
9710 ctx_Lines_Get_Rmatrix_GR(ctx);
9711 return api_util->get_float64_gr_array<VectorT>();
9712 }
9713 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9714 ILines& Rmatrix(const VectorT &value) // setter
9715 {
9716 APIUtil::ErrorChecker error_checker(api_util);
9717 ctx_Lines_Set_Rmatrix(ctx, &value[0], value.size());
9718 return *this;
9719 }
9720
9724 string Spacing() // getter
9725 {
9726 APIUtil::ErrorChecker error_checker(api_util);
9727 return ctx_Lines_Get_Spacing(ctx);
9728 }
9729 ILines& Spacing(const char *value) // setter
9730 {
9731 APIUtil::ErrorChecker error_checker(api_util);
9732 ctx_Lines_Set_Spacing(ctx, value);
9733 return *this;
9734 }
9735 ILines& Spacing(const string &value) // setter
9736 {
9737 APIUtil::ErrorChecker error_checker(api_util);
9738 ctx_Lines_Set_Spacing(ctx, value.c_str());
9739 return *this;
9740 }
9741
9745 int32_t TotalCust() // getter
9746 {
9747 APIUtil::ErrorChecker error_checker(api_util);
9748 return ctx_Lines_Get_TotalCust(ctx);
9749 }
9750
9751 int32_t Units() // getter
9752 {
9753 APIUtil::ErrorChecker error_checker(api_util);
9754 return ctx_Lines_Get_Units(ctx);
9755 }
9756 ILines& Units(int32_t value) // setter
9757 {
9758 APIUtil::ErrorChecker error_checker(api_util);
9759 ctx_Lines_Set_Units(ctx, value);
9760 return *this;
9761 }
9762
9766 double X0() // getter
9767 {
9768 APIUtil::ErrorChecker error_checker(api_util);
9769 return ctx_Lines_Get_X0(ctx);
9770 }
9771 ILines& X0(double value) // setter
9772 {
9773 APIUtil::ErrorChecker error_checker(api_util);
9774 ctx_Lines_Set_X0(ctx, value);
9775 return *this;
9776 }
9777
9781 double X1() // getter
9782 {
9783 APIUtil::ErrorChecker error_checker(api_util);
9784 return ctx_Lines_Get_X1(ctx);
9785 }
9786 ILines& X1(double value) // setter
9787 {
9788 APIUtil::ErrorChecker error_checker(api_util);
9789 ctx_Lines_Set_X1(ctx, value);
9790 return *this;
9791 }
9792
9796 double Xg() // getter
9797 {
9798 APIUtil::ErrorChecker error_checker(api_util);
9799 return ctx_Lines_Get_Xg(ctx);
9800 }
9801 ILines& Xg(double value) // setter
9802 {
9803 APIUtil::ErrorChecker error_checker(api_util);
9804 ctx_Lines_Set_Xg(ctx, value);
9805 return *this;
9806 }
9807
9808 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9809 VectorT Xmatrix() // getter
9810 {
9811 APIUtil::ErrorChecker error_checker(api_util);
9812 ctx_Lines_Get_Xmatrix_GR(ctx);
9813 return api_util->get_float64_gr_array<VectorT>();
9814 }
9815 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9816 ILines& Xmatrix(const VectorT &value) // setter
9817 {
9818 APIUtil::ErrorChecker error_checker(api_util);
9819 ctx_Lines_Set_Xmatrix(ctx, &value[0], value.size());
9820 return *this;
9821 }
9822
9826 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9827 VectorT Yprim() // getter
9828 {
9829 APIUtil::ErrorChecker error_checker(api_util);
9830 ctx_Lines_Get_Yprim_GR(ctx);
9831 return api_util->get_float64_gr_array<VectorT>();
9832 }
9833 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
9834 ILines& Yprim(const VectorT &value) // setter
9835 {
9836 APIUtil::ErrorChecker error_checker(api_util);
9837 ctx_Lines_Set_Yprim(ctx, &value[0], value.size());
9838 return *this;
9839 }
9840
9844 double SeasonRating() // getter
9845 {
9846 APIUtil::ErrorChecker error_checker(api_util);
9847 return ctx_Lines_Get_SeasonRating(ctx);
9848 }
9849
9853 bool IsSwitch() // getter
9854 {
9855 APIUtil::ErrorChecker error_checker(api_util);
9856 return (ctx_Lines_Get_IsSwitch(ctx) != 0);
9857 }
9858 ILines& IsSwitch(bool value) // setter
9859 {
9860 APIUtil::ErrorChecker error_checker(api_util);
9861 ctx_Lines_Set_IsSwitch(ctx, value);
9862 return *this;
9863 }
9864 };
9865
9866 class ILoads: public ContextState
9867 {
9868 public:
9869
9870 ILoads(dss::APIUtil *util) :
9871 ContextState(util)
9872 {
9873 }
9874
9878 strings AllNames() // getter
9879 {
9880 APIUtil::ErrorChecker error_checker(api_util);
9881 return api_util->get_string_array(ctx_Loads_Get_AllNames);
9882 }
9883
9887 int32_t Count() // getter
9888 {
9889 APIUtil::ErrorChecker error_checker(api_util);
9890 return ctx_Loads_Get_Count(ctx);
9891 }
9892
9896 int32_t First() // getter
9897 {
9898 APIUtil::ErrorChecker error_checker(api_util);
9899 return ctx_Loads_Get_First(ctx);
9900 }
9901
9905 string Name() // getter
9906 {
9907 APIUtil::ErrorChecker error_checker(api_util);
9908 return ctx_Loads_Get_Name(ctx);
9909 }
9910
9914 ILoads& Name(const char *value)
9915 {
9916 APIUtil::ErrorChecker error_checker(api_util);
9917 ctx_Loads_Set_Name(ctx, value);
9918 return *this;
9919 }
9920 ILoads& Name(const string &value)
9921 {
9922 return Name(value.c_str());
9923 }
9924
9928 int32_t Next() // getter
9929 {
9930 APIUtil::ErrorChecker error_checker(api_util);
9931 return ctx_Loads_Get_Next(ctx);
9932 }
9933
9937 int32_t idx() // getter
9938 {
9939 APIUtil::ErrorChecker error_checker(api_util);
9940 return ctx_Loads_Get_idx(ctx);
9941 }
9942
9946 void idx(int32_t value) // setter
9947 {
9948 APIUtil::ErrorChecker error_checker(api_util);
9949 ctx_Loads_Set_idx(ctx, value);
9950 }
9951
9955 double AllocationFactor() // getter
9956 {
9957 APIUtil::ErrorChecker error_checker(api_util);
9958 return ctx_Loads_Get_AllocationFactor(ctx);
9959 }
9960 ILoads& AllocationFactor(double value) // setter
9961 {
9962 APIUtil::ErrorChecker error_checker(api_util);
9963 ctx_Loads_Set_AllocationFactor(ctx, value);
9964 return *this;
9965 }
9966
9970 string CVRcurve() // getter
9971 {
9972 APIUtil::ErrorChecker error_checker(api_util);
9973 return ctx_Loads_Get_CVRcurve(ctx);
9974 }
9975 ILoads& CVRcurve(const char *value) // setter
9976 {
9977 APIUtil::ErrorChecker error_checker(api_util);
9978 ctx_Loads_Set_CVRcurve(ctx, value);
9979 return *this;
9980 }
9981 ILoads& CVRcurve(const string &value) // setter
9982 {
9983 APIUtil::ErrorChecker error_checker(api_util);
9984 ctx_Loads_Set_CVRcurve(ctx, value.c_str());
9985 return *this;
9986 }
9987
9991 double CVRvars() // getter
9992 {
9993 APIUtil::ErrorChecker error_checker(api_util);
9994 return ctx_Loads_Get_CVRvars(ctx);
9995 }
9996 ILoads& CVRvars(double value) // setter
9997 {
9998 APIUtil::ErrorChecker error_checker(api_util);
9999 ctx_Loads_Set_CVRvars(ctx, value);
10000 return *this;
10001 }
10002
10006 double CVRwatts() // getter
10007 {
10008 APIUtil::ErrorChecker error_checker(api_util);
10009 return ctx_Loads_Get_CVRwatts(ctx);
10010 }
10011 ILoads& CVRwatts(double value) // setter
10012 {
10013 APIUtil::ErrorChecker error_checker(api_util);
10014 ctx_Loads_Set_CVRwatts(ctx, value);
10015 return *this;
10016 }
10017
10021 double Cfactor() // getter
10022 {
10023 APIUtil::ErrorChecker error_checker(api_util);
10024 return ctx_Loads_Get_Cfactor(ctx);
10025 }
10026 ILoads& Cfactor(double value) // setter
10027 {
10028 APIUtil::ErrorChecker error_checker(api_util);
10029 ctx_Loads_Set_Cfactor(ctx, value);
10030 return *this;
10031 }
10032
10033 int32_t Class() // getter
10034 {
10035 APIUtil::ErrorChecker error_checker(api_util);
10036 return ctx_Loads_Get_Class_(ctx);
10037 }
10038 ILoads& Class(int32_t value) // setter
10039 {
10040 APIUtil::ErrorChecker error_checker(api_util);
10041 ctx_Loads_Set_Class_(ctx, value);
10042 return *this;
10043 }
10044
10048 string Growth() // getter
10049 {
10050 APIUtil::ErrorChecker error_checker(api_util);
10051 return ctx_Loads_Get_Growth(ctx);
10052 }
10053 ILoads& Growth(const char *value) // setter
10054 {
10055 APIUtil::ErrorChecker error_checker(api_util);
10056 ctx_Loads_Set_Growth(ctx, value);
10057 return *this;
10058 }
10059 ILoads& Growth(const string &value) // setter
10060 {
10061 APIUtil::ErrorChecker error_checker(api_util);
10062 ctx_Loads_Set_Growth(ctx, value.c_str());
10063 return *this;
10064 }
10065
10069 bool IsDelta() // getter
10070 {
10071 APIUtil::ErrorChecker error_checker(api_util);
10072 return (ctx_Loads_Get_IsDelta(ctx) != 0);
10073 }
10074 ILoads& IsDelta(bool value) // setter
10075 {
10076 APIUtil::ErrorChecker error_checker(api_util);
10077 ctx_Loads_Set_IsDelta(ctx, value);
10078 return *this;
10079 }
10080
10084 int32_t Model() // getter
10085 {
10086 APIUtil::ErrorChecker error_checker(api_util);
10087 return ctx_Loads_Get_Model(ctx);
10088 }
10089 ILoads& Model(int32_t value) // setter
10090 {
10091 APIUtil::ErrorChecker error_checker(api_util);
10092 ctx_Loads_Set_Model(ctx, value);
10093 return *this;
10094 }
10095
10099 int32_t NumCust() // getter
10100 {
10101 APIUtil::ErrorChecker error_checker(api_util);
10102 return ctx_Loads_Get_NumCust(ctx);
10103 }
10104 ILoads& NumCust(int32_t value) // setter
10105 {
10106 APIUtil::ErrorChecker error_checker(api_util);
10107 ctx_Loads_Set_NumCust(ctx, value);
10108 return *this;
10109 }
10110
10114 double PF() // getter
10115 {
10116 APIUtil::ErrorChecker error_checker(api_util);
10117 return ctx_Loads_Get_PF(ctx);
10118 }
10119 ILoads& PF(double value) // setter
10120 {
10121 APIUtil::ErrorChecker error_checker(api_util);
10122 ctx_Loads_Set_PF(ctx, value);
10123 return *this;
10124 }
10125
10129 double PctMean() // getter
10130 {
10131 APIUtil::ErrorChecker error_checker(api_util);
10132 return ctx_Loads_Get_PctMean(ctx);
10133 }
10134 ILoads& PctMean(double value) // setter
10135 {
10136 APIUtil::ErrorChecker error_checker(api_util);
10137 ctx_Loads_Set_PctMean(ctx, value);
10138 return *this;
10139 }
10140
10144 double PctStdDev() // getter
10145 {
10146 APIUtil::ErrorChecker error_checker(api_util);
10147 return ctx_Loads_Get_PctStdDev(ctx);
10148 }
10149 ILoads& PctStdDev(double value) // setter
10150 {
10151 APIUtil::ErrorChecker error_checker(api_util);
10152 ctx_Loads_Set_PctStdDev(ctx, value);
10153 return *this;
10154 }
10155
10159 double RelWeight() // getter
10160 {
10161 APIUtil::ErrorChecker error_checker(api_util);
10162 return ctx_Loads_Get_RelWeight(ctx);
10163 }
10164 ILoads& RelWeight(double value) // setter
10165 {
10166 APIUtil::ErrorChecker error_checker(api_util);
10167 ctx_Loads_Set_RelWeight(ctx, value);
10168 return *this;
10169 }
10170
10174 double Rneut() // getter
10175 {
10176 APIUtil::ErrorChecker error_checker(api_util);
10177 return ctx_Loads_Get_Rneut(ctx);
10178 }
10179 ILoads& Rneut(double value) // setter
10180 {
10181 APIUtil::ErrorChecker error_checker(api_util);
10182 ctx_Loads_Set_Rneut(ctx, value);
10183 return *this;
10184 }
10185
10189 string Spectrum() // getter
10190 {
10191 APIUtil::ErrorChecker error_checker(api_util);
10192 return ctx_Loads_Get_Spectrum(ctx);
10193 }
10194 ILoads& Spectrum(const char *value) // setter
10195 {
10196 APIUtil::ErrorChecker error_checker(api_util);
10197 ctx_Loads_Set_Spectrum(ctx, value);
10198 return *this;
10199 }
10200 ILoads& Spectrum(const string &value) // setter
10201 {
10202 APIUtil::ErrorChecker error_checker(api_util);
10203 ctx_Loads_Set_Spectrum(ctx, value.c_str());
10204 return *this;
10205 }
10206
10210 int32_t Status() // getter
10211 {
10212 APIUtil::ErrorChecker error_checker(api_util);
10213 return ctx_Loads_Get_Status(ctx);
10214 }
10215 ILoads& Status(int32_t value) // setter
10216 {
10217 APIUtil::ErrorChecker error_checker(api_util);
10218 ctx_Loads_Set_Status(ctx, value);
10219 return *this;
10220 }
10221
10225 double Vmaxpu() // getter
10226 {
10227 APIUtil::ErrorChecker error_checker(api_util);
10228 return ctx_Loads_Get_Vmaxpu(ctx);
10229 }
10230 ILoads& Vmaxpu(double value) // setter
10231 {
10232 APIUtil::ErrorChecker error_checker(api_util);
10233 ctx_Loads_Set_Vmaxpu(ctx, value);
10234 return *this;
10235 }
10236
10240 double Vminemerg() // getter
10241 {
10242 APIUtil::ErrorChecker error_checker(api_util);
10243 return ctx_Loads_Get_Vminemerg(ctx);
10244 }
10245 ILoads& Vminemerg(double value) // setter
10246 {
10247 APIUtil::ErrorChecker error_checker(api_util);
10248 ctx_Loads_Set_Vminemerg(ctx, value);
10249 return *this;
10250 }
10251
10255 double Vminnorm() // getter
10256 {
10257 APIUtil::ErrorChecker error_checker(api_util);
10258 return ctx_Loads_Get_Vminnorm(ctx);
10259 }
10260 ILoads& Vminnorm(double value) // setter
10261 {
10262 APIUtil::ErrorChecker error_checker(api_util);
10263 ctx_Loads_Set_Vminnorm(ctx, value);
10264 return *this;
10265 }
10266
10270 double Vminpu() // getter
10271 {
10272 APIUtil::ErrorChecker error_checker(api_util);
10273 return ctx_Loads_Get_Vminpu(ctx);
10274 }
10275 ILoads& Vminpu(double value) // setter
10276 {
10277 APIUtil::ErrorChecker error_checker(api_util);
10278 ctx_Loads_Set_Vminpu(ctx, value);
10279 return *this;
10280 }
10281
10285 double Xneut() // getter
10286 {
10287 APIUtil::ErrorChecker error_checker(api_util);
10288 return ctx_Loads_Get_Xneut(ctx);
10289 }
10290 ILoads& Xneut(double value) // setter
10291 {
10292 APIUtil::ErrorChecker error_checker(api_util);
10293 ctx_Loads_Set_Xneut(ctx, value);
10294 return *this;
10295 }
10296
10300 string Yearly() // getter
10301 {
10302 APIUtil::ErrorChecker error_checker(api_util);
10303 return ctx_Loads_Get_Yearly(ctx);
10304 }
10305 ILoads& Yearly(const char *value) // setter
10306 {
10307 APIUtil::ErrorChecker error_checker(api_util);
10308 ctx_Loads_Set_Yearly(ctx, value);
10309 return *this;
10310 }
10311 ILoads& Yearly(const string &value) // setter
10312 {
10313 APIUtil::ErrorChecker error_checker(api_util);
10314 ctx_Loads_Set_Yearly(ctx, value.c_str());
10315 return *this;
10316 }
10317
10321 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10322 VectorT ZIPV() // getter
10323 {
10324 APIUtil::ErrorChecker error_checker(api_util);
10325 ctx_Loads_Get_ZIPV_GR(ctx);
10326 return api_util->get_float64_gr_array<VectorT>();
10327 }
10328 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10329 ILoads& ZIPV(const VectorT &value) // setter
10330 {
10331 APIUtil::ErrorChecker error_checker(api_util);
10332 ctx_Loads_Set_ZIPV(ctx, &value[0], value.size());
10333 return *this;
10334 }
10335
10339 string daily() // getter
10340 {
10341 APIUtil::ErrorChecker error_checker(api_util);
10342 return ctx_Loads_Get_daily(ctx);
10343 }
10344 ILoads& daily(const char *value) // setter
10345 {
10346 APIUtil::ErrorChecker error_checker(api_util);
10347 ctx_Loads_Set_daily(ctx, value);
10348 return *this;
10349 }
10350 ILoads& daily(const string &value) // setter
10351 {
10352 APIUtil::ErrorChecker error_checker(api_util);
10353 ctx_Loads_Set_daily(ctx, value.c_str());
10354 return *this;
10355 }
10356
10360 string duty() // getter
10361 {
10362 APIUtil::ErrorChecker error_checker(api_util);
10363 return ctx_Loads_Get_duty(ctx);
10364 }
10365 ILoads& duty(const char *value) // setter
10366 {
10367 APIUtil::ErrorChecker error_checker(api_util);
10368 ctx_Loads_Set_duty(ctx, value);
10369 return *this;
10370 }
10371 ILoads& duty(const string &value) // setter
10372 {
10373 APIUtil::ErrorChecker error_checker(api_util);
10374 ctx_Loads_Set_duty(ctx, value.c_str());
10375 return *this;
10376 }
10377
10381 double kV() // getter
10382 {
10383 APIUtil::ErrorChecker error_checker(api_util);
10384 return ctx_Loads_Get_kV(ctx);
10385 }
10386 ILoads& kV(double value) // setter
10387 {
10388 APIUtil::ErrorChecker error_checker(api_util);
10389 ctx_Loads_Set_kV(ctx, value);
10390 return *this;
10391 }
10392
10396 double kW() // getter
10397 {
10398 APIUtil::ErrorChecker error_checker(api_util);
10399 return ctx_Loads_Get_kW(ctx);
10400 }
10401 ILoads& kW(double value) // setter
10402 {
10403 APIUtil::ErrorChecker error_checker(api_util);
10404 ctx_Loads_Set_kW(ctx, value);
10405 return *this;
10406 }
10407
10411 double kva() // getter
10412 {
10413 APIUtil::ErrorChecker error_checker(api_util);
10414 return ctx_Loads_Get_kva(ctx);
10415 }
10416 ILoads& kva(double value) // setter
10417 {
10418 APIUtil::ErrorChecker error_checker(api_util);
10419 ctx_Loads_Set_kva(ctx, value);
10420 return *this;
10421 }
10422
10426 double kvar() // getter
10427 {
10428 APIUtil::ErrorChecker error_checker(api_util);
10429 return ctx_Loads_Get_kvar(ctx);
10430 }
10431 ILoads& kvar(double value) // setter
10432 {
10433 APIUtil::ErrorChecker error_checker(api_util);
10434 ctx_Loads_Set_kvar(ctx, value);
10435 return *this;
10436 }
10437
10441 double kwh() // getter
10442 {
10443 APIUtil::ErrorChecker error_checker(api_util);
10444 return ctx_Loads_Get_kwh(ctx);
10445 }
10446 ILoads& kwh(double value) // setter
10447 {
10448 APIUtil::ErrorChecker error_checker(api_util);
10449 ctx_Loads_Set_kwh(ctx, value);
10450 return *this;
10451 }
10452
10456 double kwhdays() // getter
10457 {
10458 APIUtil::ErrorChecker error_checker(api_util);
10459 return ctx_Loads_Get_kwhdays(ctx);
10460 }
10461 ILoads& kwhdays(double value) // setter
10462 {
10463 APIUtil::ErrorChecker error_checker(api_util);
10464 ctx_Loads_Set_kwhdays(ctx, value);
10465 return *this;
10466 }
10467
10471 double pctSeriesRL() // getter
10472 {
10473 APIUtil::ErrorChecker error_checker(api_util);
10474 return ctx_Loads_Get_pctSeriesRL(ctx);
10475 }
10476 ILoads& pctSeriesRL(double value) // setter
10477 {
10478 APIUtil::ErrorChecker error_checker(api_util);
10479 ctx_Loads_Set_pctSeriesRL(ctx, value);
10480 return *this;
10481 }
10482
10486 double xfkVA() // getter
10487 {
10488 APIUtil::ErrorChecker error_checker(api_util);
10489 return ctx_Loads_Get_xfkVA(ctx);
10490 }
10491 ILoads& xfkVA(double value) // setter
10492 {
10493 APIUtil::ErrorChecker error_checker(api_util);
10494 ctx_Loads_Set_xfkVA(ctx, value);
10495 return *this;
10496 }
10497
10501 string Sensor() // getter
10502 {
10503 APIUtil::ErrorChecker error_checker(api_util);
10504 return ctx_Loads_Get_Sensor(ctx);
10505 }
10506
10510 int32_t Phases() // getter
10511 {
10512 APIUtil::ErrorChecker error_checker(api_util);
10513 return ctx_Loads_Get_Phases(ctx);
10514 }
10515 ILoads& Phases(int32_t value) // setter
10516 {
10517 APIUtil::ErrorChecker error_checker(api_util);
10518 ctx_Loads_Set_Phases(ctx, value);
10519 return *this;
10520 }
10521 };
10522
10524 {
10525 public:
10526
10527 ISettings(dss::APIUtil *util) :
10528 ContextState(util)
10529 {
10530 }
10531
10535 bool AllowDuplicates() // getter
10536 {
10537 APIUtil::ErrorChecker error_checker(api_util);
10538 return (ctx_Settings_Get_AllowDuplicates(ctx) != 0);
10539 }
10540 ISettings& AllowDuplicates(bool value) // setter
10541 {
10542 APIUtil::ErrorChecker error_checker(api_util);
10543 ctx_Settings_Set_AllowDuplicates(ctx, value);
10544 return *this;
10545 }
10546
10550 string AutoBusList() // getter
10551 {
10552 APIUtil::ErrorChecker error_checker(api_util);
10553 return ctx_Settings_Get_AutoBusList(ctx);
10554 }
10555 ISettings& AutoBusList(const char *value) // setter
10556 {
10557 APIUtil::ErrorChecker error_checker(api_util);
10558 ctx_Settings_Set_AutoBusList(ctx, value);
10559 return *this;
10560 }
10561 ISettings& AutoBusList(const string &value) // setter
10562 {
10563 APIUtil::ErrorChecker error_checker(api_util);
10564 ctx_Settings_Set_AutoBusList(ctx, value.c_str());
10565 return *this;
10566 }
10567
10571 int32_t CktModel() // getter
10572 {
10573 APIUtil::ErrorChecker error_checker(api_util);
10574 return ctx_Settings_Get_CktModel(ctx);
10575 }
10576 ISettings& CktModel(int32_t value) // setter
10577 {
10578 APIUtil::ErrorChecker error_checker(api_util);
10579 ctx_Settings_Set_CktModel(ctx, value);
10580 return *this;
10581 }
10582
10586 bool ControlTrace() // getter
10587 {
10588 APIUtil::ErrorChecker error_checker(api_util);
10589 return (ctx_Settings_Get_ControlTrace(ctx) != 0);
10590 }
10591 ISettings& ControlTrace(bool value) // setter
10592 {
10593 APIUtil::ErrorChecker error_checker(api_util);
10594 ctx_Settings_Set_ControlTrace(ctx, value);
10595 return *this;
10596 }
10597
10601 double EmergVmaxpu() // getter
10602 {
10603 APIUtil::ErrorChecker error_checker(api_util);
10604 return ctx_Settings_Get_EmergVmaxpu(ctx);
10605 }
10606 ISettings& EmergVmaxpu(double value) // setter
10607 {
10608 APIUtil::ErrorChecker error_checker(api_util);
10609 ctx_Settings_Set_EmergVmaxpu(ctx, value);
10610 return *this;
10611 }
10612
10616 double EmergVminpu() // getter
10617 {
10618 APIUtil::ErrorChecker error_checker(api_util);
10619 return ctx_Settings_Get_EmergVminpu(ctx);
10620 }
10621 ISettings& EmergVminpu(double value) // setter
10622 {
10623 APIUtil::ErrorChecker error_checker(api_util);
10624 ctx_Settings_Set_EmergVminpu(ctx, value);
10625 return *this;
10626 }
10627
10631 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
10632 VectorT LossRegs() // getter
10633 {
10634 APIUtil::ErrorChecker error_checker(api_util);
10635 ctx_Settings_Get_LossRegs_GR(ctx);
10636 return api_util->get_int32_gr_array<VectorT>();
10637 }
10638 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
10639 ISettings& LossRegs(const VectorT &value) // setter
10640 {
10641 APIUtil::ErrorChecker error_checker(api_util);
10642 ctx_Settings_Set_LossRegs(ctx, &value[0], value.size());
10643 return *this;
10644 }
10645
10649 double LossWeight() // getter
10650 {
10651 APIUtil::ErrorChecker error_checker(api_util);
10652 return ctx_Settings_Get_LossWeight(ctx);
10653 }
10654 ISettings& LossWeight(double value) // setter
10655 {
10656 APIUtil::ErrorChecker error_checker(api_util);
10657 ctx_Settings_Set_LossWeight(ctx, value);
10658 return *this;
10659 }
10660
10664 double NormVmaxpu() // getter
10665 {
10666 APIUtil::ErrorChecker error_checker(api_util);
10667 return ctx_Settings_Get_NormVmaxpu(ctx);
10668 }
10669 ISettings& NormVmaxpu(double value) // setter
10670 {
10671 APIUtil::ErrorChecker error_checker(api_util);
10672 ctx_Settings_Set_NormVmaxpu(ctx, value);
10673 return *this;
10674 }
10675
10679 double NormVminpu() // getter
10680 {
10681 APIUtil::ErrorChecker error_checker(api_util);
10682 return ctx_Settings_Get_NormVminpu(ctx);
10683 }
10684 ISettings& NormVminpu(double value) // setter
10685 {
10686 APIUtil::ErrorChecker error_checker(api_util);
10687 ctx_Settings_Set_NormVminpu(ctx, value);
10688 return *this;
10689 }
10690
10694 string PriceCurve() // getter
10695 {
10696 APIUtil::ErrorChecker error_checker(api_util);
10697 return ctx_Settings_Get_PriceCurve(ctx);
10698 }
10699 ISettings& PriceCurve(const char *value) // setter
10700 {
10701 APIUtil::ErrorChecker error_checker(api_util);
10702 ctx_Settings_Set_PriceCurve(ctx, value);
10703 return *this;
10704 }
10705 ISettings& PriceCurve(const string &value) // setter
10706 {
10707 APIUtil::ErrorChecker error_checker(api_util);
10708 ctx_Settings_Set_PriceCurve(ctx, value.c_str());
10709 return *this;
10710 }
10711
10715 double PriceSignal() // getter
10716 {
10717 APIUtil::ErrorChecker error_checker(api_util);
10718 return ctx_Settings_Get_PriceSignal(ctx);
10719 }
10720 ISettings& PriceSignal(double value) // setter
10721 {
10722 APIUtil::ErrorChecker error_checker(api_util);
10723 ctx_Settings_Set_PriceSignal(ctx, value);
10724 return *this;
10725 }
10726
10730 bool Trapezoidal() // getter
10731 {
10732 APIUtil::ErrorChecker error_checker(api_util);
10733 return (ctx_Settings_Get_Trapezoidal(ctx) != 0);
10734 }
10735 ISettings& Trapezoidal(bool value) // setter
10736 {
10737 APIUtil::ErrorChecker error_checker(api_util);
10738 ctx_Settings_Set_Trapezoidal(ctx, value);
10739 return *this;
10740 }
10741
10745 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
10746 VectorT UEregs() // getter
10747 {
10748 APIUtil::ErrorChecker error_checker(api_util);
10749 ctx_Settings_Get_UEregs_GR(ctx);
10750 return api_util->get_int32_gr_array<VectorT>();
10751 }
10752 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
10753 ISettings& UEregs(const VectorT &value) // setter
10754 {
10755 APIUtil::ErrorChecker error_checker(api_util);
10756 ctx_Settings_Set_UEregs(ctx, &value[0], value.size());
10757 return *this;
10758 }
10759
10763 double UEweight() // getter
10764 {
10765 APIUtil::ErrorChecker error_checker(api_util);
10766 return ctx_Settings_Get_UEweight(ctx);
10767 }
10768 ISettings& UEweight(double value) // setter
10769 {
10770 APIUtil::ErrorChecker error_checker(api_util);
10771 ctx_Settings_Set_UEweight(ctx, value);
10772 return *this;
10773 }
10774
10778 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10779 VectorT VoltageBases() // getter
10780 {
10781 APIUtil::ErrorChecker error_checker(api_util);
10782 ctx_Settings_Get_VoltageBases_GR(ctx);
10783 return api_util->get_float64_gr_array<VectorT>();
10784 }
10785 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10786 ISettings& VoltageBases(const VectorT &value) // setter
10787 {
10788 APIUtil::ErrorChecker error_checker(api_util);
10789 ctx_Settings_Set_VoltageBases(ctx, &value[0], value.size());
10790 return *this;
10791 }
10792
10796 bool ZoneLock() // getter
10797 {
10798 APIUtil::ErrorChecker error_checker(api_util);
10799 return (ctx_Settings_Get_ZoneLock(ctx) != 0);
10800 }
10801 ISettings& ZoneLock(bool value) // setter
10802 {
10803 APIUtil::ErrorChecker error_checker(api_util);
10804 ctx_Settings_Set_ZoneLock(ctx, value);
10805 return *this;
10806 }
10807
10811 ISettings& AllocationFactors(double value) // setter
10812 {
10813 APIUtil::ErrorChecker error_checker(api_util);
10814 ctx_Settings_Set_AllocationFactors(ctx, value);
10815 return *this;
10816 }
10817
10824 bool LoadsTerminalCheck() // getter
10825 {
10826 APIUtil::ErrorChecker error_checker(api_util);
10827 return (ctx_Settings_Get_LoadsTerminalCheck(ctx) != 0);
10828 }
10829 ISettings& LoadsTerminalCheck(bool value) // setter
10830 {
10831 APIUtil::ErrorChecker error_checker(api_util);
10832 ctx_Settings_Set_LoadsTerminalCheck(ctx, value);
10833 return *this;
10834 }
10835
10846 int32_t IterateDisabled() // getter
10847 {
10848 APIUtil::ErrorChecker error_checker(api_util);
10849 return ctx_Settings_Get_IterateDisabled(ctx);
10850 }
10851 ISettings& IterateDisabled(int32_t value) // setter
10852 {
10853 APIUtil::ErrorChecker error_checker(api_util);
10854 ctx_Settings_Set_IterateDisabled(ctx, value);
10855 return *this;
10856 }
10857 };
10858
10860 {
10861 public:
10862 IDSSProperty Properties;
10863
10864 ICktElement(dss::APIUtil *util) :
10865 ContextState(util),
10866 Properties(util)
10867 {
10868 }
10869
10873 double Variable(const char *MyVarName, int32_t &Code)
10874 {
10875 APIUtil::ErrorChecker error_checker(api_util);
10876 return ctx_CktElement_Get_Variable(ctx, MyVarName, &Code);
10877 }
10878 double Variable(const string &MyVarName, int32_t &Code)
10879 {
10880 return Variable(MyVarName.c_str(), Code);
10881 }
10882
10886 double Variablei(int32_t Idx, int32_t &Code)
10887 {
10888 APIUtil::ErrorChecker error_checker(api_util);
10889 return ctx_CktElement_Get_Variablei(ctx, Idx, &Code);
10890 }
10891
10892 int32_t setVariableByIndex(int32_t Idx, double Value)
10893 {
10894 APIUtil::ErrorChecker error_checker(api_util);
10895 int32_t Code = 0;
10896 ctx_CktElement_Set_Variablei(ctx, Idx, &Code, Value);
10897 return Code;
10898 }
10899
10900 int32_t setVariableByName(const char *name, double Value)
10901 {
10902 APIUtil::ErrorChecker error_checker(api_util);
10903 int32_t Code = 0;
10904 ctx_CktElement_Set_Variable(ctx, name, &Code, Value);
10905 return Code;
10906 }
10907 int32_t setVariableByName(const string &name, double Value)
10908 {
10909 return setVariableByName(name.c_str(), Value);
10910 }
10911 void Close(int32_t Term, int32_t Phs)
10912 {
10913 APIUtil::ErrorChecker error_checker(api_util);
10914 ctx_CktElement_Close(ctx, Term, Phs);
10915 }
10919 string Controller(int32_t idx)
10920 {
10921 APIUtil::ErrorChecker error_checker(api_util);
10922 return ctx_CktElement_Get_Controller(ctx, idx);
10923 }
10924 bool IsOpen(int32_t Term, int32_t Phs)
10925 {
10926 APIUtil::ErrorChecker error_checker(api_util);
10927 return (ctx_CktElement_IsOpen(ctx, Term, Phs) != 0);
10928 }
10929 void Open(int32_t Term, int32_t Phs)
10930 {
10931 APIUtil::ErrorChecker error_checker(api_util);
10932 ctx_CktElement_Open(ctx, Term, Phs);
10933 }
10934
10938 strings AllPropertyNames() // getter
10939 {
10940 APIUtil::ErrorChecker error_checker(api_util);
10941 return api_util->get_string_array(ctx_CktElement_Get_AllPropertyNames);
10942 }
10943
10947 strings AllVariableNames() // getter
10948 {
10949 APIUtil::ErrorChecker error_checker(api_util);
10950 return api_util->get_string_array(ctx_CktElement_Get_AllVariableNames);
10951 }
10952
10956 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10957 VectorT AllVariableValues() // getter
10958 {
10959 APIUtil::ErrorChecker error_checker(api_util);
10960 ctx_CktElement_Get_AllVariableValues_GR(ctx);
10961 return api_util->get_float64_gr_array<VectorT>();
10962 }
10963
10967 strings BusNames() // getter
10968 {
10969 APIUtil::ErrorChecker error_checker(api_util);
10970 return api_util->get_string_array(ctx_CktElement_Get_BusNames);
10971 }
10972 ICktElement& BusNames(const strings &value) // setter
10973 {
10974 APIUtil::ErrorChecker error_checker(api_util);
10975 api_util->set_string_array(ctx_CktElement_Set_BusNames, value);
10976 return *this;
10977 }
10978
10982 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10983 VectorT CplxSeqCurrents() // getter
10984 {
10985 APIUtil::ErrorChecker error_checker(api_util);
10986 ctx_CktElement_Get_CplxSeqCurrents_GR(ctx);
10987 return api_util->get_float64_gr_array<VectorT>();
10988 }
10989
10993 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
10994 VectorT CplxSeqVoltages() // getter
10995 {
10996 APIUtil::ErrorChecker error_checker(api_util);
10997 ctx_CktElement_Get_CplxSeqVoltages_GR(ctx);
10998 return api_util->get_float64_gr_array<VectorT>();
10999 }
11000
11004 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11005 VectorT Currents() // getter
11006 {
11007 APIUtil::ErrorChecker error_checker(api_util);
11008 ctx_CktElement_Get_Currents_GR(ctx);
11009 return api_util->get_float64_gr_array<VectorT>();
11010 }
11011
11015 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11016 VectorT CurrentsMagAng() // getter
11017 {
11018 APIUtil::ErrorChecker error_checker(api_util);
11019 ctx_CktElement_Get_CurrentsMagAng_GR(ctx);
11020 return api_util->get_float64_gr_array<VectorT>();
11021 }
11022
11026 string DisplayName() // getter
11027 {
11028 APIUtil::ErrorChecker error_checker(api_util);
11029 return ctx_CktElement_Get_DisplayName(ctx);
11030 }
11031 ICktElement& DisplayName(const char *value) // setter
11032 {
11033 APIUtil::ErrorChecker error_checker(api_util);
11034 ctx_CktElement_Set_DisplayName(ctx, value);
11035 return *this;
11036 }
11037 ICktElement& DisplayName(const string &value) // setter
11038 {
11039 APIUtil::ErrorChecker error_checker(api_util);
11040 ctx_CktElement_Set_DisplayName(ctx, value.c_str());
11041 return *this;
11042 }
11043
11047 double EmergAmps() // getter
11048 {
11049 APIUtil::ErrorChecker error_checker(api_util);
11050 return ctx_CktElement_Get_EmergAmps(ctx);
11051 }
11052 ICktElement& EmergAmps(double value) // setter
11053 {
11054 APIUtil::ErrorChecker error_checker(api_util);
11055 ctx_CktElement_Set_EmergAmps(ctx, value);
11056 return *this;
11057 }
11058
11062 bool Enabled() // getter
11063 {
11064 APIUtil::ErrorChecker error_checker(api_util);
11065 return (ctx_CktElement_Get_Enabled(ctx) != 0);
11066 }
11067 ICktElement& Enabled(bool value) // setter
11068 {
11069 APIUtil::ErrorChecker error_checker(api_util);
11070 ctx_CktElement_Set_Enabled(ctx, value);
11071 return *this;
11072 }
11073
11077 string EnergyMeter() // getter
11078 {
11079 APIUtil::ErrorChecker error_checker(api_util);
11080 return ctx_CktElement_Get_EnergyMeter(ctx);
11081 }
11082
11086 string GUID() // getter
11087 {
11088 APIUtil::ErrorChecker error_checker(api_util);
11089 return ctx_CktElement_Get_GUID(ctx);
11090 }
11091
11095 int32_t Handle() // getter
11096 {
11097 APIUtil::ErrorChecker error_checker(api_util);
11098 return ctx_CktElement_Get_Handle(ctx);
11099 }
11100
11104 bool HasOCPDevice() // getter
11105 {
11106 APIUtil::ErrorChecker error_checker(api_util);
11107 return (ctx_CktElement_Get_HasOCPDevice(ctx) != 0);
11108 }
11109
11113 bool HasSwitchControl() // getter
11114 {
11115 APIUtil::ErrorChecker error_checker(api_util);
11116 return (ctx_CktElement_Get_HasSwitchControl(ctx) != 0);
11117 }
11118
11122 bool HasVoltControl() // getter
11123 {
11124 APIUtil::ErrorChecker error_checker(api_util);
11125 return (ctx_CktElement_Get_HasVoltControl(ctx) != 0);
11126 }
11127
11131 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11132 VectorT Losses() // getter
11133 {
11134 APIUtil::ErrorChecker error_checker(api_util);
11135 ctx_CktElement_Get_Losses_GR(ctx);
11136 return api_util->get_float64_gr_array<VectorT>();
11137 }
11138
11142 string Name() // getter
11143 {
11144 APIUtil::ErrorChecker error_checker(api_util);
11145 return ctx_CktElement_Get_Name(ctx);
11146 }
11147
11151 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
11152 VectorT NodeOrder() // getter
11153 {
11154 APIUtil::ErrorChecker error_checker(api_util);
11155 ctx_CktElement_Get_NodeOrder_GR(ctx);
11156 return api_util->get_int32_gr_array<VectorT>();
11157 }
11158
11162 double NormalAmps() // getter
11163 {
11164 APIUtil::ErrorChecker error_checker(api_util);
11165 return ctx_CktElement_Get_NormalAmps(ctx);
11166 }
11167 ICktElement& NormalAmps(double value) // setter
11168 {
11169 APIUtil::ErrorChecker error_checker(api_util);
11170 ctx_CktElement_Set_NormalAmps(ctx, value);
11171 return *this;
11172 }
11173
11177 int32_t NumConductors() // getter
11178 {
11179 APIUtil::ErrorChecker error_checker(api_util);
11180 return ctx_CktElement_Get_NumConductors(ctx);
11181 }
11182
11187 int32_t NumControls() // getter
11188 {
11189 APIUtil::ErrorChecker error_checker(api_util);
11190 return ctx_CktElement_Get_NumControls(ctx);
11191 }
11192
11196 int32_t NumPhases() // getter
11197 {
11198 APIUtil::ErrorChecker error_checker(api_util);
11199 return ctx_CktElement_Get_NumPhases(ctx);
11200 }
11201
11205 int32_t NumProperties() // getter
11206 {
11207 APIUtil::ErrorChecker error_checker(api_util);
11208 return ctx_CktElement_Get_NumProperties(ctx);
11209 }
11210
11214 int32_t NumTerminals() // getter
11215 {
11216 APIUtil::ErrorChecker error_checker(api_util);
11217 return ctx_CktElement_Get_NumTerminals(ctx);
11218 }
11219
11223 int32_t OCPDevIndex() // getter
11224 {
11225 APIUtil::ErrorChecker error_checker(api_util);
11226 return ctx_CktElement_Get_OCPDevIndex(ctx);
11227 }
11228
11232 int32_t OCPDevType() // getter
11233 {
11234 APIUtil::ErrorChecker error_checker(api_util);
11235 return ctx_CktElement_Get_OCPDevType(ctx);
11236 }
11237
11241 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11242 VectorT PhaseLosses() // getter
11243 {
11244 APIUtil::ErrorChecker error_checker(api_util);
11245 ctx_CktElement_Get_PhaseLosses_GR(ctx);
11246 return api_util->get_float64_gr_array<VectorT>();
11247 }
11248
11252 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11253 VectorT Powers() // getter
11254 {
11255 APIUtil::ErrorChecker error_checker(api_util);
11256 ctx_CktElement_Get_Powers_GR(ctx);
11257 return api_util->get_float64_gr_array<VectorT>();
11258 }
11259
11263 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11264 VectorT Residuals() // getter
11265 {
11266 APIUtil::ErrorChecker error_checker(api_util);
11267 ctx_CktElement_Get_Residuals_GR(ctx);
11268 return api_util->get_float64_gr_array<VectorT>();
11269 }
11270
11274 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11275 VectorT SeqCurrents() // getter
11276 {
11277 APIUtil::ErrorChecker error_checker(api_util);
11278 ctx_CktElement_Get_SeqCurrents_GR(ctx);
11279 return api_util->get_float64_gr_array<VectorT>();
11280 }
11281
11285 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11286 VectorT SeqPowers() // getter
11287 {
11288 APIUtil::ErrorChecker error_checker(api_util);
11289 ctx_CktElement_Get_SeqPowers_GR(ctx);
11290 return api_util->get_float64_gr_array<VectorT>();
11291 }
11292
11296 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11297 VectorT SeqVoltages() // getter
11298 {
11299 APIUtil::ErrorChecker error_checker(api_util);
11300 ctx_CktElement_Get_SeqVoltages_GR(ctx);
11301 return api_util->get_float64_gr_array<VectorT>();
11302 }
11303
11307 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11308 VectorT Voltages() // getter
11309 {
11310 APIUtil::ErrorChecker error_checker(api_util);
11311 ctx_CktElement_Get_Voltages_GR(ctx);
11312 return api_util->get_float64_gr_array<VectorT>();
11313 }
11314
11318 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11319 VectorT VoltagesMagAng() // getter
11320 {
11321 APIUtil::ErrorChecker error_checker(api_util);
11322 ctx_CktElement_Get_VoltagesMagAng_GR(ctx);
11323 return api_util->get_float64_gr_array<VectorT>();
11324 }
11325
11329 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11330 VectorT Yprim() // getter
11331 {
11332 APIUtil::ErrorChecker error_checker(api_util);
11333 ctx_CktElement_Get_Yprim_GR(ctx);
11334 return api_util->get_float64_gr_array<VectorT>();
11335 }
11336
11341 bool IsIsolated() // getter
11342 {
11343 APIUtil::ErrorChecker error_checker(api_util);
11344 return (ctx_CktElement_Get_IsIsolated(ctx) != 0);
11345 }
11346
11350 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11351 VectorT TotalPowers() // getter
11352 {
11353 APIUtil::ErrorChecker error_checker(api_util);
11354 ctx_CktElement_Get_TotalPowers_GR(ctx);
11355 return api_util->get_float64_gr_array<VectorT>();
11356 }
11357
11361 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
11362 VectorT NodeRef() // getter
11363 {
11364 APIUtil::ErrorChecker error_checker(api_util);
11365 ctx_CktElement_Get_NodeRef_GR(ctx);
11366 return api_util->get_int32_gr_array<VectorT>();
11367 }
11368 };
11369
11371 {
11372 public:
11373
11374 IGICSources(dss::APIUtil *util) :
11375 ContextState(util)
11376 {
11377 }
11378
11382 strings AllNames() // getter
11383 {
11384 APIUtil::ErrorChecker error_checker(api_util);
11385 return api_util->get_string_array(ctx_GICSources_Get_AllNames);
11386 }
11387
11391 int32_t Count() // getter
11392 {
11393 APIUtil::ErrorChecker error_checker(api_util);
11394 return ctx_GICSources_Get_Count(ctx);
11395 }
11396
11400 int32_t First() // getter
11401 {
11402 APIUtil::ErrorChecker error_checker(api_util);
11403 return ctx_GICSources_Get_First(ctx);
11404 }
11405
11409 string Name() // getter
11410 {
11411 APIUtil::ErrorChecker error_checker(api_util);
11412 return ctx_GICSources_Get_Name(ctx);
11413 }
11414
11418 IGICSources& Name(const char *value)
11419 {
11420 APIUtil::ErrorChecker error_checker(api_util);
11421 ctx_GICSources_Set_Name(ctx, value);
11422 return *this;
11423 }
11424 IGICSources& Name(const string &value)
11425 {
11426 return Name(value.c_str());
11427 }
11428
11432 int32_t Next() // getter
11433 {
11434 APIUtil::ErrorChecker error_checker(api_util);
11435 return ctx_GICSources_Get_Next(ctx);
11436 }
11437
11441 int32_t idx() // getter
11442 {
11443 APIUtil::ErrorChecker error_checker(api_util);
11444 return ctx_GICSources_Get_idx(ctx);
11445 }
11446
11450 void idx(int32_t value) // setter
11451 {
11452 APIUtil::ErrorChecker error_checker(api_util);
11453 ctx_GICSources_Set_idx(ctx, value);
11454 }
11455
11459 string Bus1() // getter
11460 {
11461 APIUtil::ErrorChecker error_checker(api_util);
11462 return ctx_GICSources_Get_Bus1(ctx);
11463 }
11464
11468 string Bus2() // getter
11469 {
11470 APIUtil::ErrorChecker error_checker(api_util);
11471 return ctx_GICSources_Get_Bus2(ctx);
11472 }
11473
11477 int32_t Phases() // getter
11478 {
11479 APIUtil::ErrorChecker error_checker(api_util);
11480 return ctx_GICSources_Get_Phases(ctx);
11481 }
11482 IGICSources& Phases(int32_t value) // setter
11483 {
11484 APIUtil::ErrorChecker error_checker(api_util);
11485 ctx_GICSources_Set_Phases(ctx, value);
11486 return *this;
11487 }
11488
11492 double EN() // getter
11493 {
11494 APIUtil::ErrorChecker error_checker(api_util);
11495 return ctx_GICSources_Get_EN(ctx);
11496 }
11497 IGICSources& EN(double value) // setter
11498 {
11499 APIUtil::ErrorChecker error_checker(api_util);
11500 ctx_GICSources_Set_EN(ctx, value);
11501 return *this;
11502 }
11503
11507 double EE() // getter
11508 {
11509 APIUtil::ErrorChecker error_checker(api_util);
11510 return ctx_GICSources_Get_EE(ctx);
11511 }
11512 IGICSources& EE(double value) // setter
11513 {
11514 APIUtil::ErrorChecker error_checker(api_util);
11515 ctx_GICSources_Set_EE(ctx, value);
11516 return *this;
11517 }
11518
11522 double Lat1() // getter
11523 {
11524 APIUtil::ErrorChecker error_checker(api_util);
11525 return ctx_GICSources_Get_Lat1(ctx);
11526 }
11527 IGICSources& Lat1(double value) // setter
11528 {
11529 APIUtil::ErrorChecker error_checker(api_util);
11530 ctx_GICSources_Set_Lat1(ctx, value);
11531 return *this;
11532 }
11533
11537 double Lat2() // getter
11538 {
11539 APIUtil::ErrorChecker error_checker(api_util);
11540 return ctx_GICSources_Get_Lat2(ctx);
11541 }
11542 IGICSources& Lat2(double value) // setter
11543 {
11544 APIUtil::ErrorChecker error_checker(api_util);
11545 ctx_GICSources_Set_Lat2(ctx, value);
11546 return *this;
11547 }
11548
11552 double Lon1() // getter
11553 {
11554 APIUtil::ErrorChecker error_checker(api_util);
11555 return ctx_GICSources_Get_Lon1(ctx);
11556 }
11557 IGICSources& Lon1(double value) // setter
11558 {
11559 APIUtil::ErrorChecker error_checker(api_util);
11560 ctx_GICSources_Set_Lon1(ctx, value);
11561 return *this;
11562 }
11563
11567 double Lon2() // getter
11568 {
11569 APIUtil::ErrorChecker error_checker(api_util);
11570 return ctx_GICSources_Get_Lon2(ctx);
11571 }
11572 IGICSources& Lon2(double value) // setter
11573 {
11574 APIUtil::ErrorChecker error_checker(api_util);
11575 ctx_GICSources_Set_Lon2(ctx, value);
11576 return *this;
11577 }
11578
11582 double Volts() // getter
11583 {
11584 APIUtil::ErrorChecker error_checker(api_util);
11585 return ctx_GICSources_Get_Volts(ctx);
11586 }
11587 IGICSources& Volts(double value) // setter
11588 {
11589 APIUtil::ErrorChecker error_checker(api_util);
11590 ctx_GICSources_Set_Volts(ctx, value);
11591 return *this;
11592 }
11593 };
11594
11596 {
11597 public:
11598
11599 IStorages(dss::APIUtil *util) :
11600 ContextState(util)
11601 {
11602 }
11603
11607 strings AllNames() // getter
11608 {
11609 APIUtil::ErrorChecker error_checker(api_util);
11610 return api_util->get_string_array(ctx_Storages_Get_AllNames);
11611 }
11612
11616 int32_t Count() // getter
11617 {
11618 APIUtil::ErrorChecker error_checker(api_util);
11619 return ctx_Storages_Get_Count(ctx);
11620 }
11621
11625 int32_t First() // getter
11626 {
11627 APIUtil::ErrorChecker error_checker(api_util);
11628 return ctx_Storages_Get_First(ctx);
11629 }
11630
11634 string Name() // getter
11635 {
11636 APIUtil::ErrorChecker error_checker(api_util);
11637 return ctx_Storages_Get_Name(ctx);
11638 }
11639
11643 IStorages& Name(const char *value)
11644 {
11645 APIUtil::ErrorChecker error_checker(api_util);
11646 ctx_Storages_Set_Name(ctx, value);
11647 return *this;
11648 }
11649 IStorages& Name(const string &value)
11650 {
11651 return Name(value.c_str());
11652 }
11653
11657 int32_t Next() // getter
11658 {
11659 APIUtil::ErrorChecker error_checker(api_util);
11660 return ctx_Storages_Get_Next(ctx);
11661 }
11662
11666 int32_t idx() // getter
11667 {
11668 APIUtil::ErrorChecker error_checker(api_util);
11669 return ctx_Storages_Get_idx(ctx);
11670 }
11671
11675 void idx(int32_t value) // setter
11676 {
11677 APIUtil::ErrorChecker error_checker(api_util);
11678 ctx_Storages_Set_idx(ctx, value);
11679 }
11680
11684 double puSOC() // getter
11685 {
11686 APIUtil::ErrorChecker error_checker(api_util);
11687 return ctx_Storages_Get_puSOC(ctx);
11688 }
11689 IStorages& puSOC(double value) // setter
11690 {
11691 APIUtil::ErrorChecker error_checker(api_util);
11692 ctx_Storages_Set_puSOC(ctx, value);
11693 return *this;
11694 }
11695
11701 int32_t State() // getter
11702 {
11703 APIUtil::ErrorChecker error_checker(api_util);
11704 return ctx_Storages_Get_State(ctx);
11705 }
11706 IStorages& State(int32_t value) // setter
11707 {
11708 APIUtil::ErrorChecker error_checker(api_util);
11709 ctx_Storages_Set_State(ctx, value);
11710 return *this;
11711 }
11712
11716 strings RegisterNames() // getter
11717 {
11718 APIUtil::ErrorChecker error_checker(api_util);
11719 return api_util->get_string_array(ctx_Storages_Get_RegisterNames);
11720 }
11721
11725 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
11726 VectorT RegisterValues() // getter
11727 {
11728 APIUtil::ErrorChecker error_checker(api_util);
11729 ctx_Storages_Get_RegisterValues_GR(ctx);
11730 return api_util->get_float64_gr_array<VectorT>();
11731 }
11732 };
11733
11735 {
11736 public:
11737
11738 ISolution(dss::APIUtil *util) :
11739 ContextState(util)
11740 {
11741 }
11742 void BuildYMatrix(int32_t BuildOption, int32_t AllocateVI)
11743 {
11744 APIUtil::ErrorChecker error_checker(api_util);
11745 ctx_Solution_BuildYMatrix(ctx, BuildOption, AllocateVI);
11746 }
11747 void CheckControls()
11748 {
11749 APIUtil::ErrorChecker error_checker(api_util);
11750 ctx_Solution_CheckControls(ctx);
11751 }
11752 void CheckFaultStatus()
11753 {
11754 APIUtil::ErrorChecker error_checker(api_util);
11755 ctx_Solution_CheckFaultStatus(ctx);
11756 }
11757 void Cleanup()
11758 {
11759 APIUtil::ErrorChecker error_checker(api_util);
11760 ctx_Solution_Cleanup(ctx);
11761 }
11762 void DoControlActions()
11763 {
11764 APIUtil::ErrorChecker error_checker(api_util);
11765 ctx_Solution_DoControlActions(ctx);
11766 }
11767 void FinishTimeStep()
11768 {
11769 APIUtil::ErrorChecker error_checker(api_util);
11770 ctx_Solution_FinishTimeStep(ctx);
11771 }
11772 void InitSnap()
11773 {
11774 APIUtil::ErrorChecker error_checker(api_util);
11775 ctx_Solution_InitSnap(ctx);
11776 }
11777 void SampleControlDevices()
11778 {
11779 APIUtil::ErrorChecker error_checker(api_util);
11780 ctx_Solution_SampleControlDevices(ctx);
11781 }
11782 void Sample_DoControlActions()
11783 {
11784 APIUtil::ErrorChecker error_checker(api_util);
11785 ctx_Solution_Sample_DoControlActions(ctx);
11786 }
11787 void Solve()
11788 {
11789 APIUtil::ErrorChecker error_checker(api_util);
11790 ctx_Solution_Solve(ctx);
11791 }
11792 void SolveDirect()
11793 {
11794 APIUtil::ErrorChecker error_checker(api_util);
11795 ctx_Solution_SolveDirect(ctx);
11796 }
11797 void SolveNoControl()
11798 {
11799 APIUtil::ErrorChecker error_checker(api_util);
11800 ctx_Solution_SolveNoControl(ctx);
11801 }
11802 void SolvePflow()
11803 {
11804 APIUtil::ErrorChecker error_checker(api_util);
11805 ctx_Solution_SolvePflow(ctx);
11806 }
11807 void SolvePlusControl()
11808 {
11809 APIUtil::ErrorChecker error_checker(api_util);
11810 ctx_Solution_SolvePlusControl(ctx);
11811 }
11812 void SolveSnap()
11813 {
11814 APIUtil::ErrorChecker error_checker(api_util);
11815 ctx_Solution_SolveSnap(ctx);
11816 }
11817
11821 int32_t AddType() // getter
11822 {
11823 APIUtil::ErrorChecker error_checker(api_util);
11824 return ctx_Solution_Get_AddType(ctx);
11825 }
11826 ISolution& AddType(int32_t value) // setter
11827 {
11828 APIUtil::ErrorChecker error_checker(api_util);
11829 ctx_Solution_Set_AddType(ctx, value);
11830 return *this;
11831 }
11832
11836 int32_t Algorithm() // getter
11837 {
11838 APIUtil::ErrorChecker error_checker(api_util);
11839 return ctx_Solution_Get_Algorithm(ctx);
11840 }
11841 ISolution& Algorithm(int32_t value) // setter
11842 {
11843 APIUtil::ErrorChecker error_checker(api_util);
11844 ctx_Solution_Set_Algorithm(ctx, value);
11845 return *this;
11846 }
11847
11851 double Capkvar() // getter
11852 {
11853 APIUtil::ErrorChecker error_checker(api_util);
11854 return ctx_Solution_Get_Capkvar(ctx);
11855 }
11856 ISolution& Capkvar(double value) // setter
11857 {
11858 APIUtil::ErrorChecker error_checker(api_util);
11859 ctx_Solution_Set_Capkvar(ctx, value);
11860 return *this;
11861 }
11862
11866 bool ControlActionsDone() // getter
11867 {
11868 APIUtil::ErrorChecker error_checker(api_util);
11869 return (ctx_Solution_Get_ControlActionsDone(ctx) != 0);
11870 }
11871 ISolution& ControlActionsDone(bool value) // setter
11872 {
11873 APIUtil::ErrorChecker error_checker(api_util);
11874 ctx_Solution_Set_ControlActionsDone(ctx, value);
11875 return *this;
11876 }
11877
11881 int32_t ControlIterations() // getter
11882 {
11883 APIUtil::ErrorChecker error_checker(api_util);
11884 return ctx_Solution_Get_ControlIterations(ctx);
11885 }
11886 ISolution& ControlIterations(int32_t value) // setter
11887 {
11888 APIUtil::ErrorChecker error_checker(api_util);
11889 ctx_Solution_Set_ControlIterations(ctx, value);
11890 return *this;
11891 }
11892
11896 int32_t ControlMode() // getter
11897 {
11898 APIUtil::ErrorChecker error_checker(api_util);
11899 return ctx_Solution_Get_ControlMode(ctx);
11900 }
11901 ISolution& ControlMode(int32_t value) // setter
11902 {
11903 APIUtil::ErrorChecker error_checker(api_util);
11904 ctx_Solution_Set_ControlMode(ctx, value);
11905 return *this;
11906 }
11907
11911 bool Converged() // getter
11912 {
11913 APIUtil::ErrorChecker error_checker(api_util);
11914 return (ctx_Solution_Get_Converged(ctx) != 0);
11915 }
11916 ISolution& Converged(bool value) // setter
11917 {
11918 APIUtil::ErrorChecker error_checker(api_util);
11919 ctx_Solution_Set_Converged(ctx, value);
11920 return *this;
11921 }
11922
11926 string DefaultDaily() // getter
11927 {
11928 APIUtil::ErrorChecker error_checker(api_util);
11929 return ctx_Solution_Get_DefaultDaily(ctx);
11930 }
11931 ISolution& DefaultDaily(const char *value) // setter
11932 {
11933 APIUtil::ErrorChecker error_checker(api_util);
11934 ctx_Solution_Set_DefaultDaily(ctx, value);
11935 return *this;
11936 }
11937 ISolution& DefaultDaily(const string &value) // setter
11938 {
11939 APIUtil::ErrorChecker error_checker(api_util);
11940 ctx_Solution_Set_DefaultDaily(ctx, value.c_str());
11941 return *this;
11942 }
11943
11947 string DefaultYearly() // getter
11948 {
11949 APIUtil::ErrorChecker error_checker(api_util);
11950 return ctx_Solution_Get_DefaultYearly(ctx);
11951 }
11952 ISolution& DefaultYearly(const char *value) // setter
11953 {
11954 APIUtil::ErrorChecker error_checker(api_util);
11955 ctx_Solution_Set_DefaultYearly(ctx, value);
11956 return *this;
11957 }
11958 ISolution& DefaultYearly(const string &value) // setter
11959 {
11960 APIUtil::ErrorChecker error_checker(api_util);
11961 ctx_Solution_Set_DefaultYearly(ctx, value.c_str());
11962 return *this;
11963 }
11964
11968 strings EventLog() // getter
11969 {
11970 APIUtil::ErrorChecker error_checker(api_util);
11971 return api_util->get_string_array(ctx_Solution_Get_EventLog);
11972 }
11973
11977 double Frequency() // getter
11978 {
11979 APIUtil::ErrorChecker error_checker(api_util);
11980 return ctx_Solution_Get_Frequency(ctx);
11981 }
11982 ISolution& Frequency(double value) // setter
11983 {
11984 APIUtil::ErrorChecker error_checker(api_util);
11985 ctx_Solution_Set_Frequency(ctx, value);
11986 return *this;
11987 }
11988
11992 double GenMult() // getter
11993 {
11994 APIUtil::ErrorChecker error_checker(api_util);
11995 return ctx_Solution_Get_GenMult(ctx);
11996 }
11997 ISolution& GenMult(double value) // setter
11998 {
11999 APIUtil::ErrorChecker error_checker(api_util);
12000 ctx_Solution_Set_GenMult(ctx, value);
12001 return *this;
12002 }
12003
12007 double GenPF() // getter
12008 {
12009 APIUtil::ErrorChecker error_checker(api_util);
12010 return ctx_Solution_Get_GenPF(ctx);
12011 }
12012 ISolution& GenPF(double value) // setter
12013 {
12014 APIUtil::ErrorChecker error_checker(api_util);
12015 ctx_Solution_Set_GenPF(ctx, value);
12016 return *this;
12017 }
12018
12022 double GenkW() // getter
12023 {
12024 APIUtil::ErrorChecker error_checker(api_util);
12025 return ctx_Solution_Get_GenkW(ctx);
12026 }
12027 ISolution& GenkW(double value) // setter
12028 {
12029 APIUtil::ErrorChecker error_checker(api_util);
12030 ctx_Solution_Set_GenkW(ctx, value);
12031 return *this;
12032 }
12033
12037 int32_t Hour() // getter
12038 {
12039 APIUtil::ErrorChecker error_checker(api_util);
12040 return ctx_Solution_Get_Hour(ctx);
12041 }
12042 ISolution& Hour(int32_t value) // setter
12043 {
12044 APIUtil::ErrorChecker error_checker(api_util);
12045 ctx_Solution_Set_Hour(ctx, value);
12046 return *this;
12047 }
12048
12052 double IntervalHrs() // getter
12053 {
12054 APIUtil::ErrorChecker error_checker(api_util);
12055 return ctx_Solution_Get_IntervalHrs(ctx);
12056 }
12057 ISolution& IntervalHrs(double value) // setter
12058 {
12059 APIUtil::ErrorChecker error_checker(api_util);
12060 ctx_Solution_Set_IntervalHrs(ctx, value);
12061 return *this;
12062 }
12063
12067 int32_t Iterations() // getter
12068 {
12069 APIUtil::ErrorChecker error_checker(api_util);
12070 return ctx_Solution_Get_Iterations(ctx);
12071 }
12072
12076 string LDCurve() // getter
12077 {
12078 APIUtil::ErrorChecker error_checker(api_util);
12079 return ctx_Solution_Get_LDCurve(ctx);
12080 }
12081 ISolution& LDCurve(const char *value) // setter
12082 {
12083 APIUtil::ErrorChecker error_checker(api_util);
12084 ctx_Solution_Set_LDCurve(ctx, value);
12085 return *this;
12086 }
12087 ISolution& LDCurve(const string &value) // setter
12088 {
12089 APIUtil::ErrorChecker error_checker(api_util);
12090 ctx_Solution_Set_LDCurve(ctx, value.c_str());
12091 return *this;
12092 }
12093
12097 int32_t LoadModel() // getter
12098 {
12099 APIUtil::ErrorChecker error_checker(api_util);
12100 return ctx_Solution_Get_LoadModel(ctx);
12101 }
12102 ISolution& LoadModel(int32_t value) // setter
12103 {
12104 APIUtil::ErrorChecker error_checker(api_util);
12105 ctx_Solution_Set_LoadModel(ctx, value);
12106 return *this;
12107 }
12108
12112 double LoadMult() // getter
12113 {
12114 APIUtil::ErrorChecker error_checker(api_util);
12115 return ctx_Solution_Get_LoadMult(ctx);
12116 }
12117 ISolution& LoadMult(double value) // setter
12118 {
12119 APIUtil::ErrorChecker error_checker(api_util);
12120 ctx_Solution_Set_LoadMult(ctx, value);
12121 return *this;
12122 }
12123
12127 int32_t MaxControlIterations() // getter
12128 {
12129 APIUtil::ErrorChecker error_checker(api_util);
12130 return ctx_Solution_Get_MaxControlIterations(ctx);
12131 }
12132 ISolution& MaxControlIterations(int32_t value) // setter
12133 {
12134 APIUtil::ErrorChecker error_checker(api_util);
12135 ctx_Solution_Set_MaxControlIterations(ctx, value);
12136 return *this;
12137 }
12138
12142 int32_t MaxIterations() // getter
12143 {
12144 APIUtil::ErrorChecker error_checker(api_util);
12145 return ctx_Solution_Get_MaxIterations(ctx);
12146 }
12147 ISolution& MaxIterations(int32_t value) // setter
12148 {
12149 APIUtil::ErrorChecker error_checker(api_util);
12150 ctx_Solution_Set_MaxIterations(ctx, value);
12151 return *this;
12152 }
12153
12157 int32_t MinIterations() // getter
12158 {
12159 APIUtil::ErrorChecker error_checker(api_util);
12160 return ctx_Solution_Get_MinIterations(ctx);
12161 }
12162 ISolution& MinIterations(int32_t value) // setter
12163 {
12164 APIUtil::ErrorChecker error_checker(api_util);
12165 ctx_Solution_Set_MinIterations(ctx, value);
12166 return *this;
12167 }
12168
12172 int32_t Mode() // getter
12173 {
12174 APIUtil::ErrorChecker error_checker(api_util);
12175 return ctx_Solution_Get_Mode(ctx);
12176 }
12177 ISolution& Mode(int32_t value) // setter
12178 {
12179 APIUtil::ErrorChecker error_checker(api_util);
12180 ctx_Solution_Set_Mode(ctx, value);
12181 return *this;
12182 }
12183
12187 string ModeID() // getter
12188 {
12189 APIUtil::ErrorChecker error_checker(api_util);
12190 return ctx_Solution_Get_ModeID(ctx);
12191 }
12192
12196 int32_t MostIterationsDone() // getter
12197 {
12198 APIUtil::ErrorChecker error_checker(api_util);
12199 return ctx_Solution_Get_MostIterationsDone(ctx);
12200 }
12201
12205 int32_t Number() // getter
12206 {
12207 APIUtil::ErrorChecker error_checker(api_util);
12208 return ctx_Solution_Get_Number(ctx);
12209 }
12210 ISolution& Number(int32_t value) // setter
12211 {
12212 APIUtil::ErrorChecker error_checker(api_util);
12213 ctx_Solution_Set_Number(ctx, value);
12214 return *this;
12215 }
12216
12220 double Process_Time() // getter
12221 {
12222 APIUtil::ErrorChecker error_checker(api_util);
12223 return ctx_Solution_Get_Process_Time(ctx);
12224 }
12225
12229 int32_t Random() // getter
12230 {
12231 APIUtil::ErrorChecker error_checker(api_util);
12232 return ctx_Solution_Get_Random(ctx);
12233 }
12234 ISolution& Random(int32_t value) // setter
12235 {
12236 APIUtil::ErrorChecker error_checker(api_util);
12237 ctx_Solution_Set_Random(ctx, value);
12238 return *this;
12239 }
12240
12244 double Seconds() // getter
12245 {
12246 APIUtil::ErrorChecker error_checker(api_util);
12247 return ctx_Solution_Get_Seconds(ctx);
12248 }
12249 ISolution& Seconds(double value) // setter
12250 {
12251 APIUtil::ErrorChecker error_checker(api_util);
12252 ctx_Solution_Set_Seconds(ctx, value);
12253 return *this;
12254 }
12255
12259 double StepSize() // getter
12260 {
12261 APIUtil::ErrorChecker error_checker(api_util);
12262 return ctx_Solution_Get_StepSize(ctx);
12263 }
12264 ISolution& StepSize(double value) // setter
12265 {
12266 APIUtil::ErrorChecker error_checker(api_util);
12267 ctx_Solution_Set_StepSize(ctx, value);
12268 return *this;
12269 }
12270
12274 bool SystemYChanged() // getter
12275 {
12276 APIUtil::ErrorChecker error_checker(api_util);
12277 return (ctx_Solution_Get_SystemYChanged(ctx) != 0);
12278 }
12279
12283 double Time_of_Step() // getter
12284 {
12285 APIUtil::ErrorChecker error_checker(api_util);
12286 return ctx_Solution_Get_Time_of_Step(ctx);
12287 }
12288
12292 double Tolerance() // getter
12293 {
12294 APIUtil::ErrorChecker error_checker(api_util);
12295 return ctx_Solution_Get_Tolerance(ctx);
12296 }
12297 ISolution& Tolerance(double value) // setter
12298 {
12299 APIUtil::ErrorChecker error_checker(api_util);
12300 ctx_Solution_Set_Tolerance(ctx, value);
12301 return *this;
12302 }
12303
12307 double Total_Time() // getter
12308 {
12309 APIUtil::ErrorChecker error_checker(api_util);
12310 return ctx_Solution_Get_Total_Time(ctx);
12311 }
12312 ISolution& Total_Time(double value) // setter
12313 {
12314 APIUtil::ErrorChecker error_checker(api_util);
12315 ctx_Solution_Set_Total_Time(ctx, value);
12316 return *this;
12317 }
12318
12322 int32_t Totaliterations() // getter
12323 {
12324 APIUtil::ErrorChecker error_checker(api_util);
12325 return ctx_Solution_Get_Totaliterations(ctx);
12326 }
12327
12331 int32_t Year() // getter
12332 {
12333 APIUtil::ErrorChecker error_checker(api_util);
12334 return ctx_Solution_Get_Year(ctx);
12335 }
12336 ISolution& Year(int32_t value) // setter
12337 {
12338 APIUtil::ErrorChecker error_checker(api_util);
12339 ctx_Solution_Set_Year(ctx, value);
12340 return *this;
12341 }
12342
12346 double dblHour() // getter
12347 {
12348 APIUtil::ErrorChecker error_checker(api_util);
12349 return ctx_Solution_Get_dblHour(ctx);
12350 }
12351 ISolution& dblHour(double value) // setter
12352 {
12353 APIUtil::ErrorChecker error_checker(api_util);
12354 ctx_Solution_Set_dblHour(ctx, value);
12355 return *this;
12356 }
12357
12361 double pctGrowth() // getter
12362 {
12363 APIUtil::ErrorChecker error_checker(api_util);
12364 return ctx_Solution_Get_pctGrowth(ctx);
12365 }
12366 ISolution& pctGrowth(double value) // setter
12367 {
12368 APIUtil::ErrorChecker error_checker(api_util);
12369 ctx_Solution_Set_pctGrowth(ctx, value);
12370 return *this;
12371 }
12372
12376 ISolution& StepsizeHr(double value) // setter
12377 {
12378 APIUtil::ErrorChecker error_checker(api_util);
12379 ctx_Solution_Set_StepsizeHr(ctx, value);
12380 return *this;
12381 }
12382
12386 ISolution& StepsizeMin(double value) // setter
12387 {
12388 APIUtil::ErrorChecker error_checker(api_util);
12389 ctx_Solution_Set_StepsizeMin(ctx, value);
12390 return *this;
12391 }
12392
12393 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
12394 VectorT BusLevels() // getter
12395 {
12396 APIUtil::ErrorChecker error_checker(api_util);
12397 ctx_Solution_Get_BusLevels_GR(ctx);
12398 return api_util->get_int32_gr_array<VectorT>();
12399 }
12400
12401 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
12402 VectorT IncMatrix() // getter
12403 {
12404 APIUtil::ErrorChecker error_checker(api_util);
12405 ctx_Solution_Get_IncMatrix_GR(ctx);
12406 return api_util->get_int32_gr_array<VectorT>();
12407 }
12408
12409 strings IncMatrixCols() // getter
12410 {
12411 APIUtil::ErrorChecker error_checker(api_util);
12412 return api_util->get_string_array(ctx_Solution_Get_IncMatrixCols);
12413 }
12414
12415 strings IncMatrixRows() // getter
12416 {
12417 APIUtil::ErrorChecker error_checker(api_util);
12418 return api_util->get_string_array(ctx_Solution_Get_IncMatrixRows);
12419 }
12420
12421 template <typename VectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
12422 VectorT Laplacian() // getter
12423 {
12424 APIUtil::ErrorChecker error_checker(api_util);
12425 ctx_Solution_Get_Laplacian_GR(ctx);
12426 return api_util->get_int32_gr_array<VectorT>();
12427 }
12428 };
12429
12431 {
12432 public:
12433 IBus Buses;
12434 ICktElement CktElements;
12435 ICktElement ActiveElement;
12436 ISolution Solution;
12437 IBus ActiveBus;
12438 IGenerators Generators;
12439 IMeters Meters;
12440 IMonitors Monitors;
12441 ISettings Settings;
12442 ILines Lines;
12443 ICtrlQueue CtrlQueue;
12444 ILoads Loads;
12445 ICktElement ActiveCktElement;
12446 IDSSElement ActiveDSSElement;
12447 IActiveClass ActiveClass;
12448 ICapControls CapControls;
12449 IRegControls RegControls;
12450 ISwtControls SwtControls;
12451 ITransformers Transformers;
12452 ICapacitors Capacitors;
12453 ITopology Topology;
12454 ISensors Sensors;
12455 IXYCurves XYCurves;
12456 IPDElements PDElements;
12457 IReclosers Reclosers;
12458 IRelays Relays;
12459 ILoadShapes LoadShapes;
12460 IFuses Fuses;
12461 IISources Isources;
12462 IDSSimComs DSSim_Coms;
12463 IPVSystems PVSystems;
12464 IVsources Vsources;
12465 ILineCodes LineCodes;
12466 ILineGeometries LineGeometries;
12467 ILineSpacings LineSpacings;
12468 IWireData WireData;
12469 ICNData CNData;
12470 ITSData TSData;
12471 IReactors Reactors;
12472 IReduceCkt ReduceCkt;
12473 IStorages Storages;
12474 IGICSources GICSources;
12475 IParallel Parallel;
12476
12477 ICircuit(dss::APIUtil *util) :
12478 ContextState(util),
12479 Buses(util),
12480 CktElements(util),
12481 ActiveElement(util),
12482 Solution(util),
12483 ActiveBus(util),
12484 Generators(util),
12485 Meters(util),
12486 Monitors(util),
12487 Settings(util),
12488 Lines(util),
12489 CtrlQueue(util),
12490 Loads(util),
12491 ActiveCktElement(util),
12492 ActiveDSSElement(util),
12493 ActiveClass(util),
12494 CapControls(util),
12495 RegControls(util),
12496 SwtControls(util),
12497 Transformers(util),
12498 Capacitors(util),
12499 Topology(util),
12500 Sensors(util),
12501 XYCurves(util),
12502 PDElements(util),
12503 Reclosers(util),
12504 Relays(util),
12505 LoadShapes(util),
12506 Fuses(util),
12507 Isources(util),
12508 DSSim_Coms(util),
12509 PVSystems(util),
12510 Vsources(util),
12511 LineCodes(util),
12512 LineGeometries(util),
12513 LineSpacings(util),
12514 WireData(util),
12515 CNData(util),
12516 TSData(util),
12517 Reactors(util),
12518 ReduceCkt(util),
12519 Storages(util),
12520 GICSources(util),
12521 Parallel(util)
12522 {
12523 }
12524
12528 IBus& get_Buses(int32_t idx)
12529 {
12530 APIUtil::ErrorChecker error_checker(api_util);
12531 if (ctx_Circuit_SetActiveBusi(ctx, idx) < 0)
12532 throw std::runtime_error("Invalid bus");
12533
12534 return ActiveBus;
12535 }
12536
12540 IBus& get_Buses(const char *name)
12541 {
12542 APIUtil::ErrorChecker error_checker(api_util);
12543 if (ctx_Circuit_SetActiveBus(ctx, name) < 0)
12544 throw std::runtime_error("Invalid bus");
12545
12546 return ActiveBus;
12547 }
12548 IBus& get_Buses(const string &name)
12549 {
12550 return get_Buses(name.c_str());
12551 }
12552
12557 {
12558 APIUtil::ErrorChecker error_checker(api_util);
12559 ctx_Circuit_SetCktElementIndex(ctx, idx);
12560 return ActiveCktElement;
12561 }
12562
12566 ICktElement get_CktElements(const char *fullName)
12567 {
12568 APIUtil::ErrorChecker error_checker(api_util);
12569 ctx_Circuit_SetCktElementName(ctx, fullName);
12570 return ActiveCktElement;
12571 }
12572 ICktElement get_CktElements(const string &fullName)
12573 {
12574 return get_CktElements(fullName.c_str());
12575 }
12576 double Capacity(double Start, double Increment)
12577 {
12578 APIUtil::ErrorChecker error_checker(api_util);
12579 return ctx_Circuit_Capacity(ctx, Start, Increment);
12580 }
12581 void Disable(const char *Name)
12582 {
12583 APIUtil::ErrorChecker error_checker(api_util);
12584 ctx_Circuit_Disable(ctx, Name);
12585 }
12586 void Disable(const string &Name)
12587 {
12588 APIUtil::ErrorChecker error_checker(api_util);
12589 ctx_Circuit_Disable(ctx, Name.c_str());
12590 }
12591 void Enable(const char *Name)
12592 {
12593 APIUtil::ErrorChecker error_checker(api_util);
12594 ctx_Circuit_Enable(ctx, Name);
12595 }
12596 void Enable(const string &Name)
12597 {
12598 APIUtil::ErrorChecker error_checker(api_util);
12599 ctx_Circuit_Enable(ctx, Name.c_str());
12600 }
12601 void EndOfTimeStepUpdate()
12602 {
12603 APIUtil::ErrorChecker error_checker(api_util);
12604 ctx_Circuit_EndOfTimeStepUpdate(ctx);
12605 }
12606 int32_t FirstElement()
12607 {
12608 APIUtil::ErrorChecker error_checker(api_util);
12609 return ctx_Circuit_FirstElement(ctx);
12610 }
12611 int32_t FirstPCElement()
12612 {
12613 APIUtil::ErrorChecker error_checker(api_util);
12614 return ctx_Circuit_FirstPCElement(ctx);
12615 }
12616 int32_t FirstPDElement()
12617 {
12618 APIUtil::ErrorChecker error_checker(api_util);
12619 return ctx_Circuit_FirstPDElement(ctx);
12620 }
12624 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12625 VectorT AllNodeDistancesByPhase(int32_t Phase)
12626 {
12627 APIUtil::ErrorChecker error_checker(api_util);
12628 ctx_Circuit_Get_AllNodeDistancesByPhase_GR(ctx, Phase);
12629 return api_util->get_float64_gr_array<VectorT>();
12630 }
12634 strings AllNodeNamesByPhase(int32_t Phase)
12635 {
12636 APIUtil::ErrorChecker error_checker(api_util);
12637 return api_util->get_string_array(ctx_Circuit_Get_AllNodeNamesByPhase, Phase);
12638 }
12642 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12643 VectorT AllNodeVmagByPhase(int32_t Phase)
12644 {
12645 APIUtil::ErrorChecker error_checker(api_util);
12646 ctx_Circuit_Get_AllNodeVmagByPhase_GR(ctx, Phase);
12647 return api_util->get_float64_gr_array<VectorT>();
12648 }
12652 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12653 VectorT AllNodeVmagPUByPhase(int32_t Phase)
12654 {
12655 APIUtil::ErrorChecker error_checker(api_util);
12656 ctx_Circuit_Get_AllNodeVmagPUByPhase_GR(ctx, Phase);
12657 return api_util->get_float64_gr_array<VectorT>();
12658 }
12659 int32_t NextElement()
12660 {
12661 APIUtil::ErrorChecker error_checker(api_util);
12662 return ctx_Circuit_NextElement(ctx);
12663 }
12664 int32_t NextPCElement()
12665 {
12666 APIUtil::ErrorChecker error_checker(api_util);
12667 return ctx_Circuit_NextPCElement(ctx);
12668 }
12669 int32_t NextPDElement()
12670 {
12671 APIUtil::ErrorChecker error_checker(api_util);
12672 return ctx_Circuit_NextPDElement(ctx);
12673 }
12674 void Sample()
12675 {
12676 APIUtil::ErrorChecker error_checker(api_util);
12677 ctx_Circuit_Sample(ctx);
12678 }
12679 void SaveSample()
12680 {
12681 APIUtil::ErrorChecker error_checker(api_util);
12682 ctx_Circuit_SaveSample(ctx);
12683 }
12684 int32_t SetActiveBus(const char *BusName)
12685 {
12686 APIUtil::ErrorChecker error_checker(api_util);
12687 return ctx_Circuit_SetActiveBus(ctx, BusName);
12688 }
12689 int32_t SetActiveBus(const string &BusName)
12690 {
12691 APIUtil::ErrorChecker error_checker(api_util);
12692 return ctx_Circuit_SetActiveBus(ctx, BusName.c_str());
12693 }
12694 int32_t SetActiveBusi(int32_t BusIndex)
12695 {
12696 APIUtil::ErrorChecker error_checker(api_util);
12697 return ctx_Circuit_SetActiveBusi(ctx, BusIndex);
12698 }
12699 int32_t SetActiveClass(const char *ClassName)
12700 {
12701 APIUtil::ErrorChecker error_checker(api_util);
12702 return ctx_Circuit_SetActiveClass(ctx, ClassName);
12703 }
12704 int32_t SetActiveClass(const string &ClassName)
12705 {
12706 APIUtil::ErrorChecker error_checker(api_util);
12707 return ctx_Circuit_SetActiveClass(ctx, ClassName.c_str());
12708 }
12709 int32_t SetActiveElement(const char *FullName)
12710 {
12711 APIUtil::ErrorChecker error_checker(api_util);
12712 return ctx_Circuit_SetActiveElement(ctx, FullName);
12713 }
12714 int32_t SetActiveElement(const string &FullName)
12715 {
12716 APIUtil::ErrorChecker error_checker(api_util);
12717 return ctx_Circuit_SetActiveElement(ctx, FullName.c_str());
12718 }
12719 void UpdateStorage()
12720 {
12721 APIUtil::ErrorChecker error_checker(api_util);
12722 ctx_Circuit_UpdateStorage(ctx);
12723 }
12724
12728 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12729 VectorT AllBusDistances() // getter
12730 {
12731 APIUtil::ErrorChecker error_checker(api_util);
12732 ctx_Circuit_Get_AllBusDistances_GR(ctx);
12733 return api_util->get_float64_gr_array<VectorT>();
12734 }
12735
12739 strings AllBusNames() // getter
12740 {
12741 APIUtil::ErrorChecker error_checker(api_util);
12742 return api_util->get_string_array(ctx_Circuit_Get_AllBusNames);
12743 }
12744
12748 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12749 VectorT AllBusVmag() // getter
12750 {
12751 APIUtil::ErrorChecker error_checker(api_util);
12752 ctx_Circuit_Get_AllBusVmag_GR(ctx);
12753 return api_util->get_float64_gr_array<VectorT>();
12754 }
12755
12759 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12760 VectorT AllBusVmagPu() // getter
12761 {
12762 APIUtil::ErrorChecker error_checker(api_util);
12763 ctx_Circuit_Get_AllBusVmagPu_GR(ctx);
12764 return api_util->get_float64_gr_array<VectorT>();
12765 }
12766
12770 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12771 VectorT AllBusVolts() // getter
12772 {
12773 APIUtil::ErrorChecker error_checker(api_util);
12774 ctx_Circuit_Get_AllBusVolts_GR(ctx);
12775 return api_util->get_float64_gr_array<VectorT>();
12776 }
12777
12781 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12782 VectorT AllElementLosses() // getter
12783 {
12784 APIUtil::ErrorChecker error_checker(api_util);
12785 ctx_Circuit_Get_AllElementLosses_GR(ctx);
12786 return api_util->get_float64_gr_array<VectorT>();
12787 }
12788
12792 strings AllElementNames() // getter
12793 {
12794 APIUtil::ErrorChecker error_checker(api_util);
12795 return api_util->get_string_array(ctx_Circuit_Get_AllElementNames);
12796 }
12797
12801 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12802 VectorT AllNodeDistances() // getter
12803 {
12804 APIUtil::ErrorChecker error_checker(api_util);
12805 ctx_Circuit_Get_AllNodeDistances_GR(ctx);
12806 return api_util->get_float64_gr_array<VectorT>();
12807 }
12808
12812 strings AllNodeNames() // getter
12813 {
12814 APIUtil::ErrorChecker error_checker(api_util);
12815 return api_util->get_string_array(ctx_Circuit_Get_AllNodeNames);
12816 }
12817
12821 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12822 VectorT LineLosses() // getter
12823 {
12824 APIUtil::ErrorChecker error_checker(api_util);
12825 ctx_Circuit_Get_LineLosses_GR(ctx);
12826 return api_util->get_float64_gr_array<VectorT>();
12827 }
12828
12832 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12833 VectorT Losses() // getter
12834 {
12835 APIUtil::ErrorChecker error_checker(api_util);
12836 ctx_Circuit_Get_Losses_GR(ctx);
12837 return api_util->get_float64_gr_array<VectorT>();
12838 }
12839
12843 string Name() // getter
12844 {
12845 APIUtil::ErrorChecker error_checker(api_util);
12846 return ctx_Circuit_Get_Name(ctx);
12847 }
12848
12852 int32_t NumBuses() // getter
12853 {
12854 APIUtil::ErrorChecker error_checker(api_util);
12855 return ctx_Circuit_Get_NumBuses(ctx);
12856 }
12857
12861 int32_t NumCktElements() // getter
12862 {
12863 APIUtil::ErrorChecker error_checker(api_util);
12864 return ctx_Circuit_Get_NumCktElements(ctx);
12865 }
12866
12870 int32_t NumNodes() // getter
12871 {
12872 APIUtil::ErrorChecker error_checker(api_util);
12873 return ctx_Circuit_Get_NumNodes(ctx);
12874 }
12875
12879 int32_t ParentPDElement() // getter
12880 {
12881 APIUtil::ErrorChecker error_checker(api_util);
12882 return ctx_Circuit_Get_ParentPDElement(ctx);
12883 }
12884
12888 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12889 VectorT SubstationLosses() // getter
12890 {
12891 APIUtil::ErrorChecker error_checker(api_util);
12892 ctx_Circuit_Get_SubstationLosses_GR(ctx);
12893 return api_util->get_float64_gr_array<VectorT>();
12894 }
12895
12901 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12902 VectorT SystemY() // getter
12903 {
12904 APIUtil::ErrorChecker error_checker(api_util);
12905 ctx_Circuit_Get_SystemY_GR(ctx);
12906 return api_util->get_float64_gr_array<VectorT>();
12907 }
12908
12912 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12913 VectorT TotalPower() // getter
12914 {
12915 APIUtil::ErrorChecker error_checker(api_util);
12916 ctx_Circuit_Get_TotalPower_GR(ctx);
12917 return api_util->get_float64_gr_array<VectorT>();
12918 }
12919
12923 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12924 VectorT YCurrents() // getter
12925 {
12926 APIUtil::ErrorChecker error_checker(api_util);
12927 ctx_Circuit_Get_YCurrents_GR(ctx);
12928 return api_util->get_float64_gr_array<VectorT>();
12929 }
12930
12934 strings YNodeOrder() // getter
12935 {
12936 APIUtil::ErrorChecker error_checker(api_util);
12937 return api_util->get_string_array(ctx_Circuit_Get_YNodeOrder);
12938 }
12939
12943 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>>
12944 VectorT YNodeVarray() // getter
12945 {
12946 APIUtil::ErrorChecker error_checker(api_util);
12947 ctx_Circuit_Get_YNodeVarray_GR(ctx);
12948 return api_util->get_float64_gr_array<VectorT>();
12949 }
12956 template <typename VectorT=Eigen::Matrix<double, Eigen::Dynamic, 1>, typename InVectorT=Eigen::Matrix<int32_t, Eigen::Dynamic, 1>>
12957 VectorT ElementLosses(const InVectorT &value)
12958 {
12959 APIUtil::ErrorChecker error_checker(api_util);
12960 ctx_Circuit_Get_ElementLosses_GR(ctx, &value[0], value.size());
12961 return api_util->get_float64_gr_array<VectorT>();
12962 }
12963 };
12964
12965 class IDSS: public ContextState
12966 {
12967 public:
12968 ICircuit ActiveCircuit;
12969 ICircuit Circuits;
12970 IError Error;
12971 IText Text;
12972 IDSSProgress DSSProgress;
12973 IActiveClass ActiveClass;
12974 IDSS_Executive Executive;
12975 IParser Parser;
12976 IDSSimComs DSSim_Coms;
12977 IYMatrix YMatrix;
12978 IZIP ZIP;
12979 bool owns_util;
12980
12981 IDSS(dss::APIUtil *util, bool owns=false) :
12982 ContextState(util),
12983 ActiveCircuit(util),
12984 Circuits(util),
12985 Error(util),
12986 Text(util),
12987 DSSProgress(util),
12988 ActiveClass(util),
12989 Executive(util),
12990 Parser(util),
12991 DSSim_Coms(util),
12992 YMatrix(util),
12993 ZIP(util),
12994 owns_util(owns)
12995 {
12996 }
12997
13002 IDSS(): IDSS(new APIUtil(ctx_Get_Prime()))
13003 {
13004 }
13005
13013 {
13014 APIUtil *new_api_util = new APIUtil(ctx_New());
13015 return new IDSS(new_api_util, true);
13016 }
13017
13018 ~IDSS()
13019 {
13020 if (owns_util)
13021 {
13022 delete api_util;
13023 }
13024 }
13025
13026 void ClearAll()
13027 {
13028 APIUtil::ErrorChecker error_checker(api_util);
13029 ctx_DSS_ClearAll(ctx);
13030 }
13031 void Reset()
13032 {
13033 APIUtil::ErrorChecker error_checker(api_util);
13034 ctx_DSS_Reset(ctx);
13035 }
13036 int32_t SetActiveClass(const char *ClassName)
13037 {
13038 APIUtil::ErrorChecker error_checker(api_util);
13039 return ctx_DSS_SetActiveClass(ctx, ClassName);
13040 }
13041 int32_t SetActiveClass(const string &ClassName)
13042 {
13043 APIUtil::ErrorChecker error_checker(api_util);
13044 return ctx_DSS_SetActiveClass(ctx, ClassName.c_str());
13045 }
13046 bool Start(int32_t code)
13047 {
13048 APIUtil::ErrorChecker error_checker(api_util);
13049 return (ctx_DSS_Start(ctx, code) != 0);
13050 }
13051
13055 strings Classes() // getter
13056 {
13057 APIUtil::ErrorChecker error_checker(api_util);
13058 return api_util->get_string_array(ctx_DSS_Get_Classes);
13059 }
13060
13064 string DataPath() // getter
13065 {
13066 APIUtil::ErrorChecker error_checker(api_util);
13067 return ctx_DSS_Get_DataPath(ctx);
13068 }
13069 IDSS& DataPath(const char *value) // setter
13070 {
13071 APIUtil::ErrorChecker error_checker(api_util);
13072 ctx_DSS_Set_DataPath(ctx, value);
13073 return *this;
13074 }
13075 IDSS& DataPath(const string &value) // setter
13076 {
13077 APIUtil::ErrorChecker error_checker(api_util);
13078 ctx_DSS_Set_DataPath(ctx, value.c_str());
13079 return *this;
13080 }
13081
13085 string DefaultEditor() // getter
13086 {
13087 APIUtil::ErrorChecker error_checker(api_util);
13088 return ctx_DSS_Get_DefaultEditor(ctx);
13089 }
13090
13094 int32_t NumCircuits() // getter
13095 {
13096 APIUtil::ErrorChecker error_checker(api_util);
13097 return ctx_DSS_Get_NumCircuits(ctx);
13098 }
13099
13103 int32_t NumClasses() // getter
13104 {
13105 APIUtil::ErrorChecker error_checker(api_util);
13106 return ctx_DSS_Get_NumClasses(ctx);
13107 }
13108
13112 int32_t NumUserClasses() // getter
13113 {
13114 APIUtil::ErrorChecker error_checker(api_util);
13115 return ctx_DSS_Get_NumUserClasses(ctx);
13116 }
13117
13121 strings UserClasses() // getter
13122 {
13123 APIUtil::ErrorChecker error_checker(api_util);
13124 return api_util->get_string_array(ctx_DSS_Get_UserClasses);
13125 }
13126
13130 string Version() // getter
13131 {
13132 APIUtil::ErrorChecker error_checker(api_util);
13133 return ctx_DSS_Get_Version(ctx);
13134 }
13135
13139 bool AllowForms() // getter
13140 {
13141 APIUtil::ErrorChecker error_checker(api_util);
13142 return (ctx_DSS_Get_AllowForms(ctx) != 0);
13143 }
13144 IDSS& AllowForms(bool value) // setter
13145 {
13146 APIUtil::ErrorChecker error_checker(api_util);
13147 ctx_DSS_Set_AllowForms(ctx, value);
13148 return *this;
13149 }
13150
13160 bool AllowEditor() // getter
13161 {
13162 APIUtil::ErrorChecker error_checker(api_util);
13163 return (ctx_DSS_Get_AllowEditor(ctx) != 0);
13164 }
13165 IDSS& AllowEditor(bool value) // setter
13166 {
13167 APIUtil::ErrorChecker error_checker(api_util);
13168 ctx_DSS_Set_AllowEditor(ctx, value);
13169 return *this;
13170 }
13171 void ShowPanel()
13172 {
13173 APIUtil::ErrorChecker error_checker(api_util);
13174 // #warning ("ShowPanel is not implemented.");
13175 }
13176 ICircuit& NewCircuit(const char *name)
13177 {
13178 APIUtil::ErrorChecker error_checker(api_util);
13179 ctx_DSS_NewCircuit(ctx, name);
13180 return ActiveCircuit;
13181 }
13182 ICircuit& NewCircuit(const string &name)
13183 {
13184 APIUtil::ErrorChecker error_checker(api_util);
13185 ctx_DSS_NewCircuit(ctx, name.c_str());
13186 return ActiveCircuit;
13187 }
13188
13204 bool LegacyModels() // getter
13205 {
13206 APIUtil::ErrorChecker error_checker(api_util);
13207 return (ctx_DSS_Get_LegacyModels(ctx) != 0);
13208 }
13209 IDSS& LegacyModels(bool value) // setter
13210 {
13211 APIUtil::ErrorChecker error_checker(api_util);
13212 ctx_DSS_Set_LegacyModels(ctx, value);
13213 return *this;
13214 }
13215
13230 bool AllowChangeDir() // getter
13231 {
13232 APIUtil::ErrorChecker error_checker(api_util);
13233 return (ctx_DSS_Get_AllowChangeDir(ctx) != 0);
13234 }
13235 IDSS& AllowChangeDir(bool value) // setter
13236 {
13237 APIUtil::ErrorChecker error_checker(api_util);
13238 ctx_DSS_Set_AllowChangeDir(ctx, value);
13239 return *this;
13240 }
13241
13252 bool AllowDOScmd() // getter
13253 {
13254 APIUtil::ErrorChecker error_checker(api_util);
13255 return (ctx_DSS_Get_AllowDOScmd(ctx) != 0);
13256 }
13257 IDSS& AllowDOScmd(bool value) // setter
13258 {
13259 APIUtil::ErrorChecker error_checker(api_util);
13260 ctx_DSS_Set_AllowDOScmd(ctx, value);
13261 return *this;
13262 }
13263
13280 bool COMErrorResults() // getter
13281 {
13282 APIUtil::ErrorChecker error_checker(api_util);
13283 return (ctx_DSS_Get_COMErrorResults(ctx) != 0);
13284 }
13285 IDSS& COMErrorResults(bool value) // setter
13286 {
13287 APIUtil::ErrorChecker error_checker(api_util);
13288 ctx_DSS_Set_COMErrorResults(ctx, value);
13289 return *this;
13290 }
13291
13292 };
13293
13294} } // namespace dss::classic
13295#endif // #ifndef DSS_CPP_CLASSIC_API
Wraps common DSSContext state data.
Definition: dss_common.hpp:256
void * ctx
Pointer to the DSSContext for easy access.
Definition: dss_common.hpp:261
APIUtil * api_util
API utility functions.
Definition: dss_common.hpp:266
Definition: dss_classic.hpp:7590
int32_t NumElements()
Number of elements in this class.
Definition: dss_classic.hpp:7667
int32_t Next()
Sets next element in active class to be the active DSS object.
Definition: dss_classic.hpp:7658
string ActiveClassParent()
Get the name of the parent class of the active class.
Definition: dss_classic.hpp:7676
string ActiveClassName()
Returns name of active class.
Definition: dss_classic.hpp:7601
strings AllNames()
Array of strings consisting of all element names in the active class.
Definition: dss_classic.hpp:7610
string Name()
Name of the Active Element of the Active Class.
Definition: dss_classic.hpp:7637
int32_t Count()
Number of elements in Active Class.
Definition: dss_classic.hpp:7619
int32_t First()
Sets first element in the active class to be the active DSS object.
Definition: dss_classic.hpp:7628
string ToJSON(int32_t options=0)
Returns the data (as a list) of all elements from the active class as a JSON-encoded string.
Definition: dss_classic.hpp:7691
Definition: dss_classic.hpp:7699
int32_t N_Customers()
Total numbers of customers served downline from this bus.
Definition: dss_classic.hpp:7832
string Name()
Name of Bus.
Definition: dss_classic.hpp:7850
double Cust_Duration()
Accumulated customer outage durations.
Definition: dss_classic.hpp:7776
VectorT SeqVoltages()
Double Array of sequence voltages at this bus.
Definition: dss_classic.hpp:7889
VectorT puVmagAngle()
Array of doubles containig voltage magnitude, angle pairs in per unit.
Definition: dss_classic.hpp:8017
double Cust_Interrupts()
Annual number of customer-interruptions from this bus.
Definition: dss_classic.hpp:7785
double TotalMiles()
Total length of line downline from this bus, in miles.
Definition: dss_classic.hpp:7899
strings AllPDEatBus()
Returns an array with the names of all PDE connected to the active bus.
Definition: dss_classic.hpp:7737
int32_t SectionID()
Integer ID of the feeder section in which this bus is located.
Definition: dss_classic.hpp:7879
VectorT puVoltages()
Complex Array of pu voltages at the bus.
Definition: dss_classic.hpp:8028
VectorT Voltages()
Complex array of voltages at this bus.
Definition: dss_classic.hpp:7942
VectorT Nodes()
Integer Array of Node Numbers defined at the bus in same order as the voltages.
Definition: dss_classic.hpp:7860
strings AllPCEatBus()
Returns an array with the names of all PCE connected to the active bus.
Definition: dss_classic.hpp:7728
double Distance()
Distance from energymeter (if non-zero)
Definition: dss_classic.hpp:7794
VectorT ZSC012Matrix()
Array of doubles (complex) containing the complete 012 Zsc matrix.
Definition: dss_classic.hpp:8039
VectorT Zsc1()
Complex Positive-Sequence short circuit impedance at bus.
Definition: dss_classic.hpp:7975
double Int_Duration()
Average interruption duration, hr.
Definition: dss_classic.hpp:7803
VectorT VMagAngle()
Array of doubles containing voltages in Magnitude (VLN), angle (deg)
Definition: dss_classic.hpp:7920
double x()
X Coordinate for bus (double)
Definition: dss_classic.hpp:8049
VectorT VLL()
For 2- and 3-phase buses, returns array of complex numbers represetin L-L voltages in volts.
Definition: dss_classic.hpp:7909
VectorT YscMatrix()
Complex array of Ysc matrix at bus.
Definition: dss_classic.hpp:7953
double N_interrupts()
Number of interruptions this bus per year.
Definition: dss_classic.hpp:7841
VectorT Isc()
Short circuit currents at bus; Complex Array.
Definition: dss_classic.hpp:7813
VectorT puVLL()
Returns Complex array of pu L-L voltages for 2- and 3-phase buses.
Definition: dss_classic.hpp:8006
VectorT Zsc0()
Complex Zero-Sequence short circuit impedance at bus.
Definition: dss_classic.hpp:7964
double kVBase()
Base voltage at bus in kV.
Definition: dss_classic.hpp:7996
strings LineList()
List of strings: Full Names of LINE elements connected to the active bus.
Definition: dss_classic.hpp:8088
VectorT CplxSeqVoltages()
Complex Double array of Sequence Voltages (0, 1, 2) at this Bus.
Definition: dss_classic.hpp:7766
strings LoadList()
List of strings: Full Names of LOAD elements connected to the active bus.
Definition: dss_classic.hpp:8079
bool Coorddefined()
False=0 else True.
Definition: dss_classic.hpp:7756
VectorT ZscMatrix()
Complex array of Zsc matrix at bus.
Definition: dss_classic.hpp:7986
double y()
Y coordinate for bus(double)
Definition: dss_classic.hpp:8064
VectorT Voc()
Open circuit voltage; Complex array.
Definition: dss_classic.hpp:7931
int32_t NumNodes()
Number of Nodes this bus.
Definition: dss_classic.hpp:7870
double Lambda()
Accumulated failure rate downstream from this bus; faults per year.
Definition: dss_classic.hpp:7823
Definition: dss_classic.hpp:8097
strings AllNames()
Array of strings with all CNData names in the circuit.
Definition: dss_classic.hpp:8108
int32_t idx()
Get active CNData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8167
int32_t Next()
Sets the next CNData active.
Definition: dss_classic.hpp:8158
int32_t Count()
Number of CNData objects in active circuit.
Definition: dss_classic.hpp:8117
double EmergAmps()
Emergency ampere rating.
Definition: dss_classic.hpp:8185
void idx(int32_t value)
Get active CNData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8176
double NormAmps()
Normal Ampere rating.
Definition: dss_classic.hpp:8200
string Name()
Get the name of the current active CNData.
Definition: dss_classic.hpp:8135
int32_t First()
Sets the first CNData active.
Definition: dss_classic.hpp:8126
ICNData & Name(const char *value)
Sets the active CNData by Name.
Definition: dss_classic.hpp:8144
Definition: dss_classic.hpp:8406
ICapControls & Name(const char *value)
Sets the active CapControl by Name.
Definition: dss_classic.hpp:8453
int32_t idx()
Get active CapControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8476
double DelayOff()
Time delay [s] before swithcing off a step.
Definition: dss_classic.hpp:8562
int32_t Count()
Number of CapControl objects in active circuit.
Definition: dss_classic.hpp:8426
string Capacitor()
Name of the Capacitor that is controlled.
Definition: dss_classic.hpp:8514
double Vmax()
With VoltOverride, swtich off whenever PT voltage exceeds this level.
Definition: dss_classic.hpp:8688
int32_t Mode()
Type of automatic controller.
Definition: dss_classic.hpp:8577
string Name()
Get the name of the current active CapControl.
Definition: dss_classic.hpp:8444
double PTratio()
Transducer ratio from primary feeder to control voltage.
Definition: dss_classic.hpp:8658
double ONSetting()
Threshold to arm or switch on a step.
Definition: dss_classic.hpp:8643
int32_t MonitoredTerm()
Terminal number on the element that PT and CT are connected to.
Definition: dss_classic.hpp:8613
double CTratio()
Transducer ratio from pirmary current to control current.
Definition: dss_classic.hpp:8499
double Vmin()
With VoltOverride, switch ON whenever PT voltage drops below this level.
Definition: dss_classic.hpp:8703
int32_t Next()
Sets the next CapControl active.
Definition: dss_classic.hpp:8467
strings AllNames()
Array of strings with all CapControl names in the circuit.
Definition: dss_classic.hpp:8417
int32_t First()
Sets the first CapControl active.
Definition: dss_classic.hpp:8435
double OFFSetting()
Threshold to switch off a step.
Definition: dss_classic.hpp:8628
string MonitoredObj()
Full name of the element that PT and CT are connected to.
Definition: dss_classic.hpp:8592
bool UseVoltOverride()
Enables Vmin and Vmax to override the control Mode.
Definition: dss_classic.hpp:8673
double Delay()
Time delay [s] to switch on after arming.
Definition: dss_classic.hpp:8547
void idx(int32_t value)
Get active CapControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8485
Definition: dss_classic.hpp:8717
int32_t Count()
Number of Capacitor objects in active circuit.
Definition: dss_classic.hpp:8737
int32_t AvailableSteps()
Number of Steps available in cap bank to be switched ON.
Definition: dss_classic.hpp:8825
bool IsDelta()
Delta connection or wye?
Definition: dss_classic.hpp:8834
ICapacitors & Name(const char *value)
Sets the active Capacitor by Name.
Definition: dss_classic.hpp:8764
void idx(int32_t value)
Get active Capacitor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8796
strings AllNames()
Array of strings with all Capacitor names in the circuit.
Definition: dss_classic.hpp:8728
int32_t Next()
Sets the next Capacitor active.
Definition: dss_classic.hpp:8778
double kvar()
Total bank KVAR, distributed equally among phases and steps.
Definition: dss_classic.hpp:8897
double kV()
Bank kV rating.
Definition: dss_classic.hpp:8882
VectorT States()
A array of integer [0..numsteps-1] indicating state of each step.
Definition: dss_classic.hpp:8865
int32_t NumSteps()
Number of steps (default 1) for distributing and switching the total bank kVAR.
Definition: dss_classic.hpp:8849
int32_t idx()
Get active Capacitor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:8787
string Name()
Get the name of the current active Capacitor.
Definition: dss_classic.hpp:8755
int32_t First()
Sets the first Capacitor active.
Definition: dss_classic.hpp:8746
Definition: dss_classic.hpp:12431
VectorT AllNodeDistances()
Returns an array of distances from parent EnergyMeter for each Node.
Definition: dss_classic.hpp:12802
VectorT AllBusVmag()
Array of magnitudes (doubles) of voltages at all buses.
Definition: dss_classic.hpp:12749
VectorT AllElementLosses()
Array of total losses (complex) in each circuit element.
Definition: dss_classic.hpp:12782
ICktElement get_CktElements(int32_t idx)
Activates and returns a CktElement by its global (zero-based) index.
Definition: dss_classic.hpp:12556
VectorT TotalPower()
Total power, kW delivered to the circuit.
Definition: dss_classic.hpp:12913
strings AllNodeNames()
Array of strings containing full name of each node in system in same order as returned by AllBusVolts...
Definition: dss_classic.hpp:12812
VectorT AllNodeDistancesByPhase(int32_t Phase)
Returns an array of doubles representing the distances to parent EnergyMeter.
Definition: dss_classic.hpp:12625
VectorT SubstationLosses()
Complex losses in all transformers designated to substations.
Definition: dss_classic.hpp:12889
string Name()
Name of the active circuit.
Definition: dss_classic.hpp:12843
strings AllNodeNamesByPhase(int32_t Phase)
Return array of strings of the node names for the By Phase criteria.
Definition: dss_classic.hpp:12634
strings YNodeOrder()
Array of strings containing the names of the nodes in the same order as the Y matrix.
Definition: dss_classic.hpp:12934
ICktElement get_CktElements(const char *fullName)
Activates and returns a CktElement by its full name (e.g.
Definition: dss_classic.hpp:12566
int32_t ParentPDElement()
Sets Parent PD element, if any, to be the active circuit element and returns index>0; Returns 0 if it...
Definition: dss_classic.hpp:12879
int32_t NumBuses()
Total number of Buses in the circuit.
Definition: dss_classic.hpp:12852
strings AllBusNames()
Array of strings containing names of all buses in circuit (see AllNodeNames).
Definition: dss_classic.hpp:12739
VectorT AllBusVolts()
Complex array of all bus, node voltages from most recent solution.
Definition: dss_classic.hpp:12771
VectorT LineLosses()
Complex total line losses in the circuit.
Definition: dss_classic.hpp:12822
IBus & get_Buses(int32_t idx)
Activates and returns a bus by its (zero-based) index.
Definition: dss_classic.hpp:12528
strings AllElementNames()
Array of strings containing Full Name of all elements.
Definition: dss_classic.hpp:12792
VectorT AllBusDistances()
Returns distance from each bus to parent EnergyMeter.
Definition: dss_classic.hpp:12729
VectorT AllBusVmagPu()
Double Array of all bus voltages (each node) magnitudes in Per unit.
Definition: dss_classic.hpp:12760
VectorT AllNodeVmagByPhase(int32_t Phase)
Returns Array of doubles represent voltage magnitudes for nodes on the specified phase.
Definition: dss_classic.hpp:12643
VectorT ElementLosses(const InVectorT &value)
Array of total losses (complex) in a selection of elements.
Definition: dss_classic.hpp:12957
VectorT AllNodeVmagPUByPhase(int32_t Phase)
Returns array of per unit voltage magnitudes for each node by phase.
Definition: dss_classic.hpp:12653
VectorT SystemY()
System Y matrix (after a solution has been performed).
Definition: dss_classic.hpp:12902
VectorT YNodeVarray()
Complex array of actual node voltages in same order as SystemY matrix.
Definition: dss_classic.hpp:12944
int32_t NumNodes()
Total number of nodes in the circuit.
Definition: dss_classic.hpp:12870
VectorT YCurrents()
Array of doubles containing complex injection currents for the present solution.
Definition: dss_classic.hpp:12924
VectorT Losses()
Total losses in active circuit, complex number (two-element array of double).
Definition: dss_classic.hpp:12833
IBus & get_Buses(const char *name)
Activates and returns a bus by its name.
Definition: dss_classic.hpp:12540
int32_t NumCktElements()
Number of CktElements in the circuit.
Definition: dss_classic.hpp:12861
Definition: dss_classic.hpp:10860
VectorT AllVariableValues()
Array of doubles.
Definition: dss_classic.hpp:10957
VectorT PhaseLosses()
Complex array of losses by phase.
Definition: dss_classic.hpp:11242
int32_t NumControls()
Number of controls connected to this device.
Definition: dss_classic.hpp:11187
VectorT SeqPowers()
Double array of sequence powers into each 3-phase teminal.
Definition: dss_classic.hpp:11286
bool IsIsolated()
Returns true if the current active element is isolated.
Definition: dss_classic.hpp:11341
VectorT Powers()
Complex array of powers into each conductor of each terminal.
Definition: dss_classic.hpp:11253
string Name()
Full Name of Active Circuit Element.
Definition: dss_classic.hpp:11142
VectorT VoltagesMagAng()
Voltages at each conductor in magnitude, angle form as array of doubles.
Definition: dss_classic.hpp:11319
strings AllPropertyNames()
Array containing all property names of the active device.
Definition: dss_classic.hpp:10938
strings BusNames()
Array of strings.
Definition: dss_classic.hpp:10967
int32_t OCPDevIndex()
Index into Controller list of OCP Device controlling this CktElement.
Definition: dss_classic.hpp:11223
VectorT CplxSeqVoltages()
Complex double array of Sequence Voltage for all terminals of active circuit element.
Definition: dss_classic.hpp:10994
VectorT Currents()
Complex array of currents into each conductor of each terminal.
Definition: dss_classic.hpp:11005
VectorT Voltages()
Complex array of voltages at terminals.
Definition: dss_classic.hpp:11308
string DisplayName()
Display name of the object (not necessarily unique)
Definition: dss_classic.hpp:11026
int32_t Handle()
Pointer to this object.
Definition: dss_classic.hpp:11095
int32_t NumTerminals()
Number of Terminals this Circuit Element.
Definition: dss_classic.hpp:11214
strings AllVariableNames()
Array of strings listing all the published variable names, if a PCElement.
Definition: dss_classic.hpp:10947
VectorT TotalPowers()
Returns the total powers (complex) at ALL terminals of the active circuit element.
Definition: dss_classic.hpp:11351
double EmergAmps()
Emergency Ampere Rating for PD elements.
Definition: dss_classic.hpp:11047
int32_t OCPDevType()
0=None; 1=Fuse; 2=Recloser; 3=Relay; Type of OCP controller device
Definition: dss_classic.hpp:11232
VectorT Yprim()
YPrim matrix, column order, complex numbers (paired)
Definition: dss_classic.hpp:11330
VectorT CurrentsMagAng()
Currents in magnitude, angle format as a array of doubles.
Definition: dss_classic.hpp:11016
VectorT Residuals()
Residual currents for each terminal: (mag, angle)
Definition: dss_classic.hpp:11264
int32_t NumConductors()
Number of Conductors per Terminal.
Definition: dss_classic.hpp:11177
VectorT Losses()
Total losses in the element: two-element complex array.
Definition: dss_classic.hpp:11132
double Variablei(int32_t Idx, int32_t &Code)
Value as return and error code in Code parameter.
Definition: dss_classic.hpp:10886
string Controller(int32_t idx)
Full name of the i-th controller attached to this element.
Definition: dss_classic.hpp:10919
VectorT SeqCurrents()
Double array of symmetrical component currents into each 3-phase terminal.
Definition: dss_classic.hpp:11275
double NormalAmps()
Normal ampere rating for PD Elements.
Definition: dss_classic.hpp:11162
bool Enabled()
Boolean indicating that element is currently in the circuit.
Definition: dss_classic.hpp:11062
bool HasOCPDevice()
True if a recloser, relay, or fuse controlling this ckt element.
Definition: dss_classic.hpp:11104
string EnergyMeter()
Name of the Energy Meter this element is assigned to.
Definition: dss_classic.hpp:11077
string GUID()
globally unique identifier for this object
Definition: dss_classic.hpp:11086
VectorT NodeOrder()
Array of integer containing the node numbers (representing phases, for example) for each conductor of...
Definition: dss_classic.hpp:11152
VectorT SeqVoltages()
Double array of symmetrical component voltages at each 3-phase terminal.
Definition: dss_classic.hpp:11297
int32_t NumProperties()
Number of Properties this Circuit Element.
Definition: dss_classic.hpp:11205
VectorT CplxSeqCurrents()
Complex double array of Sequence Currents for all conductors of all terminals of active circuit eleme...
Definition: dss_classic.hpp:10983
VectorT NodeRef()
Array of integers, a copy of the internal NodeRef of the CktElement.
Definition: dss_classic.hpp:11362
int32_t NumPhases()
Number of Phases.
Definition: dss_classic.hpp:11196
bool HasVoltControl()
This element has a CapControl or RegControl attached.
Definition: dss_classic.hpp:11122
bool HasSwitchControl()
This element has a SwtControl attached.
Definition: dss_classic.hpp:11113
double Variable(const char *MyVarName, int32_t &Code)
Value as return and error code in Code parameter.
Definition: dss_classic.hpp:10873
Definition: dss_classic.hpp:8911
int32_t NumActions()
Number of Actions on the current actionlist (that have been popped off the control queue by CheckCont...
Definition: dss_classic.hpp:8965
int32_t Push(int32_t Hour, double Seconds, int32_t ActionCode, int32_t DeviceHandle)
Push a control action onto the DSS control queue by time, action code, and device handle (user define...
Definition: dss_classic.hpp:8973
int32_t DeviceHandle()
Handle (User defined) to device that must act on the pending action.
Definition: dss_classic.hpp:8956
int32_t QueueSize()
Number of items on the OpenDSS control Queue.
Definition: dss_classic.hpp:9000
int32_t ActionCode()
Code for the active action.
Definition: dss_classic.hpp:8947
ICtrlQueue & Action(int32_t value)
(write-only) Set the active action by index
Definition: dss_classic.hpp:9009
strings Queue()
Array of strings containing the entire queue in CSV format.
Definition: dss_classic.hpp:8991
int32_t PopAction()
Pops next action off the action list and makes it the active action.
Definition: dss_classic.hpp:8982
Definition: dss_classic.hpp:9018
strings AllPropertyNames()
Array of strings containing the names of all properties for the active DSS object.
Definition: dss_classic.hpp:9031
int32_t NumProperties()
Number of Properties for the active DSS object.
Definition: dss_classic.hpp:9049
string Name()
Full Name of Active DSS Object (general element or circuit element).
Definition: dss_classic.hpp:9040
string ToJSON(int32_t options=0)
Returns the properties of the active DSS object as a JSON-encoded string.
Definition: dss_classic.hpp:9062
Definition: dss_classic.hpp:29
IDSSProgress & Caption(const char *value)
(write-only) Caption to appear on the bottom of the DSS Progress form.
Definition: dss_classic.hpp:50
IDSSProgress & PctProgress(int32_t value)
(write-only) Percent progress to indicate [0..100]
Definition: dss_classic.hpp:66
Definition: dss_classic.hpp:75
string Description()
Description of the property.
Definition: dss_classic.hpp:104
string Name()
Name of Property.
Definition: dss_classic.hpp:113
Definition: dss_classic.hpp:139
string CommandHelp(int32_t i)
Get help string for i-th command.
Definition: dss_classic.hpp:157
string Command(int32_t i)
Get i-th command.
Definition: dss_classic.hpp:149
string OptionHelp(int32_t i)
Get help string for i-th option.
Definition: dss_classic.hpp:173
string OptionValue(int32_t i)
Get present value of i-th option.
Definition: dss_classic.hpp:181
int32_t NumOptions()
Number of DSS Executive Options.
Definition: dss_classic.hpp:199
int32_t NumCommands()
Number of DSS Executive Commands.
Definition: dss_classic.hpp:190
string Option(int32_t i)
Get i-th option.
Definition: dss_classic.hpp:165
Definition: dss_classic.hpp:12966
string DefaultEditor()
Returns the path name for the default text editor.
Definition: dss_classic.hpp:13085
bool AllowDOScmd()
If enabled, the DOScmd command is allowed.
Definition: dss_classic.hpp:13252
string Version()
Get version string for the DSS.
Definition: dss_classic.hpp:13130
bool AllowEditor()
Gets/sets whether running the external editor for "Show" is allowed.
Definition: dss_classic.hpp:13160
strings UserClasses()
List of user-defined classes.
Definition: dss_classic.hpp:13121
bool COMErrorResults()
If enabled, in case of errors or empty arrays, the API returns arrays with values compatible with the...
Definition: dss_classic.hpp:13280
strings Classes()
List of DSS intrinsic classes (names of the classes)
Definition: dss_classic.hpp:13055
IDSS()
Expose DSS without a constructor parameters for backwards compatibility.
Definition: dss_classic.hpp:13002
static IDSS * NewContext()
Creates a new DSS engine context.
Definition: dss_classic.hpp:13012
int32_t NumUserClasses()
Number of user-defined classes.
Definition: dss_classic.hpp:13112
bool LegacyModels()
If enabled, the legacy/deprecated models for PVSystem, InvControl, Storage and StorageControl are use...
Definition: dss_classic.hpp:13204
bool AllowForms()
Gets/sets whether text output is allowed.
Definition: dss_classic.hpp:13139
bool AllowChangeDir()
If disabled, the engine will not change the active working directory during execution.
Definition: dss_classic.hpp:13230
string DataPath()
DSS Data File Path.
Definition: dss_classic.hpp:13064
int32_t NumCircuits()
Number of Circuits currently defined.
Definition: dss_classic.hpp:13094
int32_t NumClasses()
Number of DSS intrinsic classes.
Definition: dss_classic.hpp:13103
Definition: dss_classic.hpp:207
Definition: dss_classic.hpp:231
int32_t Number()
Error Number (returns current value and then resets to zero)
Definition: dss_classic.hpp:251
bool EarlyAbort()
EarlyAbort controls whether all errors halts the DSS script processing (Compile/Redirect),...
Definition: dss_classic.hpp:262
bool ExtendedErrors()
Controls whether the extended error mechanism is used.
Definition: dss_classic.hpp:296
string Description()
Description of error for last operation.
Definition: dss_classic.hpp:242
Definition: dss_classic.hpp:310
double Delay()
A fixed delay time in seconds added to the fuse blowing time determined by the TCC curve.
Definition: dss_classic.hpp:431
strings State()
Array of strings indicating the state of each phase of the fuse.
Definition: dss_classic.hpp:565
strings NormalState()
Array of strings indicating the normal state of each phase of the fuse.
Definition: dss_classic.hpp:580
int32_t idx()
Get active Fuse by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:380
double RatedCurrent()
Multiplier or actual amps for the TCCcurve object.
Definition: dss_classic.hpp:492
int32_t First()
Sets the first Fuse active.
Definition: dss_classic.hpp:339
bool IsBlown()
Current state of the fuses.
Definition: dss_classic.hpp:405
void Close()
Close all phases of the fuse.
Definition: dss_classic.hpp:397
int32_t Next()
Sets the next Fuse active.
Definition: dss_classic.hpp:371
int32_t SwitchedTerm()
Number of the terminal of the controlled element containing the switch controlled by the fuse.
Definition: dss_classic.hpp:529
void Open()
Manual opening of all phases of the fuse.
Definition: dss_classic.hpp:413
void Reset()
Reset fuse to normal state.
Definition: dss_classic.hpp:421
string TCCcurve()
Name of the TCCcurve object that determines fuse blowing.
Definition: dss_classic.hpp:544
int32_t Count()
Number of Fuse objects in active circuit.
Definition: dss_classic.hpp:330
int32_t NumPhases()
Number of phases, this fuse.
Definition: dss_classic.hpp:482
int32_t MonitoredTerm()
Terminal number to which the fuse is connected.
Definition: dss_classic.hpp:467
string Name()
Get the name of the current active Fuse.
Definition: dss_classic.hpp:348
string SwitchedObj()
Full name of the circuit element switch that the fuse controls.
Definition: dss_classic.hpp:508
strings AllNames()
Array of strings with all Fuse names in the circuit.
Definition: dss_classic.hpp:321
void idx(int32_t value)
Get active Fuse by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:389
string MonitoredObj()
Full name of the circuit element to which the fuse is connected.
Definition: dss_classic.hpp:446
IFuses & Name(const char *value)
Sets the active Fuse by Name.
Definition: dss_classic.hpp:357
Definition: dss_classic.hpp:11371
int32_t Count()
Number of GICSource objects in active circuit.
Definition: dss_classic.hpp:11391
void idx(int32_t value)
Get active GICSource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:11450
double Lat2()
Latitude of Bus2 (degrees)
Definition: dss_classic.hpp:11537
IGICSources & Name(const char *value)
Sets the active GICSource by Name.
Definition: dss_classic.hpp:11418
int32_t Next()
Sets the next GICSource active.
Definition: dss_classic.hpp:11432
int32_t Phases()
Number of Phases, this GICSource element.
Definition: dss_classic.hpp:11477
strings AllNames()
Array of strings with all GICSource names in the circuit.
Definition: dss_classic.hpp:11382
double Lon2()
Longitude of Bus2 (Degrees)
Definition: dss_classic.hpp:11567
double Volts()
Specify dc voltage directly.
Definition: dss_classic.hpp:11582
double Lon1()
Longitude of Bus1 (Degrees)
Definition: dss_classic.hpp:11552
double EN()
Northward E Field V/km.
Definition: dss_classic.hpp:11492
string Bus1()
First bus name of GICSource (Created name)
Definition: dss_classic.hpp:11459
string Name()
Get the name of the current active GICSource.
Definition: dss_classic.hpp:11409
double EE()
Eastward E Field, V/km.
Definition: dss_classic.hpp:11507
int32_t First()
Sets the first GICSource active.
Definition: dss_classic.hpp:11400
int32_t idx()
Get active GICSource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:11441
double Lat1()
Latitude of Bus1 (degrees)
Definition: dss_classic.hpp:11522
string Bus2()
Second bus name.
Definition: dss_classic.hpp:11468
Definition: dss_classic.hpp:594
int32_t Phases()
Number of phases.
Definition: dss_classic.hpp:727
bool IsDelta()
Generator connection.
Definition: dss_classic.hpp:942
double kW()
kW output for the active generator.
Definition: dss_classic.hpp:822
string Bus1()
Bus to which the Generator is connected.
Definition: dss_classic.hpp:993
double PF()
Power factor (pos.
Definition: dss_classic.hpp:712
double Vmaxpu()
Vmaxpu for generator model.
Definition: dss_classic.hpp:762
int32_t idx()
Get active Generator by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:664
VectorT RegisterValues()
Array of valus in generator energy meter registers.
Definition: dss_classic.hpp:752
int32_t Count()
Number of Generator objects in active circuit.
Definition: dss_classic.hpp:614
strings AllNames()
Array of strings with all Generator names in the circuit.
Definition: dss_classic.hpp:605
double kvar()
kvar output for the active generator.
Definition: dss_classic.hpp:837
IGenerators & Name(const char *value)
Sets the active Generator by Name.
Definition: dss_classic.hpp:641
string duty()
Name of the loadshape for a duty cycle simulation.
Definition: dss_classic.hpp:877
int32_t Next()
Sets the next Generator active.
Definition: dss_classic.hpp:655
string daily()
Name of the loadshape for a daily generation profile.
Definition: dss_classic.hpp:854
int32_t First()
Sets the first Generator active.
Definition: dss_classic.hpp:623
bool ForcedON()
Indicates whether the generator is forced ON regardles of other dispatch criteria.
Definition: dss_classic.hpp:682
double kV()
Voltage base for the active generator, kV.
Definition: dss_classic.hpp:792
void idx(int32_t value)
Get active Generator by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:673
strings RegisterNames()
Array of Names of all generator energy meter registers.
Definition: dss_classic.hpp:742
int32_t Model()
Generator Model.
Definition: dss_classic.hpp:697
string Name()
Get the name of the current active Generator.
Definition: dss_classic.hpp:632
double kva()
kVA rating of electrical machine.
Definition: dss_classic.hpp:959
int32_t Status()
Response to dispatch multipliers: Fixed=1 (dispatch multipliers do not apply), Variable=0 (follows cu...
Definition: dss_classic.hpp:925
double Vminpu()
Vminpu for Generator model.
Definition: dss_classic.hpp:777
string Yearly()
Name of yearly loadshape.
Definition: dss_classic.hpp:900
int32_t Class()
An arbitrary integer number representing the class of Generator so that Generator values may be segre...
Definition: dss_classic.hpp:976
double kVArated()
kVA rating of the generator
Definition: dss_classic.hpp:807
Definition: dss_classic.hpp:1013
double Amps()
Magnitude of the ISource in amps.
Definition: dss_classic.hpp:1101
strings AllNames()
Array of strings with all ISource names in the circuit.
Definition: dss_classic.hpp:1024
double Frequency()
The present frequency of the ISource, Hz.
Definition: dss_classic.hpp:1131
double AngleDeg()
Phase angle for ISource, degrees.
Definition: dss_classic.hpp:1116
int32_t Count()
Number of ISource objects in active circuit.
Definition: dss_classic.hpp:1033
int32_t First()
Sets the first ISource active.
Definition: dss_classic.hpp:1042
void idx(int32_t value)
Get active ISource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1092
int32_t Next()
Sets the next ISource active.
Definition: dss_classic.hpp:1074
int32_t idx()
Get active ISource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1083
string Name()
Get the name of the current active ISource.
Definition: dss_classic.hpp:1051
IISources & Name(const char *value)
Sets the active ISource by Name.
Definition: dss_classic.hpp:1060
Definition: dss_classic.hpp:1145
bool IsZ1Z0()
Flag denoting whether impedance data were entered in symmetrical components.
Definition: dss_classic.hpp:1296
double NormAmps()
Normal Ampere rating.
Definition: dss_classic.hpp:1305
double R1()
Positive-sequence resistance ohms per unit length.
Definition: dss_classic.hpp:1350
string Name()
Get the name of the current active LineCode.
Definition: dss_classic.hpp:1183
double C0()
Zero-sequence capacitance, nF per unit length.
Definition: dss_classic.hpp:1233
ILineCodes & Name(const char *value)
Sets the active LineCode by Name.
Definition: dss_classic.hpp:1192
int32_t First()
Sets the first LineCode active.
Definition: dss_classic.hpp:1174
VectorT Rmatrix()
Resistance matrix, ohms per unit length.
Definition: dss_classic.hpp:1366
strings AllNames()
Array of strings with all LineCode names in the circuit.
Definition: dss_classic.hpp:1156
double EmergAmps()
Emergency ampere rating.
Definition: dss_classic.hpp:1281
void idx(int32_t value)
Get active LineCode by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1224
VectorT Xmatrix()
Reactance matrix, ohms per unit length.
Definition: dss_classic.hpp:1426
int32_t Count()
Number of LineCode objects in active circuit.
Definition: dss_classic.hpp:1165
int32_t idx()
Get active LineCode by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1215
double C1()
Positive-sequence capacitance, nF per unit length.
Definition: dss_classic.hpp:1248
double X1()
Posiive-sequence reactance, ohms per unit length.
Definition: dss_classic.hpp:1410
double X0()
Zero Sequence Reactance, Ohms per unit length.
Definition: dss_classic.hpp:1395
int32_t Phases()
Number of Phases.
Definition: dss_classic.hpp:1320
VectorT Cmatrix()
Capacitance matrix, nF per unit length.
Definition: dss_classic.hpp:1264
double R0()
Zero-Sequence Resistance, ohms per unit length.
Definition: dss_classic.hpp:1335
int32_t Next()
Sets the next LineCode active.
Definition: dss_classic.hpp:1206
Definition: dss_classic.hpp:9070
int32_t idx()
Get active LineGeometrie by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9140
string Name()
Get the name of the current active LineGeometrie.
Definition: dss_classic.hpp:9108
int32_t Nconds()
Number of conductors in this geometry.
Definition: dss_classic.hpp:9327
double NormAmps()
Normal ampere rating.
Definition: dss_classic.hpp:9182
int32_t Count()
Number of LineGeometrie objects in active circuit.
Definition: dss_classic.hpp:9090
int32_t Next()
Sets the next LineGeometrie active.
Definition: dss_classic.hpp:9131
VectorT Cmatrix(double Frequency, double Length, int32_t Units)
Capacitance matrix, nF.
Definition: dss_classic.hpp:9266
ILineGeometries & Name(const char *value)
Sets the active LineGeometrie by Name.
Definition: dss_classic.hpp:9117
double EmergAmps()
Emergency ampere rating.
Definition: dss_classic.hpp:9167
strings AllNames()
Array of strings with all LineGeometrie names in the circuit.
Definition: dss_classic.hpp:9081
void idx(int32_t value)
Get active LineGeometrie by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9149
VectorT Xmatrix(double Frequency, double Length, int32_t Units)
Reactance matrix, ohms.
Definition: dss_classic.hpp:9246
VectorT Rmatrix(double Frequency, double Length, int32_t Units)
Resistance matrix, ohms.
Definition: dss_classic.hpp:9236
int32_t First()
Sets the first LineGeometrie active.
Definition: dss_classic.hpp:9099
VectorT Ycoords()
Get/Set the Y (vertical/height) coordinates of the conductors.
Definition: dss_classic.hpp:9310
VectorT Zmatrix(double Frequency, double Length, int32_t Units)
Complex impedance matrix, ohms.
Definition: dss_classic.hpp:9256
strings Conductors()
Array of strings with names of all conductors in the active LineGeometry object.
Definition: dss_classic.hpp:9158
int32_t Phases()
Number of Phases.
Definition: dss_classic.hpp:9221
VectorT Xcoords()
Get/Set the X (horizontal) coordinates of the conductors.
Definition: dss_classic.hpp:9292
Definition: dss_classic.hpp:1442
int32_t First()
Sets the first LineSpacing active.
Definition: dss_classic.hpp:1471
string Name()
Get the name of the current active LineSpacing.
Definition: dss_classic.hpp:1480
int32_t Phases()
Number of Phases.
Definition: dss_classic.hpp:1530
int32_t Count()
Number of LineSpacing objects in active circuit.
Definition: dss_classic.hpp:1462
VectorT Xcoords()
Get/Set the X (horizontal) coordinates of the conductors.
Definition: dss_classic.hpp:1570
ILineSpacings & Name(const char *value)
Sets the active LineSpacing by Name.
Definition: dss_classic.hpp:1489
strings AllNames()
Array of strings with all LineSpacing names in the circuit.
Definition: dss_classic.hpp:1453
int32_t idx()
Get active LineSpacing by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1512
void idx(int32_t value)
Get active LineSpacing by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1521
VectorT Ycoords()
Get/Set the Y (vertical/height) coordinates of the conductors.
Definition: dss_classic.hpp:1588
int32_t Next()
Sets the next LineSpacing active.
Definition: dss_classic.hpp:1503
Definition: dss_classic.hpp:9341
void idx(int32_t value)
Get active Line by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9420
int32_t Next()
Sets the next Line active.
Definition: dss_classic.hpp:9402
int32_t Phases()
Number of Phases, this Line element.
Definition: dss_classic.hpp:9631
string Name()
Get the name of the current active Line.
Definition: dss_classic.hpp:9379
double X1()
Positive Sequence reactance, ohms per unit length.
Definition: dss_classic.hpp:9781
double Rho()
Earth Resistivity, m-ohms.
Definition: dss_classic.hpp:9691
int32_t Count()
Number of Line objects in active circuit.
Definition: dss_classic.hpp:9361
double C0()
Zero Sequence capacitance, nanofarads per unit length.
Definition: dss_classic.hpp:9481
double C1()
Positive Sequence capacitance, nanofarads per unit length.
Definition: dss_classic.hpp:9496
int32_t idx()
Get active Line by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9411
double SeasonRating()
Delivers the rating for the current season (in Amps) if the "SeasonalRatings" option is active.
Definition: dss_classic.hpp:9844
string Bus2()
Name of bus for terminal 2.
Definition: dss_classic.hpp:9460
int32_t Parent()
Sets Parent of the active Line to be the active line.
Definition: dss_classic.hpp:9622
VectorT Rmatrix()
Resistance matrix (full), ohms per unit length.
Definition: dss_classic.hpp:9707
string Geometry()
Line geometry code.
Definition: dss_classic.hpp:9541
int32_t TotalCust()
Total Number of customers served from this line section.
Definition: dss_classic.hpp:9745
double Rg()
Earth return resistance value used to compute line impedances at power frequency.
Definition: dss_classic.hpp:9676
string LineCode()
Name of LineCode object that defines the impedances.
Definition: dss_classic.hpp:9577
double Xg()
Earth return reactance value used to compute line impedances at power frequency.
Definition: dss_classic.hpp:9796
string Bus1()
Name of bus for terminal 1.
Definition: dss_classic.hpp:9439
double R1()
Positive Sequence resistance, ohms per unit length.
Definition: dss_classic.hpp:9661
double NormAmps()
Normal ampere rating of Line.
Definition: dss_classic.hpp:9598
ILines & Name(const char *value)
Sets the active Line by Name.
Definition: dss_classic.hpp:9388
bool IsSwitch()
Sets/gets the Line element switch status.
Definition: dss_classic.hpp:9853
int32_t NumCust()
Number of customers on this line section.
Definition: dss_classic.hpp:9613
double X0()
Zero Sequence reactance ohms per unit length.
Definition: dss_classic.hpp:9766
double EmergAmps()
Emergency (maximum) ampere rating of Line.
Definition: dss_classic.hpp:9526
double R0()
Zero Sequence resistance, ohms per unit length.
Definition: dss_classic.hpp:9646
strings AllNames()
Array of strings with all Line names in the circuit.
Definition: dss_classic.hpp:9352
string Spacing()
Line spacing code.
Definition: dss_classic.hpp:9724
double Length()
Length of line section in units compatible with the LineCode definition.
Definition: dss_classic.hpp:9562
int32_t First()
Sets the first Line active.
Definition: dss_classic.hpp:9370
VectorT Yprim()
Yprimitive: Does Nothing at present on Put; Dangerous.
Definition: dss_classic.hpp:9827
Definition: dss_classic.hpp:1604
int32_t Count()
Number of LoadShape objects in active circuit.
Definition: dss_classic.hpp:1624
ILoadShapes & Name(const char *value)
Sets the active LoadShape by Name.
Definition: dss_classic.hpp:1651
string Name()
Get the name of the current active LoadShape.
Definition: dss_classic.hpp:1642
double HrInterval()
Fixed interval time value, hours.
Definition: dss_classic.hpp:1707
int32_t First()
Sets the first LoadShape active.
Definition: dss_classic.hpp:1633
strings AllNames()
Array of strings with all LoadShape names in the circuit.
Definition: dss_classic.hpp:1615
int32_t Next()
Sets the next LoadShape active.
Definition: dss_classic.hpp:1665
double QBase()
Base for normalizing Q curve.
Definition: dss_classic.hpp:1782
void UseFloat32()
Converts the current LoadShape data to float32/single precision.
Definition: dss_classic.hpp:1862
int32_t idx()
Get active LoadShape by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1674
bool UseActual()
Boolean flag to let Loads know to use the actual value in the curve rather than use the value as a mu...
Definition: dss_classic.hpp:1833
VectorT Pmult()
Array of doubles for the P multiplier in the Loadshape.
Definition: dss_classic.hpp:1765
double MinInterval()
Fixed Interval time value, in minutes.
Definition: dss_classic.hpp:1722
VectorT Qmult()
Array of doubles containing the Q multipliers.
Definition: dss_classic.hpp:1798
VectorT TimeArray()
Time array in hours correscponding to P and Q multipliers when the Interval=0.
Definition: dss_classic.hpp:1816
int32_t Npts()
Get/set Number of points in active Loadshape.
Definition: dss_classic.hpp:1737
void idx(int32_t value)
Get active LoadShape by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1683
void UseFloat64()
Converts the current LoadShape data to float64/double precision.
Definition: dss_classic.hpp:1873
Definition: dss_classic.hpp:9867
double RelWeight()
Relative Weighting factor for the active LOAD.
Definition: dss_classic.hpp:10159
string Yearly()
Name of yearly duration loadshape.
Definition: dss_classic.hpp:10300
int32_t First()
Sets the first Load active.
Definition: dss_classic.hpp:9896
double AllocationFactor()
Factor for allocating loads by connected xfkva.
Definition: dss_classic.hpp:9955
string Name()
Get the name of the current active Load.
Definition: dss_classic.hpp:9905
double Cfactor()
Factor relates average to peak kw.
Definition: dss_classic.hpp:10021
double kW()
Set kW for active Load.
Definition: dss_classic.hpp:10396
double pctSeriesRL()
Percent of Load that is modeled as series R-L for harmonics studies.
Definition: dss_classic.hpp:10471
double Rneut()
Neutral resistance for wye-connected loads.
Definition: dss_classic.hpp:10174
double Vminpu()
Minimum voltage to apply the load model.
Definition: dss_classic.hpp:10270
VectorT ZIPV()
Array of 7 doubles with values for ZIPV property of the load object.
Definition: dss_classic.hpp:10322
double PctMean()
Average percent of nominal load in Monte Carlo studies; only if no loadshape defined for this load.
Definition: dss_classic.hpp:10129
string CVRcurve()
Name of a loadshape with both Mult and Qmult, for CVR factors as a function of time.
Definition: dss_classic.hpp:9970
strings AllNames()
Array of strings with all Load names in the circuit.
Definition: dss_classic.hpp:9878
string Growth()
Name of the growthshape curve for yearly load growth factors.
Definition: dss_classic.hpp:10048
double Xneut()
Neutral reactance for wye-connected loads.
Definition: dss_classic.hpp:10285
string Sensor()
Name of the sensor monitoring this load.
Definition: dss_classic.hpp:10501
double CVRwatts()
Percent reduction in P for percent reduction in V.
Definition: dss_classic.hpp:10006
double Vminnorm()
Minimum voltage for energy exceeding normal (EEN) evaluations.
Definition: dss_classic.hpp:10255
int32_t NumCust()
Number of customers in this load, defaults to one.
Definition: dss_classic.hpp:10099
double kwh()
kwh billed for this period.
Definition: dss_classic.hpp:10441
int32_t idx()
Get active Load by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9937
double Vmaxpu()
Maximum per-unit voltage to use the load model.
Definition: dss_classic.hpp:10225
double CVRvars()
Percent reduction in Q for percent reduction in V.
Definition: dss_classic.hpp:9991
bool IsDelta()
Delta loads are connected line-to-line.
Definition: dss_classic.hpp:10069
int32_t Status()
Response to load multipliers: Fixed (growth only), Exempt (no LD curve), Variable (all).
Definition: dss_classic.hpp:10210
double Vminemerg()
Minimum voltage for unserved energy (UE) evaluation.
Definition: dss_classic.hpp:10240
double xfkVA()
Rated service transformer kVA for load allocation, using AllocationFactor.
Definition: dss_classic.hpp:10486
double kva()
Base load kva.
Definition: dss_classic.hpp:10411
void idx(int32_t value)
Get active Load by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:9946
int32_t Count()
Number of Load objects in active circuit.
Definition: dss_classic.hpp:9887
string daily()
Name of the loadshape for a daily load profile.
Definition: dss_classic.hpp:10339
int32_t Model()
The Load Model defines variation of P and Q with voltage.
Definition: dss_classic.hpp:10084
string Spectrum()
Name of harmonic current spectrrum shape.
Definition: dss_classic.hpp:10189
int32_t Next()
Sets the next Load active.
Definition: dss_classic.hpp:9928
double kwhdays()
Length of kwh billing period for average demand calculation.
Definition: dss_classic.hpp:10456
double PctStdDev()
Percent standard deviation for Monte Carlo load studies; if there is no loadshape assigned to this lo...
Definition: dss_classic.hpp:10144
double PF()
Get or set Power Factor for Active Load.
Definition: dss_classic.hpp:10114
string duty()
Name of the loadshape for a duty cycle simulation.
Definition: dss_classic.hpp:10360
double kV()
Set kV rating for active Load.
Definition: dss_classic.hpp:10381
double kvar()
Get/set kvar for active Load.
Definition: dss_classic.hpp:10426
int32_t Phases()
Number of phases.
Definition: dss_classic.hpp:10510
ILoads & Name(const char *value)
Sets the active Load by Name.
Definition: dss_classic.hpp:9914
Definition: dss_classic.hpp:2656
int32_t NumSections()
Number of feeder sections in this meter's zone.
Definition: dss_classic.hpp:2965
VectorT CalcCurrent()
Set the magnitude of the real part of the Calculated Current (normally determined by solution) for th...
Definition: dss_classic.hpp:2849
int32_t NumSectionBranches()
Number of branches (lines) in this section.
Definition: dss_classic.hpp:2947
int32_t CountEndElements()
Number of zone end elements in the active meter zone.
Definition: dss_classic.hpp:2875
int32_t SeqListSize()
Size of Sequence List.
Definition: dss_classic.hpp:3066
int32_t SectSeqIdx()
SequenceIndex of the branch at the head of this section.
Definition: dss_classic.hpp:3048
double SAIDI()
SAIDI for this meter's zone.
Definition: dss_classic.hpp:3021
int32_t CountBranches()
Number of branches in Active energymeter zone.
Definition: dss_classic.hpp:2866
int32_t NumSectionCustomers()
Number of Customers in the active section.
Definition: dss_classic.hpp:2956
string MeteredElement()
Set Name of metered element.
Definition: dss_classic.hpp:2911
int32_t First()
Sets the first Meter active.
Definition: dss_classic.hpp:2694
double SAIFI()
Returns SAIFI for this meter's Zone.
Definition: dss_classic.hpp:3030
int32_t Next()
Sets the next Meter active.
Definition: dss_classic.hpp:2726
int32_t idx()
Get active Meter by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:2735
VectorT RegisterValues()
Array of all the values contained in the Meter registers for the active Meter.
Definition: dss_classic.hpp:3011
VectorT AllocFactors()
Array of doubles: set the phase allocation factors for the active meter.
Definition: dss_classic.hpp:2822
double AvgRepairTime()
Average Repair time in this section of the meter zone.
Definition: dss_classic.hpp:2839
int32_t TotalCustomers()
Total Number of customers in this zone (downline from the EnergyMeter)
Definition: dss_classic.hpp:3099
int32_t OCPDeviceType()
Type of OCP device.
Definition: dss_classic.hpp:2974
double SumBranchFltRates()
Sum of the branch fault rates in this section of the meter's zone.
Definition: dss_classic.hpp:3090
int32_t MeteredTerminal()
set Number of Metered Terminal
Definition: dss_classic.hpp:2932
int32_t SequenceIndex()
Get/set Index into Meter's SequenceList that contains branch pointers in lexical order.
Definition: dss_classic.hpp:3075
strings AllNames()
Array of strings with all Meter names in the circuit.
Definition: dss_classic.hpp:2676
double CustInterrupts()
Total customer interruptions for this Meter zone based on reliability calcs.
Definition: dss_classic.hpp:2884
string Name()
Get the name of the current active Meter.
Definition: dss_classic.hpp:2703
strings AllEndElements()
Array of names of all zone end elements.
Definition: dss_classic.hpp:2812
strings AllBranchesInZone()
Wide string list of all branches in zone of the active energymeter object.
Definition: dss_classic.hpp:2803
bool DIFilesAreOpen()
Global Flag in the DSS to indicate if Demand Interval (DI) files have been properly opened.
Definition: dss_classic.hpp:2893
double FaultRateXRepairHrs()
Sum of Fault Rate time Repair Hrs in this section of the meter zone.
Definition: dss_classic.hpp:2902
void idx(int32_t value)
Get active Meter by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:2744
double SAIFIKW()
SAIFI based on kW rather than number of customers.
Definition: dss_classic.hpp:3039
VectorT Peakcurrent()
Array of doubles to set values of Peak Current property.
Definition: dss_classic.hpp:2984
strings ZonePCE()
Returns the list of all PCE within the area covered by the energy meter.
Definition: dss_classic.hpp:2667
IMeters & Name(const char *value)
Sets the active Meter by Name.
Definition: dss_classic.hpp:2712
int32_t SectTotalCust()
Total Customers downline from this section.
Definition: dss_classic.hpp:3057
VectorT Totals()
Totals of all registers of all meters.
Definition: dss_classic.hpp:3109
int32_t Count()
Number of Meter objects in active circuit.
Definition: dss_classic.hpp:2685
strings RegisterNames()
Array of strings containing the names of the registers.
Definition: dss_classic.hpp:3001
Definition: dss_classic.hpp:1881
int32_t Mode()
Set Monitor mode (bitmask integer - see DSS Help)
Definition: dss_classic.hpp:2086
string Name()
Get the name of the current active Monitor.
Definition: dss_classic.hpp:1932
int32_t First()
Sets the first Monitor active.
Definition: dss_classic.hpp:1923
void idx(int32_t value)
Get active Monitor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1973
VectorT dblFreq()
Array of doubles containing frequency values for harmonics mode solutions; Empty for time mode soluti...
Definition: dss_classic.hpp:2144
int32_t FileVersion()
Monitor File Version (integer)
Definition: dss_classic.hpp:2068
int32_t NumChannels()
Number of Channels in the active Monitor.
Definition: dss_classic.hpp:2101
int32_t Count()
Number of Monitor objects in active circuit.
Definition: dss_classic.hpp:1914
int32_t idx()
Get active Monitor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:1964
int32_t RecordSize()
Size of each record in ByteStream (Integer).
Definition: dss_classic.hpp:2110
string FileName()
Name of CSV file associated with active Monitor.
Definition: dss_classic.hpp:2059
string Element()
Full object name of element being monitored.
Definition: dss_classic.hpp:2038
VectorT dblHour()
Array of doubles containing time value in hours for time-sampled monitor values; Empty if frequency-s...
Definition: dss_classic.hpp:2155
IMonitors & Name(const char *value)
Sets the active Monitor by Name.
Definition: dss_classic.hpp:1941
int32_t SampleCount()
Number of Samples in Monitor at Present.
Definition: dss_classic.hpp:2119
strings Header()
Header string; Array of strings containing Channel names.
Definition: dss_classic.hpp:2077
int32_t Next()
Sets the next Monitor active.
Definition: dss_classic.hpp:1955
int32_t Terminal()
Terminal number of element being monitored.
Definition: dss_classic.hpp:2128
strings AllNames()
Array of strings with all Monitor names in the circuit.
Definition: dss_classic.hpp:1905
VectorT ByteStream()
Byte Array containing monitor stream values.
Definition: dss_classic.hpp:2028
VectorT Channel(int32_t Index)
Array of float64 for the specified channel (usage: MyArray = DSSMonitor.Channel(i)).
Definition: dss_classic.hpp:1895
Definition: dss_classic.hpp:3119
VectorT AllSeqCurrents()
Double array of the symmetrical component currents into each 3-phase terminal, for each PD element.
Definition: dss_classic.hpp:3425
VectorT AllPowers()
Complex array of powers into each conductor of each terminal, for each PD element.
Definition: dss_classic.hpp:3438
VectorT AllNumTerminals()
Integer array listing the number of terminals of all PD elements.
Definition: dss_classic.hpp:3490
int32_t Next()
Advance to the next PD element in the circuit.
Definition: dss_classic.hpp:3227
VectorT AllCurrents()
Complex array of currents for all conductors, all terminals, for each PD element.
Definition: dss_classic.hpp:3386
double Lambda()
Failure rate for this branch.
Definition: dss_classic.hpp:3195
double TotalMiles()
Total miles of line from this element to the end of the zone.
Definition: dss_classic.hpp:3279
string Name()
Get/Set name of active PD Element.
Definition: dss_classic.hpp:3205
VectorT AllPctEmerg(bool AllNodes=false)
Array of doubles with the maximum current across the conductors as a percentage of the Emergency Ampe...
Definition: dss_classic.hpp:3373
VectorT AllNumPhases()
Integer array listing the number of phases of all PD elements.
Definition: dss_classic.hpp:3464
VectorT AllSeqPowers()
Double array of sequence powers into each 3-phase teminal, for each PD element.
Definition: dss_classic.hpp:3451
int32_t Count()
Number of PD elements (including disabled elements)
Definition: dss_classic.hpp:3139
VectorT AllMaxCurrents(bool AllNodes=false)
Array of doubles with the maximum current across the conductors, for each PD element.
Definition: dss_classic.hpp:3333
int32_t SectionID()
Integer ID of the feeder section that this PDElement branch is part of.
Definition: dss_classic.hpp:3270
strings AllNames()
Array of strings consisting of all PD element names.
Definition: dss_classic.hpp:3314
VectorT AllCurrentsMagAng()
Complex array (magnitude and angle format) of currents for all conductors, all terminals,...
Definition: dss_classic.hpp:3399
double pctPermanent()
Get/Set percent of faults that are permanent (require repair).
Definition: dss_classic.hpp:3297
VectorT AllNumConductors()
Integer array listing the number of conductors of all PD elements.
Definition: dss_classic.hpp:3477
double FaultRate()
Get/Set Number of failures per year.
Definition: dss_classic.hpp:3149
int32_t FromTerminal()
Number of the terminal of active PD element that is on the "from" side.
Definition: dss_classic.hpp:3175
VectorT AllCplxSeqCurrents()
Complex double array of Sequence Currents for all conductors of all terminals, for each PD elements.
Definition: dss_classic.hpp:3412
VectorT AllPctNorm(bool AllNodes=false)
Array of doubles with the maximum current across the conductors as a percentage of the Normal Ampere ...
Definition: dss_classic.hpp:3353
int32_t Numcustomers()
Number of customers, this branch.
Definition: dss_classic.hpp:3236
double RepairTime()
Average repair time for this element in hours.
Definition: dss_classic.hpp:3255
bool IsShunt()
Boolean indicating of PD element should be treated as a shunt element rather than a series element.
Definition: dss_classic.hpp:3186
int32_t First()
Set the first enabled PD element to be the active element.
Definition: dss_classic.hpp:3165
int32_t ParentPDElement()
Sets the parent PD element to be the active circuit element.
Definition: dss_classic.hpp:3246
double AccumulatedL()
accummulated failure rate for this branch on downline
Definition: dss_classic.hpp:3130
int32_t Totalcustomers()
Total number of customers from this branch to the end of the zone.
Definition: dss_classic.hpp:3288
Definition: dss_classic.hpp:3499
double kW()
get kW output
Definition: dss_classic.hpp:3652
strings AllNames()
Array of strings with all PVSystem names in the circuit.
Definition: dss_classic.hpp:3510
string duty()
Name of the load shape to use for duty cycle dispatch simulations such as for solar ramp rate studies...
Definition: dss_classic.hpp:3699
double Pmpp()
Gets/sets the rated max power of the PV array for 1.0 kW/sq-m irradiance and a user-selected array te...
Definition: dss_classic.hpp:3831
string yearly()
Dispatch shape to use for yearly simulations.
Definition: dss_classic.hpp:3723
int32_t First()
Sets the first PVSystem active.
Definition: dss_classic.hpp:3528
string Tduty()
Temperature shape to use for duty cycle dispatch simulations such as for solar ramp rate studies.
Definition: dss_classic.hpp:3774
int32_t Count()
Number of PVSystem objects in active circuit.
Definition: dss_classic.hpp:3519
string Sensor()
Name of the sensor monitoring this element.
Definition: dss_classic.hpp:3846
IPVSystems & Name(const char *value)
Sets the active PVSystem by Name.
Definition: dss_classic.hpp:3546
strings RegisterNames()
Array of PVSYSTEM energy meter register names.
Definition: dss_classic.hpp:3617
VectorT RegisterValues()
Array of doubles containing values in PVSystem registers.
Definition: dss_classic.hpp:3627
string Tyearly()
Temperature shape to use for yearly simulations.
Definition: dss_classic.hpp:3799
double IrradianceNow()
Returns the current irradiance value for the active PVSystem.
Definition: dss_classic.hpp:3821
int32_t idx()
Get active PVSystem by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:3569
string Name()
Get the name of the current active PVSystem.
Definition: dss_classic.hpp:3537
void idx(int32_t value)
Get active PVSystem by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:3578
int32_t Next()
Sets the next PVSystem active.
Definition: dss_classic.hpp:3560
double Irradiance()
Get/set the present value of the Irradiance property in kW/m²
Definition: dss_classic.hpp:3587
string daily()
Name of the loadshape for a daily PVSystem profile.
Definition: dss_classic.hpp:3676
string Tdaily()
Temperature shape to use for daily simulations.
Definition: dss_classic.hpp:3747
double kvar()
Get/set kvar output value.
Definition: dss_classic.hpp:3661
double PF()
Get/set the power factor for the active PVSystem.
Definition: dss_classic.hpp:3602
double kVArated()
Get/set Rated kVA of the PVSystem.
Definition: dss_classic.hpp:3637
Definition: dss_classic.hpp:3854
int32_t NumCPUs()
Delivers the number of CPUs on the current PC.
Definition: dss_classic.hpp:3959
VectorT ActorProgress()
Gets the progress of all existing actors in pct.
Definition: dss_classic.hpp:3922
int32_t ActiveActor()
Gets/sets the ID of the Active Actor.
Definition: dss_classic.hpp:3875
int32_t ActorCPU()
Gets/sets the CPU of the Active Actor.
Definition: dss_classic.hpp:3906
int32_t NumOfActors()
Gets the number of Actors created.
Definition: dss_classic.hpp:3977
int32_t ActiveParallel()
(read) Sets ON/OFF (1/0) Parallel features of the Engine (write) Delivers if the Parallel features of...
Definition: dss_classic.hpp:3891
int32_t NumCores()
Delivers the number of Cores of the local PC.
Definition: dss_classic.hpp:3968
VectorT ActorStatus()
Gets the status of each actor.
Definition: dss_classic.hpp:3933
int32_t ConcatenateReports()
(read) Reads the values of the ConcatenateReports option (1=enabled, 0=disabled) (write) Enable/Disab...
Definition: dss_classic.hpp:3944
Definition: dss_classic.hpp:2164
string WhiteSpace()
(read) Get the characters used for White space in the command string.
Definition: dss_classic.hpp:2346
VectorT Matrix(int32_t ExpectedOrder)
Use this property to parse a Matrix token in OpenDSS format.
Definition: dss_classic.hpp:2175
string CmdString()
String to be parsed.
Definition: dss_classic.hpp:2246
int32_t IntValue()
Return next parameter as a long integer.
Definition: dss_classic.hpp:2318
VectorT SymMatrix(int32_t ExpectedOrder)
Use this property to parse a matrix token specified in lower triangle form.
Definition: dss_classic.hpp:2185
string StrValue()
Return next parameter as a string.
Definition: dss_classic.hpp:2336
string EndQuote()
String containing characters, in order, that match the beginning quote characters in BeginQuote.
Definition: dss_classic.hpp:2297
double DblValue()
Return next parameter as a double.
Definition: dss_classic.hpp:2267
string Delimiters()
String defining hard delimiters used to separate token on the command string.
Definition: dss_classic.hpp:2276
string NextParam()
Get next token and return tag name (before = sign) if any.
Definition: dss_classic.hpp:2327
VectorT Vector(int32_t ExpectedSize)
Returns token as array of doubles.
Definition: dss_classic.hpp:2195
bool AutoIncrement()
Default is FALSE.
Definition: dss_classic.hpp:2210
string BeginQuote()
Get/Set String containing the the characters for Quoting in OpenDSS scripts.
Definition: dss_classic.hpp:2225
Definition: dss_classic.hpp:3985
bool Parallel()
Indicates whether Rmatrix and Xmatrix are to be considered in parallel.
Definition: dss_classic.hpp:4098
double X()
Reactance, each phase, ohms at base frequency.
Definition: dss_classic.hpp:4275
double R()
Resistance (in series with reactance), each phase, ohms.
Definition: dss_classic.hpp:4260
VectorT Z1()
Positive-sequence impedance, ohms, as a 2-element array representing a complex number.
Definition: dss_classic.hpp:4366
double kvar()
Total kvar, all phases.
Definition: dss_classic.hpp:4143
VectorT Z0()
Zero-sequence impedance, ohms, as a 2-element array representing a complex number.
Definition: dss_classic.hpp:4410
VectorT Xmatrix()
Reactance matrix, ohms at base frequency.
Definition: dss_classic.hpp:4324
strings AllNames()
Array of strings with all Reactor names in the circuit.
Definition: dss_classic.hpp:3996
string RCurve()
Name of XYCurve object, previously defined, describing per-unit variation of phase resistance,...
Definition: dss_classic.hpp:4239
double LmH()
Inductance, mH.
Definition: dss_classic.hpp:4113
int32_t Next()
Sets the next Reactor active.
Definition: dss_classic.hpp:4046
int32_t Phases()
Number of phases.
Definition: dss_classic.hpp:4158
int32_t Count()
Number of Reactor objects in active circuit.
Definition: dss_classic.hpp:4005
VectorT Rmatrix()
Resistance matrix, ohms at base frequency.
Definition: dss_classic.hpp:4306
VectorT Z()
Alternative way of defining R and X properties.
Definition: dss_classic.hpp:4342
bool IsDelta()
Delta connection or wye?
Definition: dss_classic.hpp:4083
string Name()
Get the name of the current active Reactor.
Definition: dss_classic.hpp:4023
int32_t SpecType()
How the reactor data was provided: 1=kvar, 2=R+jX, 3=R and X matrices, 4=sym components.
Definition: dss_classic.hpp:4074
int32_t idx()
Get active Reactor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4055
string LCurve()
Name of XYCurve object, previously defined, describing per-unit variation of phase inductance,...
Definition: dss_classic.hpp:4218
string Bus2()
Name of 2nd bus.
Definition: dss_classic.hpp:4197
VectorT Z2()
Negative-sequence impedance, ohms, as a 2-element array representing a complex number.
Definition: dss_classic.hpp:4388
IReactors & Name(const char *value)
Sets the active Reactor by Name.
Definition: dss_classic.hpp:4032
void idx(int32_t value)
Get active Reactor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4064
double Rp()
Resistance in parallel with R and X (the entire branch).
Definition: dss_classic.hpp:4290
int32_t First()
Sets the first Reactor active.
Definition: dss_classic.hpp:4014
double kV()
For 2, 3-phase, kV phase-phase.
Definition: dss_classic.hpp:4128
string Bus1()
Name of first bus.
Definition: dss_classic.hpp:4175
Definition: dss_classic.hpp:4426
int32_t Shots()
Number of shots to lockout (fast + delayed)
Definition: dss_classic.hpp:4646
int32_t First()
Sets the first Recloser active.
Definition: dss_classic.hpp:4455
IReclosers & Name(const char *value)
Sets the active Recloser by Name.
Definition: dss_classic.hpp:4473
int32_t SwitchedTerm()
Terminal number of the controlled device being switched by the Recloser.
Definition: dss_classic.hpp:4682
double GroundTrip()
Ground (3I0) trip multiplier or actual amps.
Definition: dss_classic.hpp:4539
double PhaseInst()
Phase instantaneous curve multipler or actual amps.
Definition: dss_classic.hpp:4605
int32_t NumFast()
Number of fast shots.
Definition: dss_classic.hpp:4590
int32_t Count()
Number of Recloser objects in active circuit.
Definition: dss_classic.hpp:4446
strings AllNames()
Array of strings with all Recloser names in the circuit.
Definition: dss_classic.hpp:4437
string SwitchedObj()
Full name of the circuit element that is being switched by the Recloser.
Definition: dss_classic.hpp:4661
int32_t NormalState()
Get/set normal state (ActionCodes.Open=1, ActionCodes.Close=2) of the recloser.
Definition: dss_classic.hpp:4724
int32_t MonitoredTerm()
Terminal number of Monitored object for the Recloser.
Definition: dss_classic.hpp:4575
double PhaseTrip()
Phase trip curve multiplier or actual amps.
Definition: dss_classic.hpp:4620
int32_t Next()
Sets the next Recloser active.
Definition: dss_classic.hpp:4487
int32_t State()
Get/Set present state of recloser.
Definition: dss_classic.hpp:4709
double GroundInst()
Ground (3I0) instantaneous trip setting - curve multipler or actual amps.
Definition: dss_classic.hpp:4524
VectorT RecloseIntervals()
Array of Doubles: reclose intervals, s, between shots.
Definition: dss_classic.hpp:4636
void idx(int32_t value)
Get active Recloser by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4505
string Name()
Get the name of the current active Recloser.
Definition: dss_classic.hpp:4464
int32_t idx()
Get active Recloser by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4496
string MonitoredObj()
Full name of object this Recloser to be monitored.
Definition: dss_classic.hpp:4554
void Reset()
Reset recloser to normal state.
Definition: dss_classic.hpp:4698
Definition: dss_classic.hpp:2366
void DoDefault()
Do Default Reduction algorithm.
Definition: dss_classic.hpp:2487
void SaveCircuit(const char *CktName)
Save present (reduced) circuit Filename is listed in the Text Result interface.
Definition: dss_classic.hpp:2470
double Zmag()
Zmag (ohms) for Reduce Option for Z of short lines.
Definition: dss_classic.hpp:2377
string StartPDElement()
Start element for Remove Branch function.
Definition: dss_classic.hpp:2428
string EditString()
Edit String for RemoveBranches functions.
Definition: dss_classic.hpp:2407
bool KeepLoad()
Keep load flag (T/F) for Reduction options that remove branches.
Definition: dss_classic.hpp:2392
string EnergyMeter()
Name of Energymeter to use for reduction.
Definition: dss_classic.hpp:2449
void DoDangling()
Reduce Dangling Algorithm; branches with nothing connected.
Definition: dss_classic.hpp:2503
void DoShortLines()
Do ShortLines algorithm: Set Zmag first if you don't want the default.
Definition: dss_classic.hpp:2495
void SaveCircuit(const string &CktName)
Save present (reduced) circuit Filename is listed in the Text Result interface.
Definition: dss_classic.hpp:2479
Definition: dss_classic.hpp:4738
IRegControls & Name(const char *value)
Sets the active RegControl by Name.
Definition: dss_classic.hpp:4785
double Delay()
Time delay [s] after arming before the first tap change.
Definition: dss_classic.hpp:4846
int32_t Winding()
Winding number for PT and CT connections.
Definition: dss_classic.hpp:5143
int32_t TapNumber()
Integer number of the tap that the controlled transformer winding is currentliy on.
Definition: dss_classic.hpp:5077
double ReverseR()
Reverse LDC R setting in Volts.
Definition: dss_classic.hpp:5017
double TapDelay()
Time delay [s] for subsequent tap changes in a set.
Definition: dss_classic.hpp:5062
double ReverseX()
Reverse LDC X setting in volts.
Definition: dss_classic.hpp:5047
string MonitoredBus()
Name of a remote regulated bus, in lieu of LDC settings.
Definition: dss_classic.hpp:4966
double PTratio()
PT ratio for voltage control settings.
Definition: dss_classic.hpp:4987
bool IsInverseTime()
Time delay is inversely adjsuted, proportinal to the amount of voltage outside the regulating band.
Definition: dss_classic.hpp:4921
int32_t MaxTapChange()
Maximum tap change per iteration in STATIC solution mode.
Definition: dss_classic.hpp:4951
string Transformer()
Name of the transformer this regulator controls.
Definition: dss_classic.hpp:5107
double ReverseBand()
Bandwidth in reverse direction, centered on reverse Vreg.
Definition: dss_classic.hpp:5002
int32_t TapWinding()
Tapped winding number.
Definition: dss_classic.hpp:5092
int32_t Count()
Number of RegControl objects in active circuit.
Definition: dss_classic.hpp:4758
string Name()
Get the name of the current active RegControl.
Definition: dss_classic.hpp:4776
int32_t idx()
Get active RegControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4808
double CTPrimary()
CT primary ampere rating (secondary is 0.2 amperes)
Definition: dss_classic.hpp:4831
double ReverseVreg()
Target voltage in the revese direction, on PT secondary base.
Definition: dss_classic.hpp:5032
int32_t Next()
Sets the next RegControl active.
Definition: dss_classic.hpp:4799
double ForwardX()
LDC X setting in Volts.
Definition: dss_classic.hpp:4906
bool IsReversible()
Regulator can use different settings in the reverse direction.
Definition: dss_classic.hpp:4936
double ForwardBand()
Regulation bandwidth in forward direciton, centered on Vreg.
Definition: dss_classic.hpp:4861
int32_t First()
Sets the first RegControl active.
Definition: dss_classic.hpp:4767
void idx(int32_t value)
Get active RegControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:4817
double VoltageLimit()
First house voltage limit on PT secondary base.
Definition: dss_classic.hpp:5128
double ForwardVreg()
Target voltage in the forward direction, on PT secondary base.
Definition: dss_classic.hpp:4891
strings AllNames()
Array of strings with all RegControl names in the circuit.
Definition: dss_classic.hpp:4749
double ForwardR()
LDC R setting in Volts.
Definition: dss_classic.hpp:4876
Definition: dss_classic.hpp:5157
int32_t NormalState()
Normal state of relay.
Definition: dss_classic.hpp:5360
string Name()
Get the name of the current active Relay.
Definition: dss_classic.hpp:5195
int32_t Next()
Sets the next Relay active.
Definition: dss_classic.hpp:5218
strings AllNames()
Array of strings with all Relay names in the circuit.
Definition: dss_classic.hpp:5168
void Reset()
Reset relay to normal state.
Definition: dss_classic.hpp:5334
void idx(int32_t value)
Get active Relay by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5236
string SwitchedObj()
Full name of element that will be switched when relay trips.
Definition: dss_classic.hpp:5281
string MonitoredObj()
Full name of object this Relay is monitoring.
Definition: dss_classic.hpp:5245
int32_t State()
Get/Set present state of relay.
Definition: dss_classic.hpp:5345
int32_t First()
Sets the first Relay active.
Definition: dss_classic.hpp:5186
void Close()
Close the switched object controlled by the relay.
Definition: dss_classic.hpp:5324
int32_t idx()
Get active Relay by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5227
int32_t Count()
Number of Relay objects in active circuit.
Definition: dss_classic.hpp:5177
int32_t SwitchedTerm()
Terminal number of the switched object that will be opened when the relay trips.
Definition: dss_classic.hpp:5302
IRelays & Name(const char *value)
Sets the active Relay by Name.
Definition: dss_classic.hpp:5204
int32_t MonitoredTerm()
Number of terminal of monitored element that this Relay is monitoring.
Definition: dss_classic.hpp:5266
void Open()
Open relay's controlled element and lock out the relay.
Definition: dss_classic.hpp:5316
Definition: dss_classic.hpp:5374
string Name()
Get the name of the current active Sensor.
Definition: dss_classic.hpp:5412
string MeteredElement()
Full Name of the measured element.
Definition: dss_classic.hpp:5505
VectorT kVS()
Array of doubles for the LL or LN (depending on Delta connection) voltage measurements.
Definition: dss_classic.hpp:5605
bool IsDelta()
True if measured voltages are line-line.
Definition: dss_classic.hpp:5490
VectorT kWS()
Array of doubles for P measurements.
Definition: dss_classic.hpp:5638
void idx(int32_t value)
Get active Sensor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5453
int32_t Next()
Sets the next Sensor active.
Definition: dss_classic.hpp:5435
VectorT AllocationFactor()
Array of doubles for the allocation factors for each phase.
Definition: dss_classic.hpp:5656
int32_t idx()
Get active Sensor by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5444
double PctError()
Assumed percent error in the Sensor measurement.
Definition: dss_classic.hpp:5541
int32_t Count()
Number of Sensor objects in active circuit.
Definition: dss_classic.hpp:5394
int32_t MeteredTerminal()
Number of the measured terminal in the measured element.
Definition: dss_classic.hpp:5526
VectorT Currents()
Array of doubles for the line current measurements; don't use with kWS and kVARS.
Definition: dss_classic.hpp:5473
int32_t First()
Sets the first Sensor active.
Definition: dss_classic.hpp:5403
strings AllNames()
Array of strings with all Sensor names in the circuit.
Definition: dss_classic.hpp:5385
ISensors & Name(const char *value)
Sets the active Sensor by Name.
Definition: dss_classic.hpp:5421
double kVbase()
Voltage base for the sensor measurements.
Definition: dss_classic.hpp:5622
VectorT kVARS()
Array of doubles for Q measurements.
Definition: dss_classic.hpp:5587
bool ReverseDelta()
True if voltage measurements are 1-3, 3-2, 2-1.
Definition: dss_classic.hpp:5556
double Weight()
Weighting factor for this Sensor measurement with respect to other Sensors.
Definition: dss_classic.hpp:5571
Definition: dss_classic.hpp:10524
bool LoadsTerminalCheck()
Controls whether the terminals are checked when updating the currents in Load component.
Definition: dss_classic.hpp:10824
string PriceCurve()
Name of LoadShape object that serves as the source of price signal data for yearly simulations,...
Definition: dss_classic.hpp:10694
bool AllowDuplicates()
{True | False*} Designates whether to allow duplicate names of objects
Definition: dss_classic.hpp:10535
double PriceSignal()
Price Signal for the Circuit.
Definition: dss_classic.hpp:10715
ISettings & AllocationFactors(double value)
(write-only) Sets all load allocation factors for all loads defined by XFKVA property to this value.
Definition: dss_classic.hpp:10811
double EmergVminpu()
Per Unit minimum voltage for Emergency conditions.
Definition: dss_classic.hpp:10616
VectorT VoltageBases()
Array of doubles defining the legal voltage bases in kV L-L.
Definition: dss_classic.hpp:10779
bool ZoneLock()
{True | False*} Locks Zones on energy meters to prevent rebuilding if a circuit change occurs.
Definition: dss_classic.hpp:10796
string AutoBusList()
List of Buses or (File=xxxx) syntax for the AutoAdd solution mode.
Definition: dss_classic.hpp:10550
double EmergVmaxpu()
Per Unit maximum voltage for Emergency conditions.
Definition: dss_classic.hpp:10601
VectorT UEregs()
Array of Integers defining energy meter registers to use for computing UE.
Definition: dss_classic.hpp:10746
bool Trapezoidal()
{True | False *} Gets value of trapezoidal integration flag in energy meters.
Definition: dss_classic.hpp:10730
double NormVminpu()
Per Unit minimum voltage for Normal conditions.
Definition: dss_classic.hpp:10679
double UEweight()
Weighting factor applied to UE register values.
Definition: dss_classic.hpp:10763
double NormVmaxpu()
Per Unit maximum voltage for Normal conditions.
Definition: dss_classic.hpp:10664
VectorT LossRegs()
Integer array defining which energy meter registers to use for computing losses.
Definition: dss_classic.hpp:10632
double LossWeight()
Weighting factor applied to Loss register values.
Definition: dss_classic.hpp:10649
int32_t CktModel()
{dssMultiphase (0) * | dssPositiveSeq (1) } Indicate if the circuit model is positive sequence.
Definition: dss_classic.hpp:10571
int32_t IterateDisabled()
Controls whether First/Next iteration includes or skips disabled circuit elements.
Definition: dss_classic.hpp:10846
bool ControlTrace()
{True | False*} Denotes whether to trace the control actions to a file.
Definition: dss_classic.hpp:10586
Definition: dss_classic.hpp:11735
int32_t Iterations()
Number of iterations taken for last solution.
Definition: dss_classic.hpp:12067
int32_t MaxControlIterations()
Maximum allowable control iterations.
Definition: dss_classic.hpp:12127
strings EventLog()
Array of strings containing the Event Log.
Definition: dss_classic.hpp:11968
string LDCurve()
Load-Duration Curve name for LD modes.
Definition: dss_classic.hpp:12076
int32_t MinIterations()
Minimum number of iterations required for a power flow solution.
Definition: dss_classic.hpp:12157
double IntervalHrs()
Get/Set the Solution.IntervalHrs variable used for devices that integrate / custom solution algorithm...
Definition: dss_classic.hpp:12052
ISolution & StepsizeHr(double value)
(write-only) Set Stepsize in Hr
Definition: dss_classic.hpp:12376
double GenMult()
Default Multiplier applied to generators (like LoadMult)
Definition: dss_classic.hpp:11992
double LoadMult()
Default load multiplier applied to all non-fixed loads.
Definition: dss_classic.hpp:12112
double StepSize()
Time step size in sec.
Definition: dss_classic.hpp:12259
bool Converged()
Flag to indicate whether the circuit solution converged.
Definition: dss_classic.hpp:11911
string DefaultYearly()
Default Yearly load shape (defaults to "Default")
Definition: dss_classic.hpp:11947
int32_t MostIterationsDone()
Max number of iterations required to converge at any control iteration of the most recent solution.
Definition: dss_classic.hpp:12196
int32_t Algorithm()
Base Solution algorithm: {dssNormalSolve | dssNewtonSolve}.
Definition: dss_classic.hpp:11836
double Capkvar()
Capacitor kvar for adding capacitors in AutoAdd mode.
Definition: dss_classic.hpp:11851
double Tolerance()
Solution convergence tolerance.
Definition: dss_classic.hpp:12292
double GenPF()
PF for generators in AutoAdd mode.
Definition: dss_classic.hpp:12007
double Seconds()
Seconds from top of the hour.
Definition: dss_classic.hpp:12244
double pctGrowth()
Percent default annual load growth rate.
Definition: dss_classic.hpp:12361
int32_t ControlMode()
{dssStatic* | dssEvent | dssTime} Modes for control devices
Definition: dss_classic.hpp:11896
bool ControlActionsDone()
Flag indicating the control actions are done.
Definition: dss_classic.hpp:11866
int32_t Hour()
Set Hour for time series solutions.
Definition: dss_classic.hpp:12037
int32_t ControlIterations()
Value of the control iteration counter.
Definition: dss_classic.hpp:11881
int32_t AddType()
Type of device to add in AutoAdd Mode: {dssGen (Default) | dssCap}.
Definition: dss_classic.hpp:11821
int32_t Year()
Set year for planning studies.
Definition: dss_classic.hpp:12331
double Frequency()
Set the Frequency for next solution.
Definition: dss_classic.hpp:11977
int32_t Random()
Randomization mode for random variables "Gaussian" or "Uniform".
Definition: dss_classic.hpp:12229
int32_t LoadModel()
Load Model: {dssPowerFlow (default) | dssAdmittance}.
Definition: dss_classic.hpp:12097
int32_t Number()
Number of solutions to perform for Monte Carlo and time series simulations.
Definition: dss_classic.hpp:12205
double dblHour()
Hour as a double, including fractional part.
Definition: dss_classic.hpp:12346
int32_t MaxIterations()
Max allowable iterations.
Definition: dss_classic.hpp:12142
double GenkW()
Generator kW for AutoAdd mode.
Definition: dss_classic.hpp:12022
int32_t Totaliterations()
Total iterations including control iterations for most recent solution.
Definition: dss_classic.hpp:12322
string ModeID()
ID (text) of the present solution mode.
Definition: dss_classic.hpp:12187
string DefaultDaily()
Default daily load shape (defaults to "Default")
Definition: dss_classic.hpp:11926
int32_t Mode()
Set present solution mode (by a text code - see DSS Help)
Definition: dss_classic.hpp:12172
double Total_Time()
Gets/sets the accumulated time of the simulation.
Definition: dss_classic.hpp:12307
double Time_of_Step()
Get the solution process time + sample time for time step.
Definition: dss_classic.hpp:12283
double Process_Time()
Gets the time required to perform the latest solution (Read only)
Definition: dss_classic.hpp:12220
bool SystemYChanged()
Flag that indicates if elements of the System Y have been changed by recent activity.
Definition: dss_classic.hpp:12274
ISolution & StepsizeMin(double value)
(write-only) Set Stepsize in minutes
Definition: dss_classic.hpp:12386
Definition: dss_classic.hpp:11596
int32_t Count()
Number of Storage objects in active circuit.
Definition: dss_classic.hpp:11616
strings AllNames()
Array of strings with all Storage names in the circuit.
Definition: dss_classic.hpp:11607
VectorT RegisterValues()
Array of values in Storage registers.
Definition: dss_classic.hpp:11726
int32_t First()
Sets the first Storage active.
Definition: dss_classic.hpp:11625
int32_t Next()
Sets the next Storage active.
Definition: dss_classic.hpp:11657
string Name()
Get the name of the current active Storage.
Definition: dss_classic.hpp:11634
double puSOC()
Per unit state of charge.
Definition: dss_classic.hpp:11684
int32_t State()
Get/set state: 0=Idling; 1=Discharging; -1=Charging;.
Definition: dss_classic.hpp:11701
strings RegisterNames()
Array of Names of all Storage energy meter registers.
Definition: dss_classic.hpp:11716
void idx(int32_t value)
Get active Storage by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:11675
IStorages & Name(const char *value)
Sets the active Storage by Name.
Definition: dss_classic.hpp:11643
int32_t idx()
Get active Storage by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:11666
Definition: dss_classic.hpp:5665
ISwtControls & Name(const char *value)
Sets the active SwtControl by Name.
Definition: dss_classic.hpp:5712
int32_t First()
Sets the first SwtControl active.
Definition: dss_classic.hpp:5694
int32_t State()
Set it to force the switch to a specified state, otherwise read its present state.
Definition: dss_classic.hpp:5818
bool IsLocked()
The lock prevents both manual and automatic switch operation.
Definition: dss_classic.hpp:5788
int32_t SwitchedTerm()
Terminal number where the switch is located on the SwitchedObj.
Definition: dss_classic.hpp:5854
string SwitchedObj()
Full name of the switched element.
Definition: dss_classic.hpp:5833
int32_t Action()
Open or Close the switch.
Definition: dss_classic.hpp:5758
strings AllNames()
Array of strings with all SwtControl names in the circuit.
Definition: dss_classic.hpp:5676
void idx(int32_t value)
Get active SwtControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5744
int32_t Next()
Sets the next SwtControl active.
Definition: dss_classic.hpp:5726
int32_t idx()
Get active SwtControl by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5735
double Delay()
Time delay [s] betwen arming and opening or closing the switch.
Definition: dss_classic.hpp:5773
string Name()
Get the name of the current active SwtControl.
Definition: dss_classic.hpp:5703
int32_t Count()
Number of SwtControl objects in active circuit.
Definition: dss_classic.hpp:5685
int32_t NormalState()
Get/set Normal state of switch (see actioncodes) dssActionOpen or dssActionClose.
Definition: dss_classic.hpp:5803
Definition: dss_classic.hpp:5868
double NormAmps()
Normal Ampere rating.
Definition: dss_classic.hpp:5971
strings AllNames()
Array of strings with all TSData names in the circuit.
Definition: dss_classic.hpp:5879
void idx(int32_t value)
Get active TSData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5947
int32_t Count()
Number of TSData objects in active circuit.
Definition: dss_classic.hpp:5888
int32_t idx()
Get active TSData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:5938
int32_t First()
Sets the first TSData active.
Definition: dss_classic.hpp:5897
double EmergAmps()
Emergency ampere rating.
Definition: dss_classic.hpp:5956
int32_t Next()
Sets the next TSData active.
Definition: dss_classic.hpp:5929
string Name()
Get the name of the current active TSData.
Definition: dss_classic.hpp:5906
ITSData & Name(const char *value)
Sets the active TSData by Name.
Definition: dss_classic.hpp:5915
Definition: dss_classic.hpp:6165
string Result()
Result string for the last command.
Definition: dss_classic.hpp:6217
void Commands(const string &value)
Runs a large string as command lines directly in the DSS engine.
Definition: dss_classic.hpp:6177
void Commands(const strings &value)
Runs a list of strings as commands directly in the DSS engine.
Definition: dss_classic.hpp:6187
string Command()
Input command string for the DSS.
Definition: dss_classic.hpp:6196
Definition: dss_classic.hpp:6225
int32_t NumIsolatedBranches()
Number of isolated branches (PD elements and capacitors).
Definition: dss_classic.hpp:6386
string BranchName()
Name of the active branch.
Definition: dss_classic.hpp:6290
int32_t BackwardBranch()
MOve back toward the source, return index of new active branch, or 0 if no more.
Definition: dss_classic.hpp:6281
int32_t ForwardBranch()
Move forward in the tree, return index of new active branch or 0 if no more.
Definition: dss_classic.hpp:6350
int32_t ActiveBranch()
Returns index of the active branch.
Definition: dss_classic.hpp:6236
int32_t Next()
Sets the next branch active, returns 0 if no more.
Definition: dss_classic.hpp:6368
int32_t NumLoops()
Number of loops.
Definition: dss_classic.hpp:6404
int32_t LoopedBranch()
Move to looped branch, return index or 0 if none.
Definition: dss_classic.hpp:6359
int32_t NextLoad()
Next load at the active branch, return index or 0 if no more.
Definition: dss_classic.hpp:6377
int32_t FirstLoad()
First load at the active branch, return index or 0 if none.
Definition: dss_classic.hpp:6341
int32_t NumIsolatedLoads()
Number of isolated loads.
Definition: dss_classic.hpp:6395
int32_t First()
Sets the first branch active, returns 0 if none.
Definition: dss_classic.hpp:6332
strings AllIsolatedBranches()
Array of all isolated branch names.
Definition: dss_classic.hpp:6254
strings AllLoopedPairs()
Array of all looped element names, by pairs.
Definition: dss_classic.hpp:6272
strings AllIsolatedLoads()
Array of all isolated load names.
Definition: dss_classic.hpp:6263
string BusName()
Set the active branch to one containing this bus, return index or 0 if not found.
Definition: dss_classic.hpp:6311
int32_t ActiveLevel()
Topological depth of the active branch.
Definition: dss_classic.hpp:6245
int32_t ParallelBranch()
Move to directly parallel branch, return index or 0 if none.
Definition: dss_classic.hpp:6413
Definition: dss_classic.hpp:6421
int32_t NumTaps()
Active Winding number of tap steps betwein MinTap and MaxTap.
Definition: dss_classic.hpp:6554
string XfmrCode()
Name of an XfrmCode that supplies electircal parameters for this Transformer.
Definition: dss_classic.hpp:6644
double Rneut()
Active Winding neutral resistance [ohms] for wye connections.
Definition: dss_classic.hpp:6599
bool IsDelta()
Active Winding delta or wye connection?
Definition: dss_classic.hpp:6509
ITransformers & Name(const char *value)
Sets the active Transformer by Name.
Definition: dss_classic.hpp:6468
double MinTap()
Active Winding minimum tap in per-unit.
Definition: dss_classic.hpp:6539
double Tap()
Active Winding tap in per-unit.
Definition: dss_classic.hpp:6614
VectorT WdgVoltages()
Complex array of voltages for active winding.
Definition: dss_classic.hpp:6756
VectorT WdgCurrents()
All Winding currents (ph1, wdg1, wdg2,... ph2, wdg1, wdg2 ...)
Definition: dss_classic.hpp:6767
double RdcOhms()
dc Resistance of active winding in ohms for GIC analysis
Definition: dss_classic.hpp:6801
double kV()
Active Winding kV rating.
Definition: dss_classic.hpp:6725
double Xlt()
Percent reactance between windings 2 and 3, on winding 1 kVA base.
Definition: dss_classic.hpp:6695
double Xht()
Percent reactance between windigns 1 and 3, on winding 1 kVA base.
Definition: dss_classic.hpp:6680
int32_t Next()
Sets the next Transformer active.
Definition: dss_classic.hpp:6482
int32_t CoreType()
Transformer Core Type: 0=shell;1 = 1-phase; 3= 3-leg; 5= 5-leg.
Definition: dss_classic.hpp:6786
VectorT LossesByType()
Complex array with the losses by type (total losses, load losses, no-load losses),...
Definition: dss_classic.hpp:6817
double kVA()
Active Winding kVA rating.
Definition: dss_classic.hpp:6740
string strWdgCurrents()
All winding currents in CSV string form like the WdgCurrents property.
Definition: dss_classic.hpp:6777
double MaxTap()
Active Winding maximum tap in per-unit.
Definition: dss_classic.hpp:6524
string Name()
Get the name of the current active Transformer.
Definition: dss_classic.hpp:6459
double Xneut()
Active Winding neutral reactance [ohms] for wye connections.
Definition: dss_classic.hpp:6710
double R()
Active Winding resistance in %.
Definition: dss_classic.hpp:6584
int32_t idx()
Get active Transformer by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:6491
VectorT AllLossesByType()
Complex array with the losses by type (total losses, load losses, no-load losses),...
Definition: dss_classic.hpp:6828
int32_t First()
Sets the first Transformer active.
Definition: dss_classic.hpp:6450
void idx(int32_t value)
Get active Transformer by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:6500
double Xhl()
Percent reactance between windings 1 and 2, on winding 1 kVA base.
Definition: dss_classic.hpp:6665
int32_t NumWindings()
Number of windings on this transformer.
Definition: dss_classic.hpp:6569
strings AllNames()
Array of strings with all Transformer names in the circuit.
Definition: dss_classic.hpp:6432
int32_t Count()
Number of Transformer objects in active circuit.
Definition: dss_classic.hpp:6441
int32_t Wdg()
Active Winding Number from 1..NumWindings.
Definition: dss_classic.hpp:6629
Definition: dss_classic.hpp:6837
strings AllNames()
Array of strings with all Vsource names in the circuit.
Definition: dss_classic.hpp:6848
void idx(int32_t value)
Get active Vsource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:6916
int32_t First()
Sets the first Vsource active.
Definition: dss_classic.hpp:6866
int32_t Phases()
Number of phases.
Definition: dss_classic.hpp:6970
int32_t Next()
Sets the next Vsource active.
Definition: dss_classic.hpp:6898
double Frequency()
Source frequency in Hz.
Definition: dss_classic.hpp:6955
int32_t Count()
Number of Vsource objects in active circuit.
Definition: dss_classic.hpp:6857
double AngleDeg()
Phase angle of first phase in degrees.
Definition: dss_classic.hpp:6925
double pu()
Per-unit value of source voltage.
Definition: dss_classic.hpp:6985
double BasekV()
Source voltage in kV.
Definition: dss_classic.hpp:6940
IVsources & Name(const char *value)
Sets the active Vsource by Name.
Definition: dss_classic.hpp:6884
int32_t idx()
Get active Vsource by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:6907
string Name()
Get the name of the current active Vsource.
Definition: dss_classic.hpp:6875
Definition: dss_classic.hpp:6999
string Name()
Get the name of the current active WireData.
Definition: dss_classic.hpp:7037
int32_t First()
Sets the first WireData active.
Definition: dss_classic.hpp:7028
double CapRadius()
Equivalent conductor radius for capacitance calcs.
Definition: dss_classic.hpp:7213
int32_t idx()
Get active WireData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:7069
int32_t Next()
Sets the next WireData active.
Definition: dss_classic.hpp:7060
strings AllNames()
Array of strings with all WireData names in the circuit.
Definition: dss_classic.hpp:7010
double NormAmps()
Normal Ampere rating.
Definition: dss_classic.hpp:7102
int32_t Count()
Number of WireData objects in active circuit.
Definition: dss_classic.hpp:7019
double EmergAmps()
Emergency ampere rating.
Definition: dss_classic.hpp:7087
void idx(int32_t value)
Get active WireData by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:7078
IWireData & Name(const char *value)
Sets the active WireData by Name.
Definition: dss_classic.hpp:7046
Definition: dss_classic.hpp:7227
double Yscale()
Factor to scale Y values from original curve.
Definition: dss_classic.hpp:7396
IXYCurves & Name(const char *value)
Sets the active XYCurve by Name.
Definition: dss_classic.hpp:7274
double y()
Set Y value or get interpolated Y value after setting X.
Definition: dss_classic.hpp:7441
VectorT Yarray()
Get/Set Y values in curve; Set Npts to max number expected if setting.
Definition: dss_classic.hpp:7379
double Xscale()
Factor to scale X values from original curve.
Definition: dss_classic.hpp:7348
int32_t Next()
Sets the next XYCurve active.
Definition: dss_classic.hpp:7288
string Name()
Get the name of the current active XYCurve.
Definition: dss_classic.hpp:7265
int32_t First()
Sets the first XYCurve active.
Definition: dss_classic.hpp:7256
double x()
Set X value or get interpolated value after setting Y.
Definition: dss_classic.hpp:7426
void idx(int32_t value)
Get active XYCurve by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:7306
int32_t Count()
Number of XYCurve objects in active circuit.
Definition: dss_classic.hpp:7247
double Yshift()
Amount to shift Y value from original curve.
Definition: dss_classic.hpp:7411
double Xshift()
Amount to shift X value from original curve.
Definition: dss_classic.hpp:7363
VectorT Xarray()
Get/set X values as a Array of doubles.
Definition: dss_classic.hpp:7331
int32_t Npts()
Get/Set Number of points in X-Y curve.
Definition: dss_classic.hpp:7315
int32_t idx()
Get active XYCurve by index; index is 1-based: 1..count.
Definition: dss_classic.hpp:7297
strings AllNames()
Array of strings with all XYCurve names in the circuit.
Definition: dss_classic.hpp:7238
Definition: dss_classic.hpp:2536
uint64_t SolverOptions()
Sparse solver options.
Definition: dss_classic.hpp:2596
Definition: dss_classic.hpp:7455
VectorT Extract(const string &FileName)
Extracts the contents of the file "FileName" from the current (open) ZIP file.
Definition: dss_classic.hpp:7561
strings List(const char *regexp="")
List of strings consisting of all names match the regular expression provided in regexp.
Definition: dss_classic.hpp:7470
VectorT Extract(const char *FileName)
Extracts the contents of the file "FileName" from the current (open) ZIP file.
Definition: dss_classic.hpp:7548
void Redirect(const string &FileInZip)
Runs a "Redirect" command inside the current (open) ZIP file.
Definition: dss_classic.hpp:7536
void Open(const string &FileName)
Opens and prepares a ZIP file to be used by the DSS text parser.
Definition: dss_classic.hpp:7500
void Close()
Closes the current open ZIP file.
Definition: dss_classic.hpp:7510
void Open(const char *FileName)
Opens and prepares a ZIP file to be used by the DSS text parser.
Definition: dss_classic.hpp:7487
void Redirect(const char *FileInZip)
Runs a "Redirect" command inside the current (open) ZIP file.
Definition: dss_classic.hpp:7523
bool Contains(const string &Name)
Check if the given path name is present in the current ZIP file.
Definition: dss_classic.hpp:7582
bool Contains(const char *Name)
Check if the given path name is present in the current ZIP file.
Definition: dss_classic.hpp:7572
Definition: dss_common.hpp:66
Definition: dss_common.hpp:42