Bounded bug with SPs
See original GitHub issueHello again! This time I have a less trivial issue.
I have a model that solves using a standard signomial solve. It’s in gpkit-models
, d8fuselage
branch;
the file is~\gpkit-models\gpkitmodels\aircraft\d8fuselage.py
.
The implementation that solves is:
M = Fuselage()
sol = M.localsolve("mosek",tolerance = 0.01, verbosity = 1, iteration_limit=50)
But when I do this:
M = Fuselage()
M = Model(M.cost, BCS(M)) #Using BoundedConstraintSet
sol = M.localsolve("mosek",tolerance = 0.01, verbosity = 1, iteration_limit=50)
Then it gives me this:
TypeError Traceback (most recent call last)
<ipython-input-9-defd0f9cf008> in <module>()
----> 1 M.localsolve('mosek')
c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\prog_factories.pyc in s
olvefn(self, solver, verbosity, skipsweepfailures, *args, **kwargs)
89 if "sweepvariables" in solution:
90 solution["variables"].update(solution["sweepvariables"])
---> 91 self.process_solution(solution)
92 self.solution = solution # NOTE: SIDE EFFECTS
93 return solution
c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\set.pyc in process_solu
tion(self, sol)
285 When x0 is none, may return a default guess."""
286 gpconstrs = [constr.as_gpconstr(x0) for constr in self]
--> 287 return ConstraintSet(gpconstrs, self.substitutions)
288
289 def process_solution(self, sol):
c:\users\berk\dropbox (mit)\mit graduate school\code\gpkit\gpkit\constraints\bounded.pyc in process_
solution(self, sol)
81 out = defaultdict(list)
82 for i, varkey in enumerate(self.bounded_varkeys):
---> 83 lam_gt, lam_lt = lam[2*i], lam[2*i+1]
84 if abs(lam_gt) >= 1e-7: # arbitrary threshold
85 out["sensitive to upper bound"].append(varkey)
TypeError: 'NoneType' object has no attribute '__getitem__'
For some odd reason, it believes that sol is a NoneType object (doesn’t exist!). Don’t understand why… But it does make it a pain to try to use BoundedConstraintSet at the moment. Let me know what the issue is!
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Bugs on sps | REEF2REEF Saltwater and Reef Aquarium Forum
My tank is sps dominant and so far only this colony is affected. But like everyone else will say, if one sps is...
Read more >Signs of Pests and Distress in SPS Coral: What to Look For.
We're adding one final shipment of SPS coral to the FRAG 105.4, courtesy of World Wide Corals. Join us as we discuss the...
Read more >Bed Bugs and Schools - Maine.gov
Bed bugs are a nuisance and can cause considerable discomfort, but their bites are not known to spread disease. Bed bugs are usually...
Read more >Bed Bug Fact Sheet for Condominium and Cooperative ...
Bed bugs can be found in homes, condominium and cooperative buildings, apartments, hotels, schools, dormitories, shelters, offices and many ...
Read more >Finding Crash-Consistency Bugs with Bounded Black-Box ...
Abstract: We present a new approach to testing file-system crash consistency: bounded black-box crash testing (B3). B3 tests the file system in a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Does not occur on
master
. @1ozturkbe, please reopen if you can reproduce this on master!@1ozturkbe, markdown formatting for python code can be done like this:
I’ve done that already for your post above.