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/asynchph.py

    r1768 r2068  
    280280      self._converger = converger
    281281
    282       model_objective = model._component[Objective]
     282      model_objective = model.active_components(Objective)
    283283      self._is_minimizing = (model_objective[ model_objective.keys()[0] ].sense == minimize)
    284284
     
    532532         for scenario in self._scenario_tree._scenarios:
    533533            instance = self._instances[scenario._name]
    534             for objective_name in instance._component[Objective]:
    535                objective = instance._component[Objective][objective_name]
     534            for objective_name in instance.active_components(Objective):
     535               objective = instance.active_components(Objective)objective_name]
    536536               # TBD: I don't know how to deal with objective arrays, so I'll assume they aren't there
    537537               print "%20s       %15s     %14.4f" % (scenario._name, objective.name, objective._data[None].expr())
     
    692692      for instance_name, instance in self._instances.items():
    693693         
    694          objective_name = instance._component[Objective].keys()[0]         
    695          objective = instance._component[Objective][objective_name]         
     694         objective_name = instance.active_components(Objective).keys()[0]         
     695         objective = instance.active_components(Objective)[objective_name]         
    696696         objective_expression = objective._data[None].expr # TBD: we don't deal with indexed expressions (not even sure how to interpret them)
    697697         # the quadratic expression is really treated as just a list - eventually should be treated as a full expression.
     
    711711
    712712                  w_parameter_name = "PHWEIGHT_"+variable_name
    713                   w_parameter = instance._component[param._ParamBase][w_parameter_name]
     713                  w_parameter = instance.active_components(Param)[w_parameter_name]
    714714                 
    715715                  average_parameter_name = "PHAVG_"+variable_name
    716                   average_parameter = instance._component[param._ParamBase][average_parameter_name]
     716                  average_parameter = instance.active_components(Param)[average_parameter_name]
    717717
    718718                  rho_parameter_name = "PHRHO_"+variable_name
    719                   rho_parameter = instance._component[param._ParamBase][rho_parameter_name]
     719                  rho_parameter = instance.active_components(Param)[rho_parameter_name]
    720720
    721721                  for index in variable_indices:
    722722
    723                      instance_variable = instance._component[var._VarBase][variable_name][index]
     723                     instance_variable = instance.active_components(Var)[variable_name][index]
    724724                     
    725725                     if (instance_variable.status is not VarStatus.unused) and (instance_variable.fixed is False):
     
    733733         # we'll be covered.
    734734         objective_expression.simplify(instance)
    735          instance._component[Objective][objective_name]._data[None].expr = objective_expression
    736          instance._component[Objective][objective_name]._quad_subexpr = quad_expression
     735         instance.active_components(Objective)[objective_name]._data[None].expr = objective_expression
     736         instance.active_components(Objective)[objective_name]._quad_subexpr = quad_expression
    737737
    738738   def iteration_k_plus_solves(self):
     
    803803
    804804        if self._verbose == True:
    805            for objective_name in instance._component[Objective]:
    806               objective = instance._component[Objective][objective_name]
     805           for objective_name in instance.active_components(Objective):
     806              objective = instance.active_components(Objective)[objective_name]
    807807              print "%20s       %18.4f     %14.4f" % (scenario_name, ph_objective_value, 0.0)
    808808
Note: See TracChangeset for help on using the changeset viewer.