Changeset 2937

Timestamp:
Aug 14, 2010 6:40:55 PM (9 years ago)
Author:
wehart
Message:

Merged revisions 2733-2936 via svnmerge from
https://software.sandia.gov/svn/public/coopr/coopr.pyomo/trunk

........

r2735 | jwatson | 2010-06-28 20:58:23 -0600 (Mon, 28 Jun 2010) | 3 lines


Added error diagnostic for cases where variables don't yet have label attributes - can occur if you do stupid things (like I did) in the model definition file. Detected when outputting LP format files.

........

r2736 | jwatson | 2010-06-28 21:09:14 -0600 (Mon, 28 Jun 2010) | 3 lines


Further diagnostic improvements to previous commit - forgot to output index of variable.

........

r2737 | khunter | 2010-06-29 09:01:51 -0600 (Tue, 29 Jun 2010) | 6 lines


Better failure mode for incorrect model rule.


JP found a less-than-useful failure mode when a modeler incorrectly
references a model in a rule. Example test cases added highlight
the perhaps easy thinko/typo.

........

r2738 | khunter | 2010-06-29 09:03:39 -0600 (Tue, 29 Jun 2010) | 2 lines


SVN can ignore the test output files (*.out)

........

r2739 | khunter | 2010-06-29 09:54:03 -0600 (Tue, 29 Jun 2010) | 7 lines


Tests apparently remove their own output files.


Also change quadratic test to only use CPlex. I'll note in passing
that we need to figure out a way to selectively run tests on
platforms that have capabilities, as opposed to the reverse that we
apparently do currently.

........

r2741 | wehart | 2010-06-29 22:15:42 -0600 (Tue, 29 Jun 2010) | 3 lines


Adding an '-i' option to the Pyomo commandline. This drops
Pyomo down into an interactive shell after the solve.

........

r2743 | khunter | 2010-06-30 10:09:10 -0600 (Wed, 30 Jun 2010) | 2 lines


Change test to jive with recent format update.

........

r2744 | khunter | 2010-06-30 12:51:09 -0600 (Wed, 30 Jun 2010) | 2 lines


NFC: white space removal

........

r2745 | khunter | 2010-06-30 12:53:02 -0600 (Wed, 30 Jun 2010) | 6 lines


Initial foray of an OSiL writer.


Also added a test, minimal as it is. Unfortunately, the test is not
yet in the YAML format toward which we'd like to move, but that's
RSN, I'm sure.

........

r2748 | khunter | 2010-06-30 13:07:41 -0600 (Wed, 30 Jun 2010) | 7 lines


Organize Pyomo CLI options.


Alphabetize and split CLI options into logical groups. Also, split
long lines with the backslash continuation so as to fit in the
standard 80-column width. (Play nice with people who /don't/ have
1000 inch screens!)

........

r2749 | khunter | 2010-06-30 13:15:07 -0600 (Wed, 30 Jun 2010) | 5 lines


Add (for real) updated test of OSiL writer.


I added the baseline text for the OSiL writer test in r2745, but
forgot to actually update the test driver. Fixed.

........

r2750 | khunter | 2010-06-30 14:17:03 -0600 (Wed, 30 Jun 2010) | 6 lines


NFC


