Changeset 2363


Ignore:
Timestamp:
Feb 17, 2010 1:00:34 PM (10 years ago)
Author:
wehart
Message:

Updating baselines, which now used sorted output.

Added sorting option to the sorted() function.

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

Legend:

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

    r2320 r2363  
    409409
    410410         # if you don't pre-solve, the name collections won't be updated.
    411          instance.presolve()
     411         instance.preprocess()
    412412
    413413   # create PH weight and xbar vectors, on a per-scenario basis, for each variable that is not in the
     
    10011001         # IMPT: I decided to presolve unconditionally, as PH extensions can add arbitrary components
    10021002         #       to the base scenario instances - and the variable values/etc. need to be collectged.
    1003          instance.presolve()
     1003         instance.preprocess()
    10041004           
    10051005         # there's nothing to warm-start from in iteration 0, so don't include the keyword in the solve call.
     
    13671367         # don't do this, you won't see any chance in the output files as you vary the problem parameters!
    13681368         # ditto for instance fixing!
    1369          instance.presolve()
     1369         instance.preprocess()
    13701370
    13711371         # once past iteration 0, there is always a feasible solution from which to warm-start.
  • coopr.pysp/trunk/coopr/pysp/scenariotree.py

    r2323 r2363  
    517517         print "\tChildren:"
    518518         if len(tree_node._children) > 0:
    519             for child_node in sorted(tree_node._children):
     519            #for child_node in sorted(tree_node._children):
     520            for child_node in sorted(tree_node._children, cmp=lambda x,y: cmp(x._name,y._name)):
    520521               print "\t\t" + child_node._name
    521522         else:
     
    596597         print "\tChildren:"
    597598         if len(tree_node._children) > 0:
    598             for child_node in sorted(tree_node._children):
     599            for child_node in sorted(tree_node._children, cmp=lambda x,y: cmp(x._name,y._name)):
    599600               print "\t\t" + child_node._name
    600601         else:
  • coopr.pysp/trunk/coopr/pysp/tests/unit/farmer_linearized.baseline

    r2267 r2363  
    9797        Children:
    9898                AboveAverageNode
     99                AverageNode
    99100                BelowAverageNode
    100                 AverageNode
    101101        Scenarios:
    102102                BelowAverageScenario
     
    140140----------------------------------------------------
    141141
    142 Total PH execution time=    1.10 seconds
     142Total PH execution time=    2.69 seconds
    143143
  • coopr.pysp/trunk/coopr/pysp/tests/unit/farmer_quadratic.baseline

    r2275 r2363  
    213213        Conditional probability=1.0000
    214214        Children:
    215                 BelowAverageNode
    216215                AboveAverageNode
    217216                AverageNode
     217                BelowAverageNode
    218218        Scenarios:
    219219                BelowAverageScenario
     
    257257----------------------------------------------------
    258258
    259 Total PH execution time=    6.31 seconds
    260 
     259Total PH execution time=    8.38 seconds
     260
Note: See TracChangeset for help on using the changeset viewer.