82 throw CGException(
"reduceIndex() can only be called once!");
84 if (this->verbosity_ >= Verbosity::Low)
85 log() <<
"######## Pantelides method ########\n";
87 augmentPath_->setLogger(*
this);
93 if (this->verbosity_ >= Verbosity::Low) {
94 graph_.printResultInfo(
"Pantelides");
96 log() <<
"Structural index: " << graph_.getStructuralIndex() << std::endl;
111 auto&
vnodes = graph_.variables();
112 auto&
enodes = graph_.equations();
116 if (this->verbosity_ >= Verbosity::High)
117 graph_.printDot(this->log());
120 for (
size_t k = 0;
k <
Ndash;
k++) {
123 if (this->verbosity_ >= Verbosity::High)
124 log() <<
"Outer loop: equation k = " << *
i <<
"\n";
134 if (!
jj->isDeleted() &&
jj->derivative() !=
nullptr) {
135 jj->deleteNode(log(), this->verbosity_);
145 for (
size_t l = 0; l <
vsize; ++l) {
147 if (
jj->isColored() && !
jj->isDeleted()) {
149 graph_.createDerivate(*
jj);
154 for (
size_t l = 0; l <
esize; l++) {
156 if (
ll->isColored()) {
158 graph_.createDerivate(*
ll);
165 const std::vector<Vnode<Base>*>&
nvars =
ll->originalVariables();
168 if (
js->equations().size() > 1) {
174 throw CGException(
"Invalid equation structure. The model appears to be over-defined.");
178 if (
jj->isColored() && !
jj->isDeleted()) {
180 jDiff->setAssignmentEquation(*
jj->assignmentEquation()->derivative(), log(), this->verbosity_);
186 if (this->verbosity_ >= Verbosity::High) {
187 log() <<
"Set current equation to (i=" <<
i->index() <<
") " << *
i <<
"\n";
189 graph_.printDot(this->log());