64 const std::vector<DaeVarInfo>&
varInfo,
65 const std::vector<std::string>&
eqName,
66 const std::vector<Base>& x) :
70 augmentPath_(&defaultAugmentPath_),
71 augmentPathA_(&defaultAugmentPathA_){
86 void setAugmentPath(AugmentPath<Base>& a)
const {
96 graph_.setPreserveNames(
p);
105 return graph_.isPreserveNames();
121 throw CGException(
"reduceIndex() can only be called once!");
123 if (this->verbosity_ >= Verbosity::High)
124 log() <<
"######## Soares Secchi method ########\n";
126 augmentPath_->setLogger(*
this);
127 augmentPathA_->setLogger(*
this);
139 if (this->verbosity_ >= Verbosity::Low) {
140 graph_.printResultInfo(
"Soares Secchi");
142 log() <<
"Structural index: " << graph_.getStructuralIndex() << std::endl;
158 return graph_.getStructuralIndex();
167 inline void detectSubset2Dif() {
168 auto&
vnodes = graph_.variables();
169 auto&
enodes = graph_.equations();
171 std::set<Enode<Base>*>
marked;
174 if (this->verbosity_ >= Verbosity::High)
175 graph_.printDot(this->log());
179 for (
size_t k = 0;
k <
enodes.size();
k++) {
182 if (this->verbosity_ >= Verbosity::High)
183 log() <<
"Outer loop: equation k = " << *
i <<
"\n";
185 if (
i->assignmentVariable() !=
nullptr) {
189 bool pathFound = augmentPathA_->augmentPath(*
i);
194 if (
ii->isColored() &&
ii->derivative() ==
nullptr) {
202 pathFound = augmentPath_->augmentPath(*i);
204 throw CGException(
"Singular system detected.");
207 for (
auto* jj: vnodes)
211 for (
auto* ii: enodes)
220 for (Enode<Base>* i: marked) {
221 graph_.createDerivate(*i,
false);
224 if (this->verbosity_ >= Verbosity::High)
225 graph_.printDot(this->log());
227 lastMarked.swap(marked);
232 for (
const Enode<Base>* i: lastMarked) {