Changeset 2157


Ignore:
Timestamp:
Jan 12, 2010 10:58:15 PM (11 years ago)
Author:
jwatson
Message:

Added upper bounds to SIZES PySP reference model, to test for linearization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pysp/trunk/examples/pysp/sizes/models/ReferenceModel.py

    r2153 r2157  
    7070
    7171# the number of units at each size produced.
    72 # TBD: once Pyomo allows parameters as domain bounds, add in upper bounds for production capacity.
    73 model.NumProducedFirstStage = Var(model.ProductSizes, domain=NonNegativeIntegers)
    74 model.NumProducedSecondStage = Var(model.ProductSizes, domain=NonNegativeIntegers)
     72model.NumProducedFirstStage = Var(model.ProductSizes, domain=NonNegativeIntegers, bounds=(0.0, model.Capacity))
     73model.NumProducedSecondStage = Var(model.ProductSizes, domain=NonNegativeIntegers, bounds=(0.0, model.Capacity))
    7574
    7675# the number of units of size i cut (down) to meet demand for units of size j.
    77 # TBD: once Pyomo allows parameters as domain bounds, impose upper bound.
    78 model.NumUnitsCutFirstStage = Var(model.NumUnitsCutDomain, domain=NonNegativeIntegers)
    79 model.NumUnitsCutSecondStage = Var(model.NumUnitsCutDomain, domain=NonNegativeIntegers)
     76model.NumUnitsCutFirstStage = Var(model.NumUnitsCutDomain, domain=NonNegativeIntegers, bounds=(0.0, model.Capacity))
     77model.NumUnitsCutSecondStage = Var(model.NumUnitsCutDomain, domain=NonNegativeIntegers, bounds=(0.0, model.Capacity))
    8078
    8179# stage-specific cost variables for use in the pysp scenario tree / analysis.
Note: See TracChangeset for help on using the changeset viewer.