Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


14 Pages«<23456>»
Options
Go to last post Go to first unread
Offline uni  
#61 Posted : 28 September 2012 12:05:06(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: kilele Go to Quoted Post
Sorry Uni, I don't understand your pdfs

I'm sorry, maybe it will be clearer: http://stocktrader10.tripod.com/
Quote:
This Web site is a good spot to let visitors know the math method developed by Russian scientist Anatoly V.Draghilev
This page was last updated on 06/06/02 .
e-mail :Alexey Ivanov [stitch_design@rambler.ru]


Page 1, page 2, page 3, page 4, page 5

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 2 users thanked uni for this useful post.
on 28/09/2012(UTC),  on 28/09/2012(UTC)
Offline uni  
#62 Posted : 28 September 2012 12:57:51(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
One more example (rus): link

Russia ☭ forever
Viacheslav N. Mezentsev
thanks 2 users thanked uni for this useful post.
on 28/09/2012(UTC),  on 28/09/2012(UTC)
Offline uni  
#63 Posted : 28 September 2012 13:17:44(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
And some video:
Russia ☭ forever
Viacheslav N. Mezentsev
Offline Ioan  
#64 Posted : 28 September 2012 14:17:57(UTC)
Ioan


Rank: Member

Groups: Registered
Joined: 17/06/2012(UTC)
Posts: 26
France, Metropolitan

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post


Ioan,
[/b]


Hi Ioan Good

The HRE functions need 2 arguments, no more (see the attachment).

The initial unknown guess strategy It's a common issue, Homotopy and Bisection I think they are the best approaches.

Note that in your script a "large" bound it's better than a little bound.


best regards,

w3b5urf3r

P.S. in the previous post I've reupdated the plugin, the previous librery have a little issue with the x variable, when already defined







Hi w3b5urf3r,



Thanks for your suggestion.

Due to a wide range of parameters, I followed your suggestion by making two steps:
* one to identify the function sign changing and;
* one for finding the right solution.

I included two home-made routines (see attached file), one based on the chord method and the other based on the Newton (Broyden ?) method.

I called the plugin giving to it my initial guess values, the same as for my routines.
I've seen that for some situations no solution is founded with the plugin, while my routines give enough accurate solution.

Of course, I understand that the main objective of the plugin is the equation systems, but I believe that it could be useful also for the particular case of single equations.

Hoping to be useful.


Best regards,

Ioan







File Attachment(s):
longflamb eq mid.sm (41kb) downloaded 46 time(s).
Offline omorr  
#65 Posted : 28 September 2012 15:39:03(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello uni,
Originally Posted by: uni Go to Quoted Post
And some video:

I do not know how I did miss that on the Russian side Shok

It is very interesting and I will definitely pay more attention to your posted examples.In the meantime, just wanted to ask something. It might be a stupid question, therefore i excuse myself in advance Blush

You solved few nonlinear systems, nonlinear equations, found the function extrema and it looks, how to say, very exotic Good
As far as understood at a first glance, to realize this method - functions gradients and solving ODE initial value problem is the main constituent and the main problematic part of the method and of the potential plugin Biggrinerisive: . I might be totally wrong, of course because I did not explore it yet.

I do not know how would this method behave with, say 10x10 system of equations? Do you have any experience with something like this?

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline алексей_алексей  
#66 Posted : 30 September 2012 11:09:40(UTC)
алексей_алексей


Rank: Advanced Member

Groups: Registered
Joined: 30/09/2012(UTC)
Posts: 56
Russian Federation

Was thanked: 12 time(s) in 7 post(s)
Hello!
One more example, the system was solved by a Draghilev's method for practically all positive (L,x) :
(1+exp(-2*L*x))*cos(L*x)+2*exp(-L*x)=0; http://forum.exponenta.r...wtopic.php?p=55406#55406
Excuse me, I do not know English. I think, uni will help me…
Description of the method:
http://forum.exponenta.r...0e41288833d51ba26c338d0f

Edited by user 03 October 2012 08:33:11(UTC)  | Reason: Not specified

thanks 1 user thanked алексей_алексей for this useful post.
on 01/10/2012(UTC)
Offline uni  
#67 Posted : 01 October 2012 09:07:48(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,493
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Originally Posted by: omorr Go to Quoted Post
You solved few nonlinear systems, nonlinear equations, found the function extrema and it looks, how to say, very exotic Good
As far as understood at a first glance, to realize this method - functions gradients and solving ODE initial value problem is the main constituent and the main problematic part of the method and of the potential plugin Biggrinerisive: .

