Changeset 2874


Ignore:
Timestamp:
Jul 28, 2010 1:49:09 PM (9 years ago)
Author:
prsteel
Message:

Updates arguments passed to sub-transformations, correctly applies
transformations.

--This line, and those below, will be ignored--

M standard_form.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.pyomo/trunk/coopr/pyomo/transform/standard_form.py

    r2863 r2874  
    3030        """
    3131
    32         # Optional naming schemes
    33         slack_root = kwds.pop("slack_names", "auxiliary_slack")
    34         excess_root = kwds.pop("excess_names", "auxiliary_excess")
    35         lb_suffix = kwds.pop("lb_names", "_lower_bound")
    36         ub_suffix = kwds.pop("ub_names", "_upper_bound")
     32        # Optional naming schemes to pass to EqualityTransform
     33        eq_kwds["slack_names"] = kwds.pop("slack_names", "auxiliary_slack")
     34        eq_kwds["excess_names"] = kwds.pop("excess_names", "auxiliary_excess")
     35        eq_kwds["lb_names"] = kwds.pop("lb_names", "_lower_bound")
     36        eq_kwds["ub_names"] = kwds.pop("ub_names", "_upper_bound")
     37
     38        # Optional naming schemes to pass to NonNegativeTransformation
     39        nn_kwds["pos_suffix"] = kwds.pop("pos_suffix", "_plus")
     40        nn_kwds["neg_suffix"] = kwds.pop("neg_suffix", "_minus")
    3741
    3842        nonneg = NonNegativeTransformation()
    3943        equality = EqualityTransform()
    4044
    41         print "Starting equality transformation...",
    42         sf = equality(model)
    43         print "finished"
    44         print "Starting nonnegativity transformation...",
    45         sf = nonneg(model)
    46         print "finished"
     45        sf = equality(model, **eq_kwds)
     46        sf = nonneg(sf, **nn_kwds)
    4747
    4848        return sf
Note: See TracChangeset for help on using the changeset viewer.