Remove forgotten about debugging comments (# lines), add colons to
TODO markers so Hudson picks 'em up, and use backslash line
continuation to turn long lines into 80-character max lines.

........

r2751 | prsteel | 2010-06-30 15:27:06 -0600 (Wed, 30 Jun 2010) | 16 lines


Added support for standard form conversion.


Instantiated Pyomo models now have preliminary support for creating
the standard form matrix representation of the model. MIPs are
converted to their LP relaxation implicitly.


TODO: Separate the creation of the standard form data and the printing
of it.


TODO: Support numpy arrays.


TODO: Write test cases to verify output.


TODO: Use this matrix representation to compute dual variables.

........

r2752 | prsteel | 2010-06-30 15:29:24 -0600 (Wed, 30 Jun 2010) | 9 lines


Provies a workaround for the Python 2.4 copy.deepcopy() bugs.


Utilizes YAML to effectively serialize models rather than using
copy.deepcopy() when Python versions 2.4.X are detected.


TODO: Test this on a full Python 2.4-based Coopr install.

........

r2753 | khunter | 2010-07-01 07:55:24 -0600 (Thu, 01 Jul 2010) | 2 lines


NFC: import reorganization and cruft removal

........

r2754 | khunter | 2010-07-01 08:11:16 -0600 (Thu, 01 Jul 2010) | 2 lines


NFC: minor optimization refactor

........

r2755 | khunter | 2010-07-01 08:23:02 -0600 (Thu, 01 Jul 2010) | 2 lines


Minor error handling and test refactorization.

........

r2756 | khunter | 2010-07-01 08:30:41 -0600 (Thu, 01 Jul 2010) | 8 lines


Refactor line width constraint with TextWrapper?


The TextWrapper? should provide a more robust solution than our
current "make it 5 terms long, and hope for the best." This also
should slightly speed output because there is only one write call
per expression now, and, even if streaming speed is a worry,
solvers can't use a partial expression.

........

r2757 | khunter | 2010-07-01 11:03:34 -0600 (Thu, 01 Jul 2010) | 2 lines


Mark _print_quadterm as @deprecated

........

r2758 | wehart | 2010-07-01 11:31:56 -0600 (Thu, 01 Jul 2010) | 3 lines


Clarifying the semantics of the '-i' flag
when IPython is not installed.

........

r2760 | wehart | 2010-07-02 08:03:20 -0600 (Fri, 02 Jul 2010) | 2 lines


Adding logic to use an interactive shell when IPython is not installed.

........

r2761 | wehart | 2010-07-02 08:11:34 -0600 (Fri, 02 Jul 2010) | 2 lines


Fixing the dictionary of variables that is passed in.

........

r2762 | khunter | 2010-07-03 15:07:55 -0600 (Sat, 03 Jul 2010) | 6 lines


On the road to Coopr with Python 2.4


First things first: some naive and not-so-naive tricks to conform to
80 character width code. Otherwise it's much harder to work with on
my small laptop screen ...

........

r2763 | khunter | 2010-07-03 15:17:06 -0600 (Sat, 03 Jul 2010) | 5 lines


On the road to Coopr with Python 2.4


Remove some naive Python 2.4 no-isms. This gives way to larger
issues.

........

r2765 | khunter | 2010-07-04 19:51:14 -0600 (Sun, 04 Jul 2010) | 8 lines


On the road to Coopr with Python 2.4


Another NFC: Another couple of naive and not-so-naive tricks to
bring to 80 character width code. In the process removed a couple
of isinstance calls (constraint.py) and remembered (haduh!) some
XOR logic (cpxlp). Was too late when I saw the deprecated around
the function in question, but oh well; iteration is good, right?

........

r2766 | khunter | 2010-07-04 21:18:49 -0600 (Sun, 04 Jul 2010) | 6 lines


On the road to Coopr with Python 2.4


Whoops! Forgot to commit this with the previous patch. Same NFC,
but was able to remove a few redundant checks thanks to better
formatting. Also cleaned up init of ParamValue?.

........

r2767 | khunter | 2010-07-04 22:17:02 -0600 (Sun, 04 Jul 2010) | 4 lines


On the road to Coopr with Python 2.4


One more NFC that should have been committed two patches ago,

........

r2768 | khunter | 2010-07-04 22:34:56 -0600 (Sun, 04 Jul 2010) | 10 lines


On the road to Coopr with Python 2.4


  • Reduce check to 2.4+ in the Pyomo initial script
  • YAML was also refusing to copy. So, for an initial run, let's

stick with deepcopy. If running against Python 2.4, add
deepcopy functions to classes and objects that have trouble

doing the automatic thing.

  • Since I needed some "guarantees" anyway, cleaned up another init (_VarBase)

........

r2769 | khunter | 2010-07-04 22:45:57 -0600 (Sun, 04 Jul 2010) | 2 lines


Per #3942, the CPlex line limit is apparently 510 characters, not 512.

........

r2770 | khunter | 2010-07-05 00:39:15 -0600 (Mon, 05 Jul 2010) | 2 lines


Typo fix in function change.

........

r2773 | wehart | 2010-07-05 15:31:51 -0600 (Mon, 05 Jul 2010) | 2 lines


Adding a new plugin to apply model instance transformations.

........

r2782 | prsteel | 2010-07-12 10:19:29 -0600 (Mon, 12 Jul 2010) | 4 lines


A standard form transformation.


Given a model M, StandardForm?(M) returns a new model with only equality constraints.

........

r2783 | prsteel | 2010-07-12 12:14:57 -0600 (Mon, 12 Jul 2010) | 7 lines


Primarily separates the definition of Objective and Constraint into
their own file, namely objective.py and constraint.py. Small changes
made to PyomoModel?.py to reflect this change.


Minor fixes to PyomoModel?.py with respect to standard form printing.

........

r2784 | prsteel | 2010-07-12 12:26:31 -0600 (Mon, 12 Jul 2010) | 4 lines


Necessary import for objective.py. Allow for from coopr.pyomo.base
import Objective.

........

r2785 | prsteel | 2010-07-12 12:45:08 -0600 (Mon, 12 Jul 2010) | 4 lines


More dependency updates from splitting Constraint and Objective
definitions.

........

r2786 | prsteel | 2010-07-13 09:07:35 -0600 (Tue, 13 Jul 2010) | 9 lines


Support for generalized sums over k sets, like in AMPL.


Added: multisum


Usage:


sum(model.A[i,j,k,...] for (i,j,k,...) in multisum(setI, setJ, setK, ...))

........

r2787 | prsteel | 2010-07-13 13:17:03 -0600 (Tue, 13 Jul 2010) | 2 lines


Migrate 2.(<5) deepcopy fix for Objective from constraint.py to objective.py.

........

r2788 | prsteel | 2010-07-13 13:17:57 -0600 (Tue, 13 Jul 2010) | 2 lines


Removing the code migrated in previous fix.

........

r2789 | prsteel | 2010-07-13 13:47:44 -0600 (Tue, 13 Jul 2010) | 34 lines


Updates to var.py to allow indexed variables to contain both
continuous and discrete variables. This is accomplished by allowing
the 'within' and 'domain' keywords to accept a rule that return the
set each variable should be a part of. These changes should be mostly
transparent to the user unless they seek out this functionality.


-- API changes --


The methods


is_binary
is_integer
is_continuous


have been removed from _VarBase objects, as they no longer have any
meaning. Useful replacements


binary_keys
integer_keys
continuous_keys


have been added that return all indices of the desired type.


The 'within' and 'domain' keyword arguments in the Var constructor now
accept rules.


-- Potential side effects --


Problem writers need to realize that they can no longer query a
_VarArray for the domain of all its variables; instead, they must ask
each variable individually. The cpxlp writer has already been modified
to account for this.

........

r2793 | jwatson | 2010-07-13 19:55:03 -0600 (Tue, 13 Jul 2010) | 3 lines


Reverting cpxlp.py to version 2763 and adding back in the VarStatus? import, to fix the issue with the quadratic term writer when executing runph in PySP.

........

r2794 | khunter | 2010-07-14 11:38:07 -0600 (Wed, 14 Jul 2010) | 3 lines


Revert cpxlp back to 2792, initially broken. The next commit will
have the necessary fixes.

........

r2795 | khunter | 2010-07-14 11:43:05 -0600 (Wed, 14 Jul 2010) | 3 lines


Add missing VarStatus?, broken since r2753, where is used to be
pulled in by an import *.

........

r2796 | khunter | 2010-07-14 11:44:52 -0600 (Wed, 14 Jul 2010) | 5 lines


A refactor at r2765 lost a sign. Correct oversight. Now
test.coopr's only failure is because of deprecated warnings, which
is acceptable. (Means we need to stop using that deprecated
function! :-) )