Well, I'll explain how it works and what you can do with it. But first I need to finish MapleWrapper plugin.
In order to explain I need the two plugins: ODESolvers and MapleWrapper. One would be to calculate the Jacobian, and the second to solve an ODE. This is not exotic, but rather simple things, as you will see.
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 01/10/2012(UTC)
Offline omorr  
#68 Posted : 01 October 2012 09:56:33(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Thank you very much Good

I am looking forward to it.

By the way, you know that I appreciate very much that you made ODEsolvers plugin. Hope that you would have the time to add some "stiif" ODE solver in the future.

Wish you all the best and good luck Thank you

Regards,
Radovan

Edited by user 01 October 2012 10:00:34(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
thanks 1 user thanked omorr for this useful post.
on 02/10/2012(UTC)
Offline алексей_алексей  
#69 Posted : 01 October 2012 14:56:10(UTC)
алексей_алексей


Rank: Advanced Member

Groups: Registered
Joined: 30/09/2012(UTC)
Posts: 56
Russian Federation

Was thanked: 12 time(s) in 7 post(s)
Originally Posted by: алексей_алексей Go to Quoted Post
Hello!
One more example, the system was solved by a Draghilev's method for practically all positive (L,x) :
(1+exp(-2*L*x))*cos(L*x)+2*exp(-L*x)=0; http://forum.exponenta.r...wtopic.php?p=55406#55406
Excuse me, I do not know English. I think, uni will help me…
Description of the method:
http://forum.exponenta.r...0e41288833d51ba26c338d0f



Uni has promised to help with explanations...
System of equations whose solution is converted into an animation of the mechanism.
x1^2+x2^2+(x3+.5*sin(10*x1)-3)^2-4=0;
x2-x1=0;
x5-x6=0;
x5-3=0;
(x1-x4)^2+(x2-x5)^2+(x3-x6)^2-20.1=0;
Maple.Draghilev's method.

Edited by user 03 October 2012 08:32:17(UTC)  | Reason: Not specified

Offline kilele  
#70 Posted : 01 October 2012 16:59:36(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
@uni

The method you mentioned seems to be the same as the one used in the two pdf papers I linked above, it's an homotopy, differentiated to form an IVP.
One of the pdf I linked contains an implementation of the algorithm solved with classic Runge-Kutta order4 formulas for the IVP (RK4 is said to have a good balance between cost and precision). I'm sure that w3b5rfer might be implementing it for the next version of his plugin.

As for a function for stiff odes, there you have a .NET library (pity it's gpl licensed, at least you can see which algorithms are used).
http://www.dotnumerics.c...alEquations/Default.aspx


EDIT:
Feel free to contact the author if someone wants to use dotnumerics,
I might be wrong as for the license issues to develop open source plugins for a closed software (though non-comercial) as it is SMath.

EDIT:
I've read that this BDF implementation in C (for Stiff IVP) is good, see "GEAR.H" , "GEAR.CPP" and "MGEAR.CPP"
http://jean-pierre.morea...-orange.fr/c_eqdiff.html

Edited by user 24 January 2013 15:35:25(UTC)  | Reason: BDF souurce code

thanks 3 users thanked kilele for this useful post.
on 01/10/2012(UTC),  on 01/10/2012(UTC),  on 02/10/2012(UTC)
Offline Davide Carpi  
#71 Posted : 01 October 2012 17:22:58(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
PLUGIN UPDATED Biggrin

- new feature: solvers for systems of equations now accept multiple unknowns names (introduced in the latest BETA + new fixes);

- Broyden convergence criterion revisited (introduced in the latest BETA);

- added HRE.RK(...) (Homotopy root-estimation method, using the Runge-Kutta 4th order algorithm);

- all homotopy algorithms now works as Broyden() and NewtonRaphson() (4 required arguments and a 5th optional argument - see the attachment);

- previous HRE() renamed as HRE.NR();

- plugin Jacobian(...) unlocked (introduced in the latest BETA + new fixes);

- fixed issues with Units in all HRE() solvers.


regards,

w3b5urf3r

Edited by user 01 October 2012 17:56:53(UTC)  | Reason: Not specified

File Attachment(s):
HRE_testing.sm (53kb) downloaded 46 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [HRE_testing.sm].png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 01/10/2012(UTC)
Offline алексей_алексей  
#72 Posted : 01 October 2012 18:53:38(UTC)
алексей_алексей


Rank: Advanced Member

Groups: Registered
Joined: 30/09/2012(UTC)
Posts: 56
Russian Federation

Was thanked: 12 time(s) in 7 post(s)
The most simple example to illustrate Draghilev's method:
x1^2-x2*x1+x2^2-1=0;
sin(5*x1^2)+sin(4*x2^2)=0;
x01 := 0.;
x02 := 1.;
Maple.

Edited by user 03 October 2012 08:31:31(UTC)  | Reason: Not specified

thanks 1 user thanked алексей_алексей for this useful post.
on 02/10/2012(UTC)
Offline adiaz  
#73 Posted : 02 October 2012 08:51:29(UTC)
adiaz


Rank: Member

Groups: Registered
Joined: 03/06/2009(UTC)
Posts: 25

Was thanked: 5 time(s) in 5 post(s)
Very nice work. Just some little observations. You use the same epsilon for both x and y axis. The exit code for some functions is min(y)<epsilon, but i'm think that it could be better to take max(y). For bisection maybe is better not having both epsilon and maxiters, with only one is enough. An exit code of the form abs(x2-x1)<epsilon (actually, norm1 or other) is not pressent in all of the functions. I don't understand the test xlast = x then break, perhapsh it can be xlast < x then break.

Regards.

Alvaro.
Offline omorr  
#74 Posted : 02 October 2012 13:16:22(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post
PLUGIN UPDATED Biggrin

- new feature: solvers for systems of equations now accept multiple unknowns names (introduced in the latest BETA + new fixes);

- Broyden convergence criterion revisited (introduced in the latest BETA);

- added HRE.RK(...) (Homotopy root-estimation method, using the Runge-Kutta 4th order algorithm);

- all homotopy algorithms now works as Broyden() and NewtonRaphson() (4 required arguments and a 5th optional argument - see the attachment);

- previous HRE() renamed as HRE.NR();

- plugin Jacobian(...) unlocked (introduced in the latest BETA + new fixes);

- fixed issues with Units in all HRE() solvers.


Just a little bit of testing with one my "nightmare" problem. I've mentioned this example already. I think this is one more of the SMath symbolic engine problem, and it my happen that you can define a vector function but can not obtain the Jacobian of it. See the attached file and the picture. I managed to solve this problem initially with HR.B() to get better guess values and then Broyden() could do the job. As I do not know how to force SMath to perform all the symbolic operations (for instance, all the operations inside stack() function - among other things), it seems that HR.B() and Broyden() in these situations are the only way of performing similar things . At the end of the file I did all the things about defining the function manually, and then the situation changed drastically. Anyway, I am satisfied that some progress has been made about this Good

Regards,
Radovan

Edited by user 02 October 2012 14:07:19(UTC)  | Reason: Not specified

File Attachment(s):
Primer4.7w-1.sm (190kb) downloaded 35 time(s).
omorr attached the following image(s):
Primer4.7w-1.png
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline Davide Carpi  
#75 Posted : 02 October 2012 17:04:09(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Hi omorr,

I've seen you're example, unfortunately there are many little "issues" regarding the symbolic engine...

For example observes the first element of your f1(), f2() and f3() (look the attachments);

f1()

SMath seem unable to make a symbolical stack of the function; It's not difficult to understand why... the columns of the results matrix (if all it's correct) are the columns of the last stack argument -> 1; the rows are undefined because if el(X#,2),el(X#,4),el(X#,5) and el(X#,3) are vectors, the result is a vector... exluding the assumption that all unknown elements are numbers or a "size predeclaring", probably the issue could be solved using a "trial and error" procedure on the unknown size, but I think it's a very hard task Wallbash

f2()
Here there are SMath issues with derivatives... probably it's the same issue of f3() (and the same of this bug), IMHO all related to the symbolic simplification engine...

f3()
Here there are SMath issues with derivatives and elements...


Since all the issues with derivatives involving the Jacobian, so NewtonRaphson(), HRE.NR() and HRE.RK() in this example can not be used (at the moment, at least) Sad


Originally Posted by: adiaz Go to Quoted Post
For bisection maybe is better not having both epsilon and maxiters, with only one is enough

I don't agree, because with discontinuous functions (f.e. tan(x)) the maxiters prevents infinite loops. No

bisection failure

regards,

w3b5urf3r

Edited by user 02 October 2012 20:21:06(UTC)  | Reason: Not specified

File Attachment(s):
Primer4.7w-debug.sm (146kb) downloaded 37 time(s).
Davide Carpi attached the following image(s):
SMath Studio - [Primer4.7w-1-debug.sm].png
SMath Studio - [Primer4.7w-1-debug.sm]_2.png
SMath Studio - [Primer4.7w-1-debug.sm]_3.png
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline omorr  
#76 Posted : 02 October 2012 18:22:53(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

Was thanked: 318 time(s) in 268 post(s)
Hello w3b5urf3r,

Thank you for your answer an I agree with you completely. We also can see that many of us on this Forum have to many "why?" regarding symbolic engine Sad .

To be honest, Mathcad drives me crazy for almost 25 years Crazy and it would be fair that I could give a chance to SMath for the next 20 years or so Biggrin

Regards,
Radovan

Edited by user 02 October 2012 18:32:45(UTC)  | Reason: Not specified

When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
Offline adiaz  
#77 Posted : 03 October 2012 07:32:16(UTC)
adiaz


Rank: Member

Groups: Registered
Joined: 03/06/2009(UTC)
Posts: 25

Was thanked: 5 time(s) in 5 post(s)
Originally Posted by: w3b5urf3r_reloaded Go to Quoted Post


Originally Posted by: adiaz Go to Quoted Post
For bisection maybe is better not having both epsilon and maxiters, with only one is enough

I don't agree, because with discontinuous functions (f.e. tan(x)) the maxiters prevents infinite loops. No
w3b5urf3r


Epsilon and maxiters for bisection is redundant. Even it's more easy with maxiters, is better to take Epsilon (one for each axis, but that is not related with maxiters redundance). In the code maxiters is calculated as N. Actually, the main loop can be implemented with a for loop.

Regards.

Alvaro.
adiaz attached the following image(s):
BIS_01.gif
BIS_02.gif
Offline алексей_алексей  
#78 Posted : 03 October 2012 09:46:55(UTC)
алексей_алексей


Rank: Advanced Member

Groups: Registered
Joined: 30/09/2012(UTC)
Posts: 56
Russian Federation

Was thanked: 12 time(s) in 7 post(s)
f1 := 3.*x-cos(y*z)-0.5;
f2 := x^2-81.*(y+0.1)^2+sin(z)+1.06;
f3 := 20.*z+(e^(-x*y)+(-3.+10.*Pi)/3.

1)x=0.499999999686162; y=-6.029115021 10^-10; z=-0.523598775196563;
2)x=0.498144680773833; y=-0.199605897856040; z=-0.528825978056676
f1=-1 10^-9;
f2=1.0 10^-8;
f3=1 10^-8;
Offline kilele  
#79 Posted : 03 October 2012 12:40:37(UTC)
kilele


Rank: Advanced Member

Groups: Registered
Joined: 30/03/2011(UTC)
Posts: 393

Was thanked: 132 time(s) in 113 post(s)
@Alvaro

Do you think these methods based on bisection could be useful for non-linear systems ?
They don't need differentiability of function, and convergence is guaranteed.
This is a generalized bisection which could be used like HRE for initial root estimation:
https://dl.dropbox.com/u...of%20Bisection%20for.pdf
This is a minimization algorithm based on bisection which is said to be an alternative to Nelder-Mead
https://dl.dropbox.com/u...0Method_E.Y.Morozova.pdf

Edited by user 05 October 2012 15:34:46(UTC)  | Reason: Not specified

thanks 1 user thanked kilele for this useful post.
on 03/10/2012(UTC)
Offline Davide Carpi  
#80 Posted : 03 October 2012 14:43:49(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: adiaz Go to Quoted Post
Epsilon and maxiters for bisection is redundant. Even it's more easy with maxiters, is better to take Epsilon (one for each axis, but that is not related with maxiters redundance). In the code maxiters is calculated as N. Actually, the main loop can be implemented with a for loop.

Regards.

Alvaro.


Ahhhh, previously I understood that you wanted to remove completely (in the function) the maxiter, not to replace it with the number of iterations provided... you're right, excuse me Thank you

BTW the plugin single equations solvers actually supports the 2nd Epsilon, but I have not yet updated the reference sheets.


regargds,

w3b5urf3r

Edited by user 03 October 2012 14:46:43(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
14 Pages«<23456>»
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.