On Jan 14, 11:08 pm, "Ondrej Certik" <ond...@certik.cz> wrote:
> On Wed, Jan 14, 2009 at 1:01 PM, Luca <luca.dallo...@gmail.com> wrote:
>
> > On Jan 13, 2:05 am, "Robert Kern" <robert.k...@gmail.com> wrote:
> >> On Mon, Jan 12, 2009 at 17:28, Luca <luca.dallo...@gmail.com> wrote:
>
> >> > I am developing a computer program which needs to solve a constrained,
> >> > parametric optimisation, something like :
>
> >> > meaning to calculate min(x) such as y = b*x+a and x <= c and x >=0
> >> > where x and y are variables, a, b, c are constant but unknown
> >> > parameters.
> >> > Since the problem is calculated at runtime from my computer program
> >> > and changes every time, I think I need to solve it with some form of
> >> > constrained programming with a symbolic result.
>
> >> > I could see something like this in mathematica :
>
> >> >http://reference.wolfram.com/mathematica/ref/Minimize.html#61381153
>
> >> How complicated are your target functions? How complicated are your 
> >> constraints?
>
> > I am not really eager about the complexity of target functions and
> > constraints : I am generating these equations out of other problems,
> > so any limitation in equation solving will simply become a limitation
> > in the input problem...
> > I would be already happy solving problems like this :
>
> > min(x) such as:
> > y = b*x+a
> > y >= c
> > x >= 0
>
> > (where a,b,c are constant (but unknown) parameters, x and y are the
> > unknown variables)
>
> > solution should then be something like : x=(c-a)/b, y=c if ....
>
> Well, sympy can't solve things like this with constrains right now,
> but it's on my todo list to implement general assumptions system, see
> this issue:
>
> http://code.google.com/p/sympy/issues/detail?id=1047
>
> when this is done, it could be possible to write solvers for the kinds
> of problems you described. Btw, do you know any algorithm for solving
> such things?
I am definitely not an expert about this kind of problems, but I
received an advice that you might find of some use, so I will paste it
here :


"Be aware that I think the symbolic Algebraic Geometry solvers (in
Axiom and other solvers) are implemented poorly; along the lines of
double roots (so the derivatives have the same poles as the original
equations) or some such.   It's not clear to me why they fail; they
work on simple problems.  I think the original algorithm (used in the
mathematical proofs by Bruno Buchberger  is probably okay).
    The Groebner basis algorithms are the underlying items for exact
solutions to simultaneous polynomial equations.   Really neat; when
they work.  If your not familiar with Groebner basis fundamentals here
is a really nice introduction from MSRI:
http://www.msri.org/communications/vmath/special_productions/production1/index_html";

Also, if Groebner Basis are of your interest, you might want to give a
look at JAS (Java Algebra System) : http://krum.rz.uni-mannheim.de/jas/
since it seems to be interpreted by jython (doh!)


> Would you be interested in implementing one, when the
> assumptions system is in place?
I would love to, only doubts are: I never worked in python before (I
am programming in java, but asked here since it seems that most
scientific work is done in python) and I am not very strong in math,
but I could try :-)

>
>
>
> > of course, any other problem with a different structure but similar
> > complexity : linear objective function, inequalities constraint
> > functions.
> > I would be also interested in qualitative results such as "x is O
> > (...)" using thehttp://en.wikipedia.org/wiki/Big_O_notationbut this
> > is asking too much, I suppose ;-)
>
> You can play with O notation in sympy, should just work, e.g.:
>
> >>> sin(x).series(x, 0, 5)
>
> x - 1/6*x**3 + O(x**5)>>> x+x**2+O(x)
>
> O(x)
wow!

>
> Ondrej
Thank you very much for you answers,
Best Regards!
Luca
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to sympy+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to