........

r2797 | prsteel | 2010-07-14 12:26:58 -0600 (Wed, 14 Jul 2010) | 8 lines


Adding EqualityTransform?, which creates an equivalent form of a model
by replacing inequlity constraints with equality constraints and slack
and excess variables.


Various fixes regarding var.py, specifically to allowing a set of
variables to have different domains.

........

r2798 | prsteel | 2010-07-14 14:18:36 -0600 (Wed, 14 Jul 2010) | 3 lines


Base class for isomorphic transformations.

........

r2799 | khunter | 2010-07-14 14:19:26 -0600 (Wed, 14 Jul 2010) | 11 lines


Refs #3881: "CPlex LP line length enforcement"


Formally enforce CPlex's arbitrary 510 char line length limit CPlex.
This still fails to test or properly mangle 255-character
identifiers, but that might be enforceable at a different layer.
Haven't completely through that one out yet.


Of note, this commit also assumes that if people are going to want
to read the LP files, it tries its best to stick to 80 characters
wide (good for screen reading and printing to paper).

........

r2802 | khunter | 2010-07-15 10:08:03 -0600 (Thu, 15 Jul 2010) | 7 lines


Fix bug with interaction between wordwrap and CPlex


CPlex apparently doesn't like dangling '+' and '-' symbols at the
end of a line, regardless of if they're connected to a variable or
constant on the next line. Fix: remove whitespace following those
symbols.

........

r2803 | khunter | 2010-07-15 10:18:54 -0600 (Thu, 15 Jul 2010) | 8 lines


Forgot to do due diligence in checking my previous patch.


