Changeset 5796


Ignore:
Timestamp:
May 20, 2012 9:58:58 PM (7 years ago)
Author:
wehart
Message:

Removing deprecated functionality. This hasn't worked since the self._var
data was removed.

File:
1 edited

Legend:

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

    r5795 r5796  
    193193            self = Model.preprocessor_ep.service(item).preprocess(self)
    194194
    195     def Xsolution(selfNone):
    196         """Return the solution"""
    197         soln = []
    198         for i in range(len(self._var)):
    199             soln.append( self._var[i].value )
    200         return soln
    201 
     195    #
    202196    # this method is a hack, used strictly by the pyomo command-line utility to
    203197    # allow for user-readable names to be present in solver results objects.
     
    494488                memory_tracker.print_diff()
    495489
    496 
    497 
    498 
    499490    def _load_solution( self, soln, symbol_map,
    500491                        allow_consistent_values_for_fixed_vars=False,
     
    508499          generated from one model into another related, but not identical, model.
    509500        """
    510         ## Load list or tuple into the variables, based on their order
    511         # NB: This is no longer supportable with the new SymbolMap
    512         #if type(soln) in (tuple, list):
    513         #    if len(soln) != len(self._var):
    514         #        msg = 'Attempting to load a list/tuple solution into a ' \
    515         #              'model, but its length is %d while the model has %d ' \
    516         #              'variables' % (len(soln), len(self._var))
    517         #        raise ValueError, msg % ( len(soln), len(self._var) )
    518         #    for i in range(len(soln)):
    519         #        self._var[i].value = soln[i]
    520         #    return
    521 
    522501        #
    523502        # FIXME: JDS: Why doesn't this load the objective data?
    524503        #
    525 
    526504        if symbol_map is None:
    527505            same_instance = False
Note: See TracChangeset for help on using the changeset viewer.