Changeset 2363
- Timestamp:
- Feb 17, 2010 1:00:34 PM (11 years ago)
- Location:
- coopr.pysp/trunk/coopr/pysp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
coopr.pysp/trunk/coopr/pysp/ph.py
r2320 r2363 409 409 410 410 # if you don't pre-solve, the name collections won't be updated. 411 instance.pre solve()411 instance.preprocess() 412 412 413 413 # create PH weight and xbar vectors, on a per-scenario basis, for each variable that is not in the … … 1001 1001 # IMPT: I decided to presolve unconditionally, as PH extensions can add arbitrary components 1002 1002 # to the base scenario instances - and the variable values/etc. need to be collectged. 1003 instance.pre solve()1003 instance.preprocess() 1004 1004 1005 1005 # there's nothing to warm-start from in iteration 0, so don't include the keyword in the solve call. … … 1367 1367 # don't do this, you won't see any chance in the output files as you vary the problem parameters! 1368 1368 # ditto for instance fixing! 1369 instance.pre solve()1369 instance.preprocess() 1370 1370 1371 1371 # once past iteration 0, there is always a feasible solution from which to warm-start. -
coopr.pysp/trunk/coopr/pysp/scenariotree.py
r2323 r2363 517 517 print "\tChildren:" 518 518 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)): 520 521 print "\t\t" + child_node._name 521 522 else: … … 596 597 print "\tChildren:" 597 598 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)): 599 600 print "\t\t" + child_node._name 600 601 else: -
coopr.pysp/trunk/coopr/pysp/tests/unit/farmer_linearized.baseline
r2267 r2363 97 97 Children: 98 98 AboveAverageNode 99 AverageNode 99 100 BelowAverageNode 100 AverageNode101 101 Scenarios: 102 102 BelowAverageScenario … … 140 140 ---------------------------------------------------- 141 141 142 Total PH execution time= 1.10seconds142 Total PH execution time= 2.69 seconds 143 143 -
coopr.pysp/trunk/coopr/pysp/tests/unit/farmer_quadratic.baseline
r2275 r2363 213 213 Conditional probability=1.0000 214 214 Children: 215 BelowAverageNode216 215 AboveAverageNode 217 216 AverageNode 217 BelowAverageNode 218 218 Scenarios: 219 219 BelowAverageScenario … … 257 257 ---------------------------------------------------- 258 258 259 Total PH execution time= 6.31seconds260 259 Total PH execution time= 8.38 seconds 260
Note: See TracChangeset
for help on using the changeset viewer.