Ignore:
Timestamp:
Oct 22, 2010 4:11:43 PM (10 years ago)
Author:
jwatson
Message:

Added "--simplify-expressions" option to runph, in order to eliminate the memory and time costs associated with simplifying expressions (e.g., in formulation of the PH objective) for which simpification is very unlikely to help. By default, expression simplification is disabled. This may cause issues with certain writers, e.g., NL - which is why I have retained the option.

File:
1 edited

Legend:

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

    r3120 r3138  
    172172     type="string",
    173173     default=None)
    174    
     174   phOpts.add_option("--linearize-expressions",
     175     help="EXPERIMENTAL: An option intended for use on linear or mixed-integer models " \
     176          "in which expression trees in a model (constraints or objectives) are compacted " \
     177          "into a more memory-efficient and concise form. The trees themselves are eliminated. ",
     178     action="store_true",
     179     dest="linearize_expressions",
     180     default=False)
     181   phOpts.add_option("--simplify-expressions",
     182     help="Enable expression simplification during both model instance creation and any " \
     183          "subsequent modifications of the model, e.g., during manipulation of the objective.",
     184     action="store_true",
     185     dest="simplify_expressions",
     186     default=False)
     187
    175188   solverOpts.add_option('--scenario-mipgap',
    176189     help="Specifies the mipgap for all PH scenario sub-problems",
     
    201214     action="store_true",
    202215     dest="disable_warmstarts",
    203      default=False)
    204    solverOpts.add_option("--linearize-expressions",
    205      help="EXPERIMENTAL: An option intended for use on linear or mixed-integer models " \
    206           "in which expression trees in a model (constraints or objectives) are compacted " \
    207           "into a more memory-efficient and concise form. The trees themselves are eliminated. ",
    208      action="store_true",
    209      dest="linearize_expressions",
    210216     default=False)
    211217
     
    550556                           linearize_nonbinary_penalty_terms=options.linearize_nonbinary_penalty_terms, \
    551557                           breakpoint_strategy=options.breakpoint_strategy, \
    552                            checkpoint_interval=options.checkpoint_interval)
     558                           checkpoint_interval=options.checkpoint_interval, \
     559                           simplify_expressions=options.simplify_expressions)
    553560
    554561   ph.initialize(scenario_data_directory_name=os.path.expanduser(options.instance_directory), \
Note: See TracChangeset for help on using the changeset viewer.