Added an intermediary test variable, now removed.


Also should have mentioned in last commit (and should have done it
in a different commit!) that I fixed a logic error that I introduced
in r2765.

........

r2804 | prsteel | 2010-07-15 11:14:01 -0600 (Thu, 15 Jul 2010) | 11 lines


Added a utility module for model transformations, util.py.


Currently contains one 'public' method, collectAbstractComponents,
which is used to traverse a model and collect all attribute names and
values which can then be used to first create a model transformation,
and then to create a mapping between the original model and
transformed model so the transformed problem can construct itself
after the original model has been constructed.

........

r2805 | prsteel | 2010-07-15 14:03:15 -0600 (Thu, 15 Jul 2010) | 49 lines


New class heirarchy for model transformations.


Heirarchy:


Transformation

=============================================


Note that each group encompasses all possible transformations;
specifically, every transformation is either linear or not linear,
abstract or not abstract, and isomorphic or not isomorphic. Derived
transformations are designed to multiply inherit. Failing to inherit
from one group shows indifference to that group.


Examples:


LP Dual


A linear programming dual transformation would inherit from both
IsomorphicTransformation? and LinearTransformation?, but it is
unimportant (in principle) whether it is an abstract or concrete
transformation.


Identity


An identity transformation would only inherit from
IsomorphicTransformation? (again, in principle)


Relaxing Integrality


Relaxing integrality constraints would be a
NonIsomorphicTransformation?, since in general the new problem has a
different feasible region and optimal solution.


Practical Notes:


All the examples given were indifferent with respect to abstract
vs. concrete transformations, but in practice transformations will
need to be implemented quite differently based on the
abstract/concrete nature of the original problem.

........

r2806 | prsteel | 2010-07-15 14:04:54 -0600 (Thu, 15 Jul 2010) | 3 lines


Update import definitions.

........

r2807 | prsteel | 2010-07-15 14:07:25 -0600 (Thu, 15 Jul 2010) | 2 lines


More import updates.

........

r2811 | prsteel | 2010-07-16 13:32:41 -0600 (Fri, 16 Jul 2010) | 6 lines


Added the ability to filter set elements after construction by
specifying the attribute 'filter'.


Re-formatted _BaseSet.init.

........

r2812 | prsteel | 2010-07-16 17:42:15 -0600 (Fri, 16 Jul 2010) | 2 lines


Fixes an off-by-one error when removing an element from an ordered set.

........

r2813 | prsteel | 2010-07-16 17:47:41 -0600 (Fri, 16 Jul 2010) | 6 lines


Added test cases for 'filter' capability of sets.


Added test case for proper element removal from ordered sets (behavior
of which was recently corrected).

........

r2814 | khunter | 2010-07-16 17:48:16 -0600 (Fri, 16 Jul 2010) | 2 lines


Another SOS example, this time with SOS2.

........

r2819 | prsteel | 2010-07-20 09:52:09 -0600 (Tue, 20 Jul 2010) | 3 lines


Preliminary commit for nonnegativity transform. Not complete.

........

r2820 | prsteel | 2010-07-20 11:30:14 -0600 (Tue, 20 Jul 2010) | 3 lines


Small change to Set.eq method. Was failing on non-set comparisons; i.e., Set() == 1.0 raised an error rather than returning False.

........

r2821 | prsteel | 2010-07-20 11:46:14 -0600 (Tue, 20 Jul 2010) | 2 lines


Added isfunctor, which returns True iff its one argument is callable.

........

r2822 | jwatson | 2010-07-20 11:46:14 -0600 (Tue, 20 Jul 2010) | 3 lines


Fixing error message during model generation process. The declaration construction process was *outside* of the associated try-catch block, so the users weren't seeing any error message and didn't know where to look in their model.

........

r2823 | prsteel | 2010-07-20 11:48:45 -0600 (Tue, 20 Jul 2010) | 2 lines


Rule detection did not properly check for callable objects. Previously inspect.isroutine was used, which does not check for functors. Replaced with isfunctor, defined in coopr.pyomo.base.util.

........

r2824 | jwatson | 2010-07-20 12:28:08 -0600 (Tue, 20 Jul 2010) | 3 lines


Improving error message to help identification of constraint construction issue.

........

r2826 | prsteel | 2010-07-20 16:41:55 -0600 (Tue, 20 Jul 2010) | 6 lines


Previous constraint rules were required to be function objects, rather
than more general functors. This requirement has been changed, at the
expense of losing the ability to return a dictionary mapping
constraint indices to constraint expressions.

........

