Changeset 2280


Ignore:
Timestamp:
Feb 8, 2010 1:26:49 PM (10 years ago)
Author:
jwatson
Message:

Adding a suffixes attribute to the base solver class. This is a list of suffixes that the solver will - assuming it can - load into a solution. Examples are rc, dual, slack, etc. I modified the derived solver plugin classes to throw an exception if provided a suffix that it can't handle. I have little doubt that this change will cause some tests to fail - I'll look at this in a bit. The change was motivated by the expense of querying a solution, loading a solution, and shipping a lot of unnecessary information across the network.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.opt/trunk/coopr/opt/base/solver.py

    r2201 r2280  
    129129        self._assert_available=False
    130130        self._report_timing = False # timing statistics are always collected, but optionally reported.
     131        self.suffixes = [] # a list of the suffixes the user has request be loaded in a solution.
    131132
    132133        # a fairly universal solver feature, at least when dealing
     
    189190          elif key == "available":
    190191             self._assert_available=True
     192          elif key == "suffixes":
     193             val = kwds[key]
     194             self._suffixes=kwds[key]
    191195          else:
    192196             raise ValueError, "Unknown option="+key+" for solver="+self.type
Note: See TracChangeset for help on using the changeset viewer.