/[ascend]/trunk/pygtk/studyreporter.py
ViewVC logotype

Diff of /trunk/pygtk/studyreporter.py

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

revision 2597 by aakash, Fri Sep 2 02:58:46 2011 UTC revision 2598 by jpye, Tue Apr 17 21:00:29 2012 UTC
# Line 21  class PythonSolverReporter(ascpy.SolverR Line 21  class PythonSolverReporter(ascpy.SolverR
21          self.browser.statusbar.pop(self.statusbarcontext)          self.browser.statusbar.pop(self.statusbarcontext)
22    
23          if status.isConverged():          if status.isConverged():
24              self.reporter.reportSuccess("Converged for %s = %0.2f" % (self.browser.sim.getInstanceName(self.instance),              #self.reporter.reportSuccess("Converged for %s = %0.2f" % (self.browser.sim.getInstanceName(self.instance),
25                              self.instance.getRealValue()))              #               self.instance.getRealValue()))
26              return              return
27          elif status.hasExceededTimeLimit():          elif status.hasExceededTimeLimit():
28              _msg = "Solver exceeded time limit"              _msg = "Solver exceeded time limit"
# Line 45  class PythonSolverReporter(ascpy.SolverR Line 45  class PythonSolverReporter(ascpy.SolverR
45          _msg = _msg + " for %s = %0.2f" % (self.browser.sim.getInstanceName(self.instance), self.instance.getRealValue())          _msg = _msg + " for %s = %0.2f" % (self.browser.sim.getInstanceName(self.instance), self.instance.getRealValue())
46          self.reporter.reportError(_msg)          self.reporter.reportError(_msg)
47    
48  class PopupSolverReporter(PythonSolverReporter):  class StudyReporter(PythonSolverReporter):
49      def __init__(self, browser, numvars, instance, nsteps, study):      def __init__(self, browser, numvars, instance, nsteps, study):
50          PythonSolverReporter.__init__(self,browser)          PythonSolverReporter.__init__(self,browser)
51    
# Line 175  class PopupSolverReporter(PythonSolverRe Line 175  class PopupSolverReporter(PythonSolverRe
175                            
176              if status.isConverged():              if status.isConverged():
177                  self.report_to_browser(status)                  self.report_to_browser(status)
178                  print "Converged for %s = %s" % (self.browser.sim.getInstanceName(self.instance), self.instance.getRealValue())                  # print "Converged for %s = %s" % (self.browser.sim.getInstanceName(self.instance), self.instance.getRealValue())
179                  #add row in the observer tabs                  #add row in the observer tabs
180                  for tabs in self.browser.observers:                  for tabs in self.browser.observers:
181                      if tabs.alive:                      if tabs.alive:

Legend:
Removed from v.2597  
changed lines
  Added in v.2598

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