Changeset 2659


Ignore:
Timestamp:
Jun 14, 2010 6:03:58 PM (11 years ago)
Author:
prsteel
Message:

Changes to coopr.plugins to support SOS constraints.

Knowledge of self._capabilities was added to both CPLEX.py and
GLPK.py; CPLEX.py knows about SOS1 and SOS2 constraints, while GLPK.py
does not.

Location:
coopr.plugins/trunk/coopr/plugins/mip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.plugins/trunk/coopr/plugins/mip/CPLEX.py

    r2634 r2659  
    6161        self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln]
    6262        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln]
     63
     64        # Note: Undefined capabilities default to 'None'
     65        self._capabilities = pyutilib.misc.Options()
     66        self._capabilities.linear = True
     67        self._capabilities.quadratic = True
     68        self._capabilities.integer = True
     69        self._capabilities.sos1 = True
     70        self._capabilities.sos2 = True
    6371
    6472    #
  • coopr.plugins/trunk/coopr/plugins/mip/GLPK.py

    r2593 r2659  
    4242        self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln]
    4343        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln]
     44
     45        # Note: Undefined capabilities default to 'None'
     46        self._capabilities = pyutilib.misc.Options()
     47        self._capabilities.linear = True
     48        self._capabilities.integer = True
    4449
    4550    def executable(self):
Note: See TracChangeset for help on using the changeset viewer.