Changeset 2448


Ignore:
Timestamp:
Mar 24, 2010 12:36:04 PM (9 years ago)
Author:
jwatson
Message:

Fixed issue with LP format writer involving the failure to output model prefixes for the constant-offset term. Only impacts the PySP EF writer - eliminates a warning from CPLEX, and an error report from GLPK.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/io/cpxlp.py

    r2228 r2448  
    323323           # to avoid painful book-keeping, we introduce the following "variable", constrained to the value 1. this is
    324324           # used when quadratic terms are present. worst-case, if not used, is that CPLEX easily pre-processes it out.
    325            print >>OUTPUT, "c_e_ONE_VAR_CONSTANT: ONE_VAR_CONSTANT = 1.0"
     325           prefix = ""
     326           if self._output_prefixes is True:
     327              prefix = model.name + "_"
     328           print >>OUTPUT, prefix+"c_e_ONE_VAR_CONSTANT: "+prefix+"ONE_VAR_CONSTANT = 1.0"
    326329           print >>OUTPUT, ""
    327330           
Note: See TracChangeset for help on using the changeset viewer.