r2827 | khunter | 2010-07-21 11:21:59 -0600 (Wed, 21 Jul 2010) | 2 lines


Forgotten SOS wordwrap handling as mostly fixed in r2799.

........

r2828 | khunter | 2010-07-21 11:53:27 -0600 (Wed, 21 Jul 2010) | 5 lines


Only remove a try-except code wrap. It's not necessary because we
raise an error anyway, so it should be clear that an LP file was not
written. Big change, but the only difference is the ensuing
indentation fixage.

........

r2829 | khunter | 2010-07-21 12:06:26 -0600 (Wed, 21 Jul 2010) | 5 lines


Fix Patrick's gripe about error output and '<Plugin ...>' string
representation of objectives and constraints, as opposed to using
the .name attribute. Prettification to help endusers is def. a
good thing.

........

r2830 | khunter | 2010-07-21 12:10:04 -0600 (Wed, 21 Jul 2010) | 2 lines


NFC: Removed unused variable.

........

r2831 | khunter | 2010-07-21 12:14:35 -0600 (Wed, 21 Jul 2010) | 3 lines


Refs r2799: one more whoopso. Would have caught this if we had any
tests to excercise the SOS constraints and LP output.

........

r2839 | prsteel | 2010-07-23 09:51:05 -0600 (Fri, 23 Jul 2010) | 3 lines


Added implementation specification to IDataManager based on the body of data/ampl.py.

........

r2840 | prsteel | 2010-07-23 10:30:41 -0600 (Fri, 23 Jul 2010) | 2 lines


Updated function parameters in IDataManager.

........

r2841 | prsteel | 2010-07-23 15:35:01 -0600 (Fri, 23 Jul 2010) | 5 lines


Introduces SharedComponent? objects, which are designed to be
efficiently shared between multiple Model instances.


Makes relevant changes to pyomo/base classes.

........

r2843 | prsteel | 2010-07-23 16:01:23 -0600 (Fri, 23 Jul 2010) | 2 lines


SharedComponent? no longer inherits from Plugin. Import fixes.

........

r2844 | prsteel | 2010-07-23 16:03:32 -0600 (Fri, 23 Jul 2010) | 2 lines


'from coopr.pyomo import *' now import Component and SharedComponent?.

........

r2845 | prsteel | 2010-07-23 16:04:26 -0600 (Fri, 23 Jul 2010) | 2 lines


More import fixes.

........

r2846 | prsteel | 2010-07-23 16:15:08 -0600 (Fri, 23 Jul 2010) | 2 lines


Pass "ctype" arguments.

........

r2847 | jwatson | 2010-07-23 16:31:06 -0600 (Fri, 23 Jul 2010) | 3 lines


Adding alias to avoid plugin "issues" in shared param definitions.

........

r2848 | jwatson | 2010-07-23 16:31:54 -0600 (Fri, 23 Jul 2010) | 3 lines


Forgot an export in the last commit.

........

r2849 | prsteel | 2010-07-23 16:57:43 -0600 (Fri, 23 Jul 2010) | 6 lines


Added SharedSet? class.


Removed 'alias' calls from subclasses of SharedParam?, as this behavior
is mimicked in the non-shared versions.

........

r2850 | prsteel | 2010-07-23 17:01:13 -0600 (Fri, 23 Jul 2010) | 2 lines


Import updates.

........

r2851 | prsteel | 2010-07-23 17:02:14 -0600 (Fri, 23 Jul 2010) | 2 lines


Adds missing class.

........

r2858 | prsteel | 2010-07-27 14:48:15 -0600 (Tue, 27 Jul 2010) | 3 lines


Fixes _VarValue bounds bug. Prior to this fix, explicit bounds overrode domains defined by rules. Resolves ticket 4101.

........

r2859 | prsteel | 2010-07-27 14:51:52 -0600 (Tue, 27 Jul 2010) | 2 lines


Updates RangeSet? bounds after post-construction filtering.

........

r2860 | prsteel | 2010-07-27 15:02:03 -0600 (Tue, 27 Jul 2010) | 2 lines


Nonnegativity transformation, and associated tests.

........

r2861 | prsteel | 2010-07-27 15:14:55 -0600 (Tue, 27 Jul 2010) | 2 lines


Lingering fringe case bug. Test case to follow, possibly via StandardForm? tests.

........

r2862 | prsteel | 2010-07-27 15:58:43 -0600 (Tue, 27 Jul 2010) | 4 lines


Added tests for transformation of Constraint objects through NonNegativeTransformation? transformations.

........

r2863 | prsteel | 2010-07-27 16:17:40 -0600 (Tue, 27 Jul 2010) | 2 lines


StandardForm? transformation, associated tests, and necessary big fix for EqualityTransformation?. Bug fix is tested by this set of tests.

........

r2864 | prsteel | 2010-07-27 16:25:01 -0600 (Tue, 27 Jul 2010) | 2 lines


Import updates.

........

r2865 | wehart | 2010-07-27 18:05:29 -0600 (Tue, 27 Jul 2010) | 6 lines


Adding a Block component, which is a base class for Model.


Note that this is a preliminary implementation. I haven't added added logic for recursing through subblocks.
To retain backwards compatibility, we don't need that functionality.

........

r2867 | prsteel | 2010-07-28 09:11:25 -0600 (Wed, 28 Jul 2010) | 12 lines


Updated test cases for set equality and inequality.


Original test cases (#1, #2) relied upon a TypeError? being thrown,
which is no longer the case. These two tests now properly check for
equality and inequality between empty and non-empty sets.


Added test_equality_3, which tests set equality and inequality between
various Set and non-Set objects. This is actually an overdue test case
for revision #2820, which stopped Pyomo from failing when comparing
Set and non-Set objects.

........

r2868 | prsteel | 2010-07-28 09:17:15 -0600 (Wed, 28 Jul 2010) | 6 lines


Updates to the `alias' function calls in SharedParam? and SharedSet?
objects. Updates to the test_pyomo.py example output that reflects
these two new Model Components.

........

r2869 | prsteel | 2010-07-28 09:24:00 -0600 (Wed, 28 Jul 2010) | 5 lines


Updates to Var and NonNegativeTransformation? objects. Var objects were
failing on some bounds checks, and NonNegativeTransformation? objects
had a scoping issue.

........

r2870 | prsteel | 2010-07-28 09:52:47 -0600 (Wed, 28 Jul 2010) | 7 lines


Updates error handling during construction. Model objects were
converting all errors raised during construction to `RuntimeError?'
exceptions. A clause was put in to catch `ValueError?' exceptions,
which passes on identical exceptions aside from their type.

........

r2871 | prsteel | 2010-07-28 10:17:16 -0600 (Wed, 28 Jul 2010) | 2 lines


functools module is not available in all versions of Python, namely 2.4. Define relevant function `partial' in the case of an import failure.

........

r2872 | prsteel | 2010-07-28 11:45:11 -0600 (Wed, 28 Jul 2010) | 5 lines


Resolves issues with repeated call to identify_vars. The _varmap
attribute was not getting reset, so cloned models could have problems
with variable references.

........

r2873 | prsteel | 2010-07-28 11:46:32 -0600 (Wed, 28 Jul 2010) | 2 lines


Updates exported functions.

........

r2874 | prsteel | 2010-07-28 11:49:09 -0600 (Wed, 28 Jul 2010) | 7 lines


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


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


M standard_form.py

........

r2875 | prsteel | 2010-07-28 11:57:45 -0600 (Wed, 28 Jul 2010) | 2 lines


Fix variable declarations in option processing.

........

r2876 | prsteel | 2010-07-28 16:53:30 -0600 (Wed, 28 Jul 2010) | 3 lines


Initial commit for DualTransformation? transformation. Not yet complete.

........

r2877 | prsteel | 2010-07-28 16:54:42 -0600 (Wed, 28 Jul 2010) | 5 lines


Migrated definition of partial to util.py, where it is properly
wrapped for deepcopying and guarded against failed imports for Python
2.4.

........

r2878 | wehart | 2010-07-28 22:28:37 -0600 (Wed, 28 Jul 2010) | 2 lines


Updating baselines.

........

r2879 | prsteel | 2010-07-29 09:13:55 -0600 (Thu, 29 Jul 2010) | 3 lines


Updates to locations of function definitions.

........

r2880 | jwatson | 2010-07-29 09:32:07 -0600 (Thu, 29 Jul 2010) | 3 lines


Commenting out the deprecated issue, as I won't be able to fix this for the next 1.5 weeks, and our users have complained that the message is annoying. I'm taking the tact that "the user is always right". And they are, by definition.

........

r2881 | prsteel | 2010-07-29 09:43:29 -0600 (Thu, 29 Jul 2010) | 5 lines


Updated alias definition of Block to match baseline tests.


Updated import symantics to cut down two verbose code statements.

........

r2882 | claird | 2010-07-29 11:35:45 -0600 (Thu, 29 Jul 2010) | 1 line


Added nonlinear support to pyomo. This includes new intrinsic functions and new NL writer as well as corresponding tests

........

r2883 | claird | 2010-07-29 12:33:46 -0600 (Thu, 29 Jul 2010) | 1 line


Fixed typos in util related to disabling the creation of the canonical representation

........

r2884 | prsteel | 2010-07-29 16:12:08 -0600 (Thu, 29 Jul 2010) | 4 lines


Update to expression parsing; transformation was erroneously assuming
_IdentityExpression objects could not contain variables.

........

r2885 | khunter | 2010-07-29 17:35:10 -0600 (Thu, 29 Jul 2010) | 6 lines


Refs #4104 "Multiple Objectives"


Temporarily raise an error when a user tries to use multiple
objectives with an LP file. More generally, how do we handle
multiple objectives?

........

r2886 | prsteel | 2010-07-29 17:44:40 -0600 (Thu, 29 Jul 2010) | 2 lines


Comment changes.

........

r2887 | prsteel | 2010-07-29 17:46:23 -0600 (Thu, 29 Jul 2010) | 5 lines


Provisionally working dual transform. Has not been rigorously tested
(and no test cases have been committed) but it succeeds for all of the
small number of problems tested.

........

r2888 | prsteel | 2010-07-29 17:53:47 -0600 (Thu, 29 Jul 2010) | 2 lines


Updated logic for partial function for Python 2.4 and older.

........

r2889 | khunter | 2010-07-29 17:59:31 -0600 (Thu, 29 Jul 2010) | 2 lines


Asking for a non-existent objective key no longer results in an unhandled error. Now we "play" nice.

........

r2890 | khunter | 2010-07-29 18:06:04 -0600 (Thu, 29 Jul 2010) | 3 lines


Be a little more explicit about /which/ is the problem objective
(and indices). Helpful error messages are a good thing ...

........

r2891 | prsteel | 2010-07-30 11:14:46 -0600 (Fri, 30 Jul 2010) | 4 lines


Updated definitions of new indices to resolve bug related to unpacking
tuples in indices.

........

r2892 | prsteel | 2010-07-30 11:15:49 -0600 (Fri, 30 Jul 2010) | 2 lines


Update to transformation priority in StandardForm? transformations.

........

r2893 | prsteel | 2010-07-30 13:05:36 -0600 (Fri, 30 Jul 2010) | 2 lines


Major refactor. Much less of a memory sink now.

........

r2894 | khunter | 2010-07-30 14:00:30 -0600 (Fri, 30 Jul 2010) | 3 lines


Improve error message, hopefully make it a little more clear what
the constraint rule should return.

........

r2895 | wehart | 2010-07-30 14:11:04 -0600 (Fri, 30 Jul 2010) | 2 lines


Portability bug fix.

........

r2896 | khunter | 2010-07-30 14:15:36 -0600 (Fri, 30 Jul 2010) | 4 lines


Flush out an error message ad nausem. As a dev, I spent three
minutes trying to figure this out. Was returning an expression,
not an equation, but it /looked/ right.

........

r2898 | prsteel | 2010-07-30 17:17:34 -0600 (Fri, 30 Jul 2010) | 3 lines


Small syntax error fixed.

........

r2899 | prsteel | 2010-07-30 17:58:20 -0600 (Fri, 30 Jul 2010) | 23 lines


Fixes an apparent bug.


Before, arithmetic operations on expressions were defined to operate
in-place, which causes issues when manipulating expressions. For example,


foo = model.X + model.Y
for x in xrange(0,10):

print foo + model.X


would in fact manipulate the expression foo. As this is believed to be
undesirable (and was motivated by a specific use case, namely model
transformations) it has been changed to return a clone of the
expression in question.


One test case failed as a side effect of this change, and a correction
was made to resolve this. This correction was also inside expr.py. The
problem was that the ._nargs attribute of _SumExpression objects was
not copied on .clone() calls. This has been changed. NOTE: it is not
known whether a similar fix must be made to product expressions. No
test cases are failing now, but this must be resolved.

........

r2900 | khunter | 2010-08-02 13:03:31 -0600 (Mon, 02 Aug 2010) | 3 lines


Whoops, we don't support constructs like "return a <= b <= c".
Let's not advertise it.

........

r2901 | prsteel | 2010-08-02 15:14:53 -0600 (Mon, 02 Aug 2010) | 2 lines


Bug fix in error message.

........

r2905 | khunter | 2010-08-03 12:54:23 -0600 (Tue, 03 Aug 2010) | 2 lines


NFC: Whitespace only to unobfuscate next changes

........

r2906 | khunter | 2010-08-03 13:04:56 -0600 (Tue, 03 Aug 2010) | 4 lines


A few more models now run with Python 2.4. Still more tests to fix, but we're
farther down the road now. Notably, this commit requires and update of
Pyutilib.misc as well.

........

r2907 | prsteel | 2010-08-03 13:08:18 -0600 (Tue, 03 Aug 2010) | 13 lines


The cpxlp writer did not allow constant objectives to be printed
out, which precluded solving feasibility problems. Changed the
behavior to output "obj: +0.0 ONE_VAR_CONSTANT" since that dummy
variable was already acting in a similar fashion as a placeholder for
empty constraint blocks.


Note that this does introduce "ONE_VAR_CONSTANT" as a 'variable' in
the result object of problems involving constant objectives. If this
should cause issues with users parsing the result objects, we can
teach them to ignore "ONE_VAR_CONSTANT" entries.

........

r2908 | khunter | 2010-08-03 15:38:06 -0600 (Tue, 03 Aug 2010) | 7 lines


On the road to Coopr with Python 2.4:


$ test.coopr coopr.pyomo

-> Reduced to 5 failures.


The rest are output errors. Let's see what Hudson does with this.

........

r2911 | prsteel | 2010-08-06 16:51:12 -0600 (Fri, 06 Aug 2010) | 11 lines


Changes to allow Block objects to contain other Block objects.


Added self.domain = None in Block.init as a temporary workaround
to ticket #4108.


Changed logic in _setattr_exec to avoid infinite recursion when
assigning Block objects to Block objects.


Clarified logic in setattr.

........

r2912 | wehart | 2010-08-06 22:00:24 -0600 (Fri, 06 Aug 2010) | 2 lines


Reworking tests to create separate tests for each *.py file.

........

r2913 | wehart | 2010-08-06 22:15:40 -0600 (Fri, 06 Aug 2010) | 4 lines


Adding NL tests to the set that is found by the Coopr tester.


Fixing bug: pyomo_test was treated as a test method by nose.

........

r2914 | prsteel | 2010-08-09 15:29:32 -0600 (Mon, 09 Aug 2010) | 5 lines


Fixes bug in error-catching routine. Previously, errors were raised
via raise some_string', rather than raise some_exception,
some_string'.

........

r2915 | wehart | 2010-08-09 15:51:20 -0600 (Mon, 09 Aug 2010) | 2 lines


Reverting class decorator syntax.

........

r2916 | claird | 2010-08-10 15:16:20 -0600 (Tue, 10 Aug 2010) | 1 line


Added necessary import to PyomoModel?.py. NL writer was failing.

........

r2920 | prsteel | 2010-08-11 09:10:03 -0600 (Wed, 11 Aug 2010) | 3 lines


Added documentation for SOSConstraint objects.

........

r2921 | jwatson | 2010-08-11 20:05:35 -0600 (Wed, 11 Aug 2010) | 3 lines


Added output to set construct() methods when pyomo is in debug mode, mirroring Params/Constraint?/etc. This is invaluable in debugging large-scale models, where some alternative forms of initialization (e.g., rule-based) are higher-performing - often by large margins - than others. As with Param/Constraint?, currently using the pyomo.debug("verbose") check to implement conditional output. Ultimately, we want to use Python native logging mechanisms, but that will require a major overhaul.

........

r2922 | jwatson | 2010-08-11 22:02:55 -0600 (Wed, 11 Aug 2010) | 3 lines


Fixed error message encountered in _ParamValue constructor when supplied with a value that doesn't match the parameter domain, e.g., NonNegativeReals?. The error string was improperly formatted.

........

r2928 | wehart | 2010-08-14 14:33:27 -0600 (Sat, 14 Aug 2010) | 3 lines


Return a Container instance rather than None when an error
occurred while setting up the environment.

........

r2929 | wehart | 2010-08-14 15:13:51 -0600 (Sat, 14 Aug 2010) | 3 lines


Update of baseline to include additional output
from the construction of index sets.

........

r2930 | wehart | 2010-08-14 15:20:11 -0600 (Sat, 14 Aug 2010) | 7 lines


Rework of mechanism to disable the generation of
canonical representations for ASL solvers. The earlier
mechanism disabled the plugin, which impacted future
solves.


NOTE: ticket #4112 concerns a better fix for this mechanism.

........

r2932 | wehart | 2010-08-14 15:54:51 -0600 (Sat, 14 Aug 2010) | 2 lines


Categorizing slow transformation tests as 'nightly'

........

Location:
coopr.pyomo/stable/2.4
Files:
46 edited
422 copied