Ignore:
Timestamp:
Dec 30, 2009 12:43:59 AM (10 years ago)
Author:
wehart
Message:

Merged revisions 1952-2067 via svnmerge from
https://software.sandia.gov/svn/public/coopr/coopr.pysp/trunk

........

r1956 | jwatson | 2009-12-02 17:56:53 -0700 (Wed, 02 Dec 2009) | 3 lines


Added --scenario-solver-options and --ef-solver-options options to the "runph" script.

........

r1957 | dlwoodr | 2009-12-03 14:17:35 -0700 (Thu, 03 Dec 2009) | 2 lines


Documentation updates for pysp

........

r1974 | wehart | 2009-12-06 17:20:56 -0700 (Sun, 06 Dec 2009) | 2 lines


Updating PyPI categories

........

r1978 | jwatson | 2009-12-10 21:29:33 -0700 (Thu, 10 Dec 2009) | 3 lines


Eliminated exception-handling logic when loading user-defined extension modules in PH. The range of exceptions is too large, and for debugging purposes, it is more useful to see the raw trace output.

........

r1979 | jwatson | 2009-12-10 22:23:17 -0700 (Thu, 10 Dec 2009) | 5 lines


Biggest enhancement: The efwriter command-line script now has the option to output a CVaR-weighted objective term. Not extensively tested, but behaves sane on a number of small test cases.


Improved exception handling and error diagnostics in both the runph and efwriter scripts.

........

r1985 | jwatson | 2009-12-12 10:45:17 -0700 (Sat, 12 Dec 2009) | 3 lines


Modified PH to only use warm-starts if a solver has the capability!

........

r1998 | jwatson | 2009-12-13 15:17:58 -0700 (Sun, 13 Dec 2009) | 3 lines


Changed references to _component to active_component.

........

r2026 | wehart | 2009-12-21 23:27:06 -0700 (Mon, 21 Dec 2009) | 2 lines


Attempting to update PH. I'm not sure if this works, since I don't know how to test PH.

........

r2029 | jwatson | 2009-12-22 09:52:21 -0700 (Tue, 22 Dec 2009) | 3 lines


Some fixes to the ef writer based on Bill's recent changes to _initialize_constraint.

........

r2035 | jwatson | 2009-12-22 21:10:32 -0700 (Tue, 22 Dec 2009) | 3 lines


Added --scenario-mipgap option to PH script. Added _mipgap attribute to PH object. This attribute is mirrored to the solver plugin at the initiation of each iteration, after any PH extensions have the opportunity to provide a new value to the attribute. It is currently made use of by the WW PH extension.

........

r2037 | dlwoodr | 2009-12-23 14:38:43 -0700 (Wed, 23 Dec 2009) | 2 lines


add this example from Fernando

........

r2038 | dlwoodr | 2009-12-23 14:46:56 -0700 (Wed, 23 Dec 2009) | 3 lines


finish the job: we can now duplicate Fernando's example

........

r2039 | jwatson | 2009-12-23 15:13:54 -0700 (Wed, 23 Dec 2009) | 3 lines


Missed fix with new constraint initialization syntax in PH linearization.

........

r2058 | jwatson | 2009-12-29 10:57:58 -0700 (Tue, 29 Dec 2009) | 3 lines


Missed some _initialize_constraint function calls within the PySP EF writer during the recent switch to the corresponding "add" method.

........

r2059 | jwatson | 2009-12-29 10:58:34 -0700 (Tue, 29 Dec 2009) | 3 lines


Enabling garbage collection by default in PH.

........

r2060 | jwatson | 2009-12-29 10:59:05 -0700 (Tue, 29 Dec 2009) | 3 lines


Elimnating some debug output.

........

r2061 | jwatson | 2009-12-29 11:07:47 -0700 (Tue, 29 Dec 2009) | 3 lines


Fixing some option documentation in PH.

........

r2062 | jwatson | 2009-12-29 12:00:37 -0700 (Tue, 29 Dec 2009) | 3 lines


Added ef-mipgap option to PH scripts.

........

Location:
coopr.pysp/stable/2.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/stable/2.1

  • coopr.pysp/stable/2.1/coopr/pysp/wwphextension.py

    r1952 r2068  
    11#  _________________________________________________________________________
    22#
    3 coopr: a common optimization python repository
    4 copyright (c) 2009 sandia corporation.
     3Coopr: A COmmon Optimization Python Repository
     4Copyright (c) 2009 Sandia Corporation.
    55#  this software is distributed under the bsd license.
    66#  under the terms of contract de-ac04-94al85000 with sandia corporation,
     
    100100               
    101101               # verify that the root variable exists and grab it.
    102                if variable_name not in reference_instance._component[var._VarBase].keys():
     102               if variable_name not in reference_instance.active_components(Var).keys():
    103103                  raise RuntimeError, "Unknown variable="+variable_name+" referenced in ww ph extension suffix file="+self._suffix_filename
    104                variable = reference_instance._component[var._VarBase][variable_name]
     104               variable = reference_instance.active_components(Var)[variable_name]
    105105
    106106               # extract all "real", i.e., fully specified, indices matching the index template.
     
    132132
    133133               # verify that the variable exists.
    134                if variable_string not in reference_instance._component[var._VarBase].keys():
     134               if variable_string not in reference_instance.active_components(Var).keys():
    135135                  raise RuntimeError, "Unknown variable="+variable_string+" referenced in ww ph extension suffix file="+self._suffix_filename
    136136
    137                variable = reference_instance._component[var._VarBase][variable_string]
     137               variable = reference_instance.active_components(Var)[variable_string]
    138138
    139139               # 9/14/2009 - now forcing the user to explicit specify the full
     
    323323      if self.Iteration0MipGap > 0.0:
    324324         print "Setting mipgap to "+str(self.Iteration0MipGap)
    325          ph._solver.options.mip = "tolerances mipgap " + str(self.Iteration0MipGap)
     325         ph._mipgap = self.Iteration0MipGap
    326326         
    327327#==================================================
     
    371371                              # update convergence prior to checking for fixing.
    372372                              self._int_convergence_tracking(ph, tree_node, variable_name, index, node_min, node_max)
    373                               attrvariable = ph._model_instance._component[var._VarBase][variable_name][index]
     373                              attrvariable = ph._model_instance.active_components(Var)[variable_name][index]
    374374                              if hasattr(attrvariable, 'Iter0FixIfConvergedAtLB'):
    375375                                 lb = getattr(attrvariable, 'Iter0FixIfConvergedAtLB')
     
    409409         gap = self.InitialMipGap
    410410         print "Setting mipgap to "+str(gap)
    411          ph._solver.options.mip = "tolerances mipgap " + str(gap)
     411         ph._mipgap = gap
    412412
    413413#==================================================
     
    458458
    459459                              # now check on permissions to converge to various placed (e.g., lb is lb permission)
    460                               attrvariable = ph._model_instance._component[var._VarBase][variable_name][index]
     460                              attrvariable = ph._model_instance.active_components(Var)[variable_name][index]
    461461                              if hasattr(attrvariable, 'FixWhenItersConvergedAtLB'):
    462462                                 lb = getattr(attrvariable, 'FixWhenItersConvergedAtLB')
     
    531531         else:
    532532            print "Setting mipgap to "+str(gap)
    533          ph._solver.options.mip = "tolerances mipgap " + str(gap)
     533         ph._mipgap = gap
    534534
    535535
     
    748748
    749749         # verify that the root variable exists and grab it.
    750          if variable_name not in reference_instance._component[var._VarBase].keys():
     750         if variable_name not in reference_instance.active_components(Var).keys():
    751751            raise RuntimeError, "Unknown variable="+variable_name+" referenced while slamming. "
    752          variable = reference_instance._component[var._VarBase][variable_name]
     752         variable = reference_instance.active_components(Var)[variable_name]
    753753
    754754         didone = False;   # did we find at least one node to slam in?
Note: See TracChangeset for help on using the changeset viewer.