Skip to content

Commit

Permalink
clarify constraint differencing (#1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
bqpd committed Aug 8, 2020
1 parent 08b8c16 commit d7e04ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/source/examples/performance_modeling_output.txt
Expand Up @@ -104,14 +104,14 @@ Solution Diff (for selected variables)

Constraint Differences
**********************
--- removed in argument
+++ added in argument
--- only in argument
+++ not in argument

@@ -41,4 +41,3 @@
@@ -41,3 +41,4 @@
c = (S/A)^0.5
"parametrization of wing weight":
Aircraft.Wing.W >= S·Aircraft.Wing.rho
- Wburn[:] >= 0.2·D[:]
+ Wburn[:] >= 0.2·D[:]

**********************

Expand Down
4 changes: 2 additions & 2 deletions gpkit/solution_array.py
Expand Up @@ -384,8 +384,8 @@ def diff(self, other, showvars=None, *,
cdiff = ["Constraint Differences",
"**********************"]
cdiff.extend(difflib.unified_diff(
self.modelstr.split("\n"), other.modelstr.split("\n"),
fromfile="removed in argument", tofile="added in argument",
other.modelstr.split("\n"), self.modelstr.split("\n"),
fromfile="only in argument", tofile="not in argument",
lineterm="", n=3))
cdiff.insert(4, "")
cdiff += ["", "**********************", ""]
Expand Down

0 comments on commit d7e04ea

Please sign in to comment.