Changeset 2664


Ignore:
Timestamp:
Jun 16, 2010 10:22:56 AM (11 years ago)
Author:
prsteel
Message:

Overwrote base class behavior for 'has_capability' method in several
derived solver classes.

The base class 'OptSolver?' returns an error when calling
'has_capability'; this behavior needs to be overridden by derived
classes.

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

Legend:

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

    r2593 r2664  
    1919import pyutilib.component.core
    2020import pyutilib.component.config
     21import pyutilib.misc
    2122import mockmip
    2223import os
     
    4243        self._valid_result_formats = {}
    4344        self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.sol]
     45
     46        # Note: Undefined capabilities default to 'None'
     47        self._capabilities = pyutilib.misc.Options()
     48        self._capabilities.linear = True
     49        self._capabilities.integer = True
    4450
    4551    def executable(self):
  • coopr.plugins/trunk/coopr/plugins/mip/CBCplugin.py

    r2632 r2664  
    6363            self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.sol]       
    6464        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln]
     65
     66        # Note: Undefined capabilities default to 'None'
     67        self._capabilities = pyutilib.misc.Options()
     68        self._capabilities.linear = True
     69        self._capabilities.integer = True
    6570
    6671    def _presolve(self, *args, **kwds):
  • coopr.plugins/trunk/coopr/plugins/mip/GUROBI.py

    r2599 r2664  
    5959        self._valid_result_formats[ProblemFormat.cpxlp] = [ResultsFormat.soln]
    6060        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln]
     61
     62        # Note: Undefined capabilities default to 'None'
     63        self._capabilities = pyutilib.misc.Options()
     64        self._capabilities.linear = True
     65        self._capabilities.integer = True
    6166
    6267    #
  • coopr.plugins/trunk/coopr/plugins/mip/PICO.py

    r2593 r2664  
    1818import pyutilib.common
    1919import pyutilib.component.core
     20import pyutilib.misc
    2021import mockmip
    2122import os
     
    4344        self._valid_result_formats[ProblemFormat.nl] = [ResultsFormat.sol]
    4445        self._valid_result_formats[ProblemFormat.mps] = [ResultsFormat.soln]
     46
     47        # Note: Undefined capabilities default to 'None'
     48        self._capabilities = pyutilib.misc.Options()
     49        self._capabilities.linear = True
     50        self._capabilities.integer = True
    4551
    4652    def executable(self):
Note: See TracChangeset for help on using the changeset viewer.