SignomialEquality with trust regions
See original GitHub issueI am trying to use a SignomialEqualityLinTrust and am getting the following error
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gpkit/constraints/set.pyc in as_gpconstr(self, x0)
181
182 When x0 is none, may return a default guess."""
--> 183 gpconstrs = [constr.as_gpconstr(x0) for constr in self]
184 return ConstraintSet(gpconstrs,
185 self.substitutions, recursesubs=False)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gpkit/constraints/set.pyc in as_gpconstr(self, x0)
181
182 When x0 is none, may return a default guess."""
--> 183 gpconstrs = [constr.as_gpconstr(x0) for constr in self]
184 return ConstraintSet(gpconstrs,
185 self.substitutions, recursesubs=False)
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gpkit/nomials/nomial_math.pyc in as_gpconstr(self, x0)
888 varkeys = set(mleft.varkeys).union(mright.varkeys)
889 bounding_constraints = [[self.trustregion <= Monomial(vk)/x0[vk],
--> 890 Monomial(vk)/x0[vk] <= 1/self.trustregion] for vk in varkeys]
891 return [bounding_constraints, mleft == mright]
892
I can run the example posted in #808 fine. This is the method throwing the error
def as_gpconstr(self, x0):
"Returns GP apprimxation of an SP constraint at x0"
#return self.left >= self.right
def _force_mono(posy):
if isinstance(posy, Monomial):
return posy
return posy.mono_lower_bound(x0)
mleft, mright = map(_force_mono, [self.left, self.right])
varkeys = set(mleft.varkeys).union(mright.varkeys)
bounding_constraints = [[self.trustregion <= Monomial(vk)/x0[vk],
Monomial(vk)/x0[vk] <= 1/self.trustregion] for vk in varkeys]
return [bounding_constraints, mleft == mright]
I’m not 100% sure but I think the problem is that no argument is being passed into _force_mono
@mopg this might be of interest to you
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (22 by maintainers)
Top Results From Across the Web
Application of Signomial Programming to Aircraft Design
Therefore, signomial equality constraints may require a trust region, making them the least desirable type of constraint. However, the signomial equality ...
Read more >(PDF) Comparison of Algorithms for Including Equality ...
PDF | Including equality constraints in signomial programming proves ... Trust region methods are proposed which perform comparably well to ...
Read more >Application of Signomial Programming ... - Convex Engineering
Therefore, signomial equality constraints may require a trust region, making them the least desirable type of constraint. However, the signomial equality ...
Read more >Signomial Programming — gpkit 1.1 documentation
Signomial programming finds a local solution to a problem of the form: ... the general smoothness and lack of a need for trust...
Read more >Exploiting convex structure in aircraft design optimization
Quality of Fit max−affine scaled softmax ... using signomial programming ... Fitting problem solved offline using trust region.
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
great, yes that will be interesting to understand better.
BTW, re: closing this, general guidance is to not close the issue until the fix is merged to master. That’s why @bqpd created the “waiting on PR” label.
Yes that is passing the initial guess.