Changeset 2668


Ignore:
Timestamp:
Jun 16, 2010 4:59:43 PM (11 years ago)
Author:
jwatson
Message:

Adding work-around to the issue identified by Patrick in which the solver capabilities are unknown to a problem writer (in this case the LP file writer). As a consequence, any capabilities have to be tagged to the instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/coopr/pysp/ph.py

    r2462 r2668  
    649649      if re_enable_gc is True:
    650650         gc.collect()
    651          gc.enable()         
     651         gc.enable()
     652
     653      # IMPT: This is kind of a hack now, as there is currently no way to propagate
     654      #       solver capabilities through to the corresponding file writer - it
     655      #       has to go through the model. so tag each instance with the solver
     656      #       capabilities.
     657      model_instance.has_capability = self._solver.has_capability
     658      for scenario_name, scenario_instance in self._instances.items():
     659         scenario_instance.has_capability = self._solver.has_capability
    652660
    653661      # let plugins know if they care - this callback point allows
Note: See TracChangeset for help on using the changeset viewer.