/[ascend]/trunk/pygtk/simulation.cpp
ViewVC logotype

Diff of /trunk/pygtk/simulation.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 840 by johnpye, Sat Jul 15 07:18:54 2006 UTC revision 841 by johnpye, Sun Sep 10 06:13:44 2006 UTC
# Line 291  Simulation::getFreeableVariables(){ Line 291  Simulation::getFreeableVariables(){
291      vector<Variable> v;      vector<Variable> v;
292    
293      cerr << "CHECKING CONSISTENCY..." << endl;      cerr << "CHECKING CONSISTENCY..." << endl;
294      int *fixedarrayptr;      int *fixedarrayptr=NULL;
295    
296        if(!sys){
297            throw runtime_error("System not yet built");
298        }
299    
300      int res = consistency_analysis(sys, &fixedarrayptr);      int res = consistency_analysis(sys, &fixedarrayptr);
     struct var_variable **vp = slv_get_master_var_list(sys);  
301    
302      if(res==1){      if(res==1){
303          cerr << "STRUCTURALLY CONSISTENT" << endl;          cerr << "STRUCTURALLY CONSISTENT" << endl;
304      }else{      }else{
305            if(fixedarrayptr ==NULL){
306                ERROR_REPORTER_HERE(ASC_USER_ERROR,"STRUCTURALLY INCONSISTENT");
307                throw runtime_error("Invalid constistency analysis result returned!");
308            }
309    
310            struct var_variable **vp = slv_get_master_var_list(sys);
311          for(int i=0; fixedarrayptr[i]!=-1; ++i){          for(int i=0; fixedarrayptr[i]!=-1; ++i){
312              v.push_back( Variable(this, vp[fixedarrayptr[i]]) );              v.push_back( Variable(this, vp[fixedarrayptr[i]]) );
313          }          }

Legend:
Removed from v.840  
changed lines
  Added in v.841

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22