On Wed, Jan 14, 2009 at 1:01 PM, Luca <[email protected]> wrote:
>
>
>
> On Jan 13, 2:05 am, "Robert Kern" <[email protected]> wrote:
>> On Mon, Jan 12, 2009 at 17:28, Luca <[email protected]> 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? Would you be interested in implementing one, when the
assumptions system is in place?

>
> 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 the http://en.wikipedia.org/wiki/Big_O_notation but 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)


Ondrej

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to