Ignore:
Timestamp:
Nov 21, 2009 12:42:49 AM (10 years ago)
Author:
jwatson
Message:

Fixes to make PySP consistent with the variable lower/upper bound changes described in the previous commit. Fixed a few bugs in the farmer example now that bounds specified through parameters are working correctly.

Location:
coopr.pysp/trunk/examples/pysp
Files:
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/examples/pysp/farmer/README.txt

    r1852 r1925  
    3030To linearize the quadratic penalty terms, simply add the following options to the command line:
    3131 
    32 --linearize-nonbinary-penalty-terms=2 --bounds-cfgfile=config/boundsetter.cfg
     32--linearize-nonbinary-penalty-terms=2
    3333
    3434Four piecewise linear segments per blended variable yields faster convergence (9 iterations), but
  • coopr.pysp/trunk/examples/pysp/farmer/farmer_lp.py

    r1739 r1925  
    4242model.DevotedAcreage = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
    4343
    44 model.QuantitySubQuotaSold = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
    45 model.QuantitySuperQuotaSold = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
     44model.QuantitySubQuotaSold = Var(model.CROPS, bounds=(0.0, None))
     45model.QuantitySuperQuotaSold = Var(model.CROPS, bounds=(0.0, None))
    4646
    47 # TBD: Change when domain bound are propagated through to output in the following three variables (remove bounds, add domains).
    4847model.QuantityPurchased = Var(model.CROPS, bounds=(0.0, None))
    4948
  • coopr.pysp/trunk/examples/pysp/farmer/models/ReferenceModel.py

    r1720 r1925  
    4242model.DevotedAcreage = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
    4343
    44 model.QuantitySubQuotaSold = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
    45 model.QuantitySuperQuotaSold = Var(model.CROPS, bounds=(0.0, model.TOTAL_ACREAGE))
     44model.QuantitySubQuotaSold = Var(model.CROPS, bounds=(0.0, None))
     45model.QuantitySuperQuotaSold = Var(model.CROPS, bounds=(0.0, None))
    4646
    47 model.QuantityPurchased = Var(model.CROPS, bounds=(0.0, None))
    48 
    49 # TBD: Change when domain bound are propagated through to output in the following three variables (remove bounds, add domains).
    5047model.QuantityPurchased = Var(model.CROPS, bounds=(0.0, None))
    5148
  • coopr.pysp/trunk/examples/pysp/forestry/config/boundsetter.cfg

    r1859 r1925  
    1717      ub = instance.Zub[t]()
    1818      for e in instance.ExitNodes:
    19          instance.z[e, t].lb = lb
    20          instance.z[e, t].ub = ub
     19         instance.z[e, t].setlb(lb)
     20         instance.z[e, t].setub(ub)
Note: See TracChangeset for help on using the changeset viewer.