Changeset 3507


Ignore:
Timestamp:
Jan 19, 2011 11:04:31 PM (9 years ago)
Author:
jwatson
Message:

Fixing issue in Pyomo script with the --skip-canonical-repn option - which actually wasn't being used. It is now propagated to the model correctly, if enabled. I'm not sure what might be broken if we skip this (in certain circumstances, e.g., writing an LP file, bad things will likely happen), but at least the option is actually now active.

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

Legend:

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

    r3494 r3507  
    271271   
    272272    otherOpts.add_option("--skip-canonical-repn",
    273             help="Do not create the canonical representation. This is not necessary for solvers that do not require it.",
     273            help="Do not create the canonical representation. This is not necessary for solvers (e.g., ASL-based) that do not require it.",
    274274            action="store_true",
    275275            dest="skip_canonical_repn",
  • coopr.pyomo/trunk/coopr/pyomo/scripting/util.py

    r3503 r3507  
    275275
    276276    #
    277     # Disable canonical repn for ASL solvers
     277    # Disable canonical repn for ASL solvers, and if the user has specified as such (in which case, we assume they know what they are doing!).
    278278    #
    279279    # Likely we need to change the framework so that canonical repn
     
    281281    #
    282282    if not options.solver is None and options.solver.startswith('asl'):
     283        model.skip_canonical_repn = True
     284    elif options.skip_canonical_repn is True:
    283285        model.skip_canonical_repn = True
    284286
Note: See TracChangeset for help on using the changeset viewer.