Changeset 2885


Ignore:
Timestamp:
Jul 29, 2010 7:35:10 PM (9 years ago)
Author:
khunter
Message:

Refs #4104 "Multiple Objectives"

Temporarily raise an error when a user tries to use multiple
objectives with an LP file. More generally, how do we handle
multiple objectives?

File:
1 edited

Legend:

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

    r2880 r2885  
    365365
    366366           obj = _obj[ _obj.keys()[0] ]
     367           if len(obj.keys()) > 1:
     368               msg = "More than one objective defined for input model '%s'; " \
     369                     'Cannot write legal LP file'
     370               raise ValueError, msg % str( model.name )
     371
    367372           for key in obj:
    368373                if is_constant(obj[key].repn):
Note: See TracChangeset for help on using the changeset viewer.