Changeset 3494


Ignore:
Timestamp:
Jan 17, 2011 10:01:09 AM (9 years ago)
Author:
wehart
Message:

Adding the --save-results option to the pyomo command.

Location:
coopr.pyomo/trunk/coopr/pyomo/scripting
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/scripting/pyomo.py

    r3487 r3494  
    186186        type='string',
    187187        default=None)
     188    outputOpts.add_option('--save-results',
     189        help='Specify the filename to which the results are saved.',
     190        action='store',
     191        dest='save_results',
     192        type='string',
     193        default=None)
    188194    outputOpts.add_option('--stream-output',
    189195        help='Stream the solver output to provide information about the '     \
  • coopr.pyomo/trunk/coopr/pyomo/scripting/util.py

    r3487 r3494  
    470470         print line,
    471471       INPUT.close()
     472    #
     473    if options.save_results:
     474        results.write(filename=options.save_results)
    472475    #
    473476    ep = ExtensionPoint(IPyomoScriptPrintResults)
Note: See TracChangeset for help on using the changeset viewer.