Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
264 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import numpy as np | ||
from gpkit import * | ||
|
||
x = Variable("x", choices=range(1,4)) | ||
num = Variable("numerator", np.linspace(0.5, 7, 11)) | ||
|
||
m = Model(x + num/x) | ||
sol = m.solve(verbosity=0) | ||
|
||
print(sol.table()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
|
||
Optimal Cost | ||
------------ | ||
[ 1.41 2.14 2.68 3.13 ... ] | ||
|
||
~~~~~~~~ | ||
WARNINGS | ||
~~~~~~~~ | ||
Freed Choice Variables | ||
---------------------- | ||
This model has the discretized choice variables [x], but since the 'cvxopt' solver doesn't support discretization they were treated as continuous variables. | ||
~~~~~~~~ | ||
|
||
Swept Variables | ||
--------------- | ||
numerator : [ 0.5 | ||
1.15 | ||
1.8 | ||
2.45 | ||
3.1 | ||
3.75 | ||
4.4 | ||
5.05 | ||
5.7 | ||
6.35 | ||
7 ] | ||
|
||
Free Variables | ||
-------------- | ||
x : [ 0.707 | ||
1.07 | ||
1.34 | ||
1.57 | ||
1.76 | ||
1.94 | ||
2.1 | ||
2.25 | ||
2.39 | ||
2.52 | ||
2.65 ] | ||
|
||
Variable Sensitivities | ||
---------------------- | ||
numerator : [ +0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 | ||
+0.5 ] | ||
|
||
Most Sensitive Constraints (in last sweep) | ||
------------------------------------------ | ||
(none) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.