/[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 1736 by jpye, Wed Dec 19 06:20:49 2007 UTC revision 1737 by jpye, Thu Feb 7 23:58:06 2008 UTC
# Line 780  Simulation::solve(Solver solver, SolverR Line 780  Simulation::solve(Solver solver, SolverR
780      status.getSimulationStatus(*this);      status.getSimulationStatus(*this);
781      reporter.report(&status);      reporter.report(&status);
782    
783        CONSOLE_DEBUG("About to start %d iterations...", niter);
784      for(unsigned iter = 1; iter <= niter && !stop; ++iter){      for(unsigned iter = 1; iter <= niter && !stop; ++iter){
785    
786          if(status.isReadyToSolve()){          if(status.isReadyToSolve()){
787              /* CONSOLE_DEBUG("Calling slv_iterate..."); */              CONSOLE_DEBUG("Calling slv_iterate...");
788              res = slv_iterate(sys);              res = slv_iterate(sys);
789            }else{
790                CONSOLE_DEBUG("not ready to solve!");
791          }          }
792    
793          if(res)CONSOLE_DEBUG("slv_iterate returns %d",res);          if(res)CONSOLE_DEBUG("slv_iterate returns %d",res);
# Line 798  Simulation::solve(Solver solver, SolverR Line 801  Simulation::solve(Solver solver, SolverR
801      }      }
802    
803      double elapsed = tm_cpu_time() - starttime;      double elapsed = tm_cpu_time() - starttime;
804      CONSOLE_DEBUG("Elapsed time: %0.3f", elapsed);      CONSOLE_DEBUG("Elapsed time: %0.3f (solver completed)", elapsed);
805    
806      activeblock = status.getCurrentBlockNum();      activeblock = status.getCurrentBlockNum();
807    
# Line 847  Simulation::getIncidenceMatrix(){ Line 850  Simulation::getIncidenceMatrix(){
850  }  }
851    
852  /**  /**
853      This function looks at all the variables in the solve's list and updates      This function looks at all the variables in the solver list, and updates
854      the variable status for the corresponding instances.      the variable status for the corresponding instances so that feedback can
855        be given to the user via the GUI.
856    
857      It does this by using the 'interface pointer' in the Instance, see      It does this by using the 'interface pointer' in the Instance, see
858      the C-API function GetInterfacePtr.      the C-API function GetInterfacePtr.
# Line 881  Simulation::processVarStatus(){ Line 885  Simulation::processVarStatus(){
885      if(status.block.number_of == 0){      if(status.block.number_of == 0){
886          cerr << "Variable statuses can't be set: block structure not yet determined." << endl;          cerr << "Variable statuses can't be set: block structure not yet determined." << endl;
887          return;          return;
888        }else{
889            CONSOLE_DEBUG("There are %d blocks", status.block.number_of);
890      }      }
891    
892      if(!bb->block){      if(!bb->block){

Legend:
Removed from v.1736  
changed lines
  Added in v.1737

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