Changeset 5819


Ignore:
Timestamp:
May 28, 2012 11:39:22 PM (7 years ago)
Author:
jwatson
Message:

Fixes to deal with recent param changes.

Location:
coopr.pysp/trunk/coopr/pysp
Files:
2 edited

Legend:

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

    r5797 r5819  
    417417       problem_writer = cpxlp.ProblemWriter_cpxlp()
    418418       output_file = open(output_filename,"w")
    419        symbol_map = problem_writer._print_model_LP(binding_instance, output_file, lambda x:True
     419       symbol_map = problem_writer._print_model_LP(binding_instance, output_file, lambda x:True, True
    420420       output_file.close()
    421421
  • coopr.pysp/trunk/coopr/pysp/ph.py

    r5596 r5819  
    11411141                print "Node-based instance initialization enabled"
    11421142
     1143        ################################################
     1144        # start of scenario instance construction loop #
     1145        ################################################
    11431146        for scenario in self._scenario_tree._scenarios:
    11441147
     
    11841187            # the Constraint components from the reference model, prior to scenario instance construction.           
    11851188            if isinstance(self._solver_manager, coopr.plugins.smanager.phpyro.SolverManager_PHPyro):
    1186                 # TBD: we technically only have to execute the identify_variables preprocessor -
    1187                 # this will save significant time. and maybe not even that preprocessor.
     1189                # TBD: we technically only have to execute the identify_variables preprocessor
     1190                #      (and maybe not even that preprocessor) - this will save significant time.
    11881191                scenario_instance.preprocess()
    11891192                if retain_constraints:
     
    11911194                else:
    11921195                    cull_constraints_from_instance(scenario_instance)           
     1196
     1197        ##############################################
     1198        # end of scenario instance construction loop #   
     1199        ##############################################
    11931200
    11941201        # perform a single pass of garbage collection and re-enable automatic collection.
     
    17731780                                new_weight_values[index] = new_variable_weight
    17741781
    1775                         # store the computed weights in bulk, for efficiency.
    1776                         weight_parameter.store_values(new_weight_values)
     1782                        # store the computed weights
     1783                        for index, value in new_weight_values.iteritems():
     1784                            weight_parameter[index] = value
    17771785
    17781786        end_time = time.time()
Note: See TracChangeset for help on using the changeset viewer.