| 31 | using namespace Gecode::Int; |
| 32 | |
| 33 | void printStr(Strategy s,int depth) { |
| 34 | StrategyNode plop = s.getTag(); |
| 35 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 36 | if (s.isTrue()) cout<<"TRUE"<<endl; |
| 37 | else if (s.isFalse()) cout<<"FALSE"<<endl; |
| 38 | else cout<<"type "<<plop.type<<" qt "<<plop.quantifier<<" vmin "<<plop.Vmin<<" vmax "<<plop.Vmax<<" scope "<<plop.scope<<" - "; |
| 39 | for (int i=0;i<s.getTag().valeurs.size();i++) cout<<s.getTag().valeurs[i]<<" "; |
| 40 | cout<<endl; |
| 41 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 42 | cout<<s.degree()<<" child(ren)"<<endl; |
| 43 | for (int i=0;i<s.degree();i++) { |
| 44 | for (int glou=0;glou<depth;glou++) cout<<" "; |
| 45 | cout<<"Child "<<i<<" : "<<endl; |
| 46 | printStr(s.getChild(i),depth+1); |
| 47 | } |
| 48 | } |
| 49 | ///////////////////////////////////////////////////////////////////////////////////////// |
| 50 | // This is an instance of the Network Pricing Problem, taken from : // |
| 51 | // // |