Changeset 3272


Ignore:
Timestamp:
Dec 2, 2010 3:53:51 PM (10 years ago)
Author:
jwatson
Message:

Adding omitted pprint() method for SOS constraints - identified while debugging a piecewise issue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/base/constraint.py

    r3171 r3272  
    703703        """ Return the sets used to index the sets indexing the variables """
    704704        return self._index
     705
     706    def pprint(self, ostream=None):
     707        if ostream is None:
     708           ostream = sys.stdout
     709        print >>ostream, "  ",self.name,":",
     710        print >>ostream, "Type="+str(self._sosLevel)
     711        print >>ostream, "\tVariable: "+self._sosVars.name
     712        print >>ostream, "\tIndices: ",
     713        for i in self._sosSet.value:
     714           print >>ostream, str(i)+" ",
     715        print >>ostream, ""
Note: See TracChangeset for help on using the changeset viewer.