Changeset 3480


Ignore:
Timestamp:
Jan 15, 2011 7:55:34 PM (9 years ago)
Author:
khunter
Message:

NFC: EOL whitespace removal

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/phinit.py

    r3374 r3480  
    5656   phOpts           = OptionGroup( parser, 'PH Options' )
    5757   solverOpts       = OptionGroup( parser, 'Solver Options' )
    58    postprocessOpts  = OptionGroup( parser, 'Postprocessing Options' )   
     58   postprocessOpts  = OptionGroup( parser, 'Postprocessing Options' )
    5959   outputOpts       = OptionGroup( parser, 'Output Options' )
    6060   otherOpts        = OptionGroup( parser, 'Other Options' )
     
    6363   parser.add_option_group( phOpts )
    6464   parser.add_option_group( solverOpts )
    65    parser.add_option_group( postprocessOpts )   
     65   parser.add_option_group( postprocessOpts )
    6666   parser.add_option_group( outputOpts )
    6767   parser.add_option_group( otherOpts )
     
    9696     dest="scenario_tree_downsample_fraction",
    9797     type="float",
    98      default=1.0)   
     98     default=1.0)
    9999
    100100   phOpts.add_option('-r','--default-rho',
     
    154154     dest="breakpoint_strategy",
    155155     type="int",
    156      default=0)   
     156     default=0)
    157157   phOpts.add_option('--retain-quadratic-binary-terms',
    158158     help="Do not linearize PH objective terms involving binary decision variables",
     
    259259     dest="ef_solver_options",
    260260     type="string",
    261      default=[])   
     261     default=[])
    262262   postprocessOpts.add_option('--output-ef-solver-log',
    263263     help="Output solver log during the extensive form solve",
     
    265265     dest="output_ef_solver_log",
    266266     default=False)
    267    
     267
    268268   outputOpts.add_option('--output-scenario-tree-solution',
    269269     help="Report the full solution (even leaves) in scenario tree format upon termination. Values represent averages, so convergence is not an issue. Default is False.",
     
    355355     action="store_true",
    356356     dest="traceback",
    357      default=False)   
     357     default=False)
    358358
    359359   return parser
     
    407407      else:
    408408         reference_instance.preprocess()
    409      
     409
    410410   except IOError:
    411411      print "***ERROR: Failed to load scenario reference instance data from file="+reference_instance_filename
     
    438438   #
    439439   if options.scenario_tree_downsample_fraction < 1.0:
    440        
     440
    441441      scenario_tree.downsample(options.scenario_tree_downsample_fraction, options.scenario_tree_random_seed, options.verbose)
    442442
     
    675675      print "Done with extensive form solve - loading results"
    676676      load_ef_solution(ef_results, binding_instance, ph._instances)
    677      
     677
    678678      print "Storing solution in scenario tree"
    679679      ph._scenario_tree.snapshotSolutionFromInstances(ph._instances)
     
    762762    # have a value and the return statement from this function will flag
    763763    # an error, masking the stack trace that you really want to see.
    764     ans = None       
     764    ans = None
    765765
    766766    if options.profile > 0:
     
    803803           except NameError, str:
    804804              print "NAME ERROR:"
    805               print str                           
     805              print str
    806806           except IOError, str:
    807807              print "IO ERROR:"
     
    811811              print str
    812812           except RuntimeError, str:
    813               print "RUN-TIME ERROR:"   
    814               print str       
     813              print "RUN-TIME ERROR:"
     814              print str
    815815           except:
    816816              print "Encountered unhandled exception"
Note: See TracChangeset for help on using the changeset viewer.