Ticket #98 (closed idea: worksforme)
add a constraint function generator with support for symbolic math
Reported by: | mmckerns | Owned by: | mmckerns |
---|---|---|---|
Priority: | minor | Milestone: | mystic-0.2a2 |
Component: | mystic.constraints | Keywords: | |
Cc: |
Description (last modified by mmckerns) (diff)
add support for symbolic math (i.e. sympy)
add a constraint function generator. should have the ability to turn symbolic math into a constraints function
Change History
comment:2 Changed 6 years ago by mmckerns
- Summary changed from add support for symbolic math to add a constraint function generator with support for symbolic math
- Description modified (diff)
- Milestone changed from mystic-dev to mystic-0.2a3
expanded slightly to cover ticket #122
comment:4 Changed 5 years ago by mmckerns
in building a constraints function, one should be able to also import required functions to evaluate the constraints...
implementation options/decisions:
- allow import statement in symbolic constraints string ?
- allow passing of relevant imported objects ?
- allow function generator to pull any imported function from globals() and locals() ?
comment:5 Changed 5 years ago by mmckerns
also look at diffpy.srfit's "equation" and "fitbase" at http://danse.us/trac/diffraction/browser/diffraction/diffpy.srfit/trunk/diffpy/srfit
comment:6 Changed 4 years ago by mmckerns
- Component changed from mystic.math to mystic.constraints
- Milestone changed from mystic-0.2a2 to mystic-0.2a3
comment:7 Changed 3 years ago by mmckerns
improved and added basic "symbolic to constrains" capabilities in the "decorate" branch in r611. Does not require sympy; however, with a little more work, sympy can be used to speed up the existing generated constraints solvers.
comment:8 Changed 3 years ago by mmckerns
sympy seems pretty limited when it comes to solving with a 'math' function like "x1 = cos(x2)"... and also when there's an inequality, although solving for inequalities in sympy seems to be improving as of late. Punting on sympy for a while seems to be a good plan.
Sympy also seems to not care about backward compatibility too much... so the functions that use sympy should be checked against a few versions of sympy.
Then maybe check out srfit's "equation" and "fitbase"... (see above entry)
from Chris Farrow:
Some follow-up: It looks like openopt.FuncDesigner might be able to satisfy my use case.