cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

manual selection of method for odesolve, minerr, find in Prime

0 Kudos

manual selection of method for odesolve, minerr, find in Prime

The odesolve routine in Prime is supposed to find the best method for the problem. However, that doesn't always work, as demonstrated in the following thread: http://communities.ptc.com/message/242208#242208. My guess is that it is almost impossible to anticipate every type of error that would lead to a change in the method selected, therefore, we need the capability of selecting the method for odesolve manually, as in Mathcad 15.

We need an argument in the odesolve call that specifies the method. I would prefer it to be a string variable with the name of the method. That would be better documentation for others than a number, which is meaningless to most readers. I also think having the method shown explicitly, rather than selected by right clicking, provides more complete documentation.

We should be able to specify the method for minerr and find also.

Currently, some of the ODE methods don't work with units. Those methods need to be updated to allow units so that odesolve can use any method without changing the problem definition.

9 Comments
Opal

Agreed. It is unrealistic to expect any automaticed routine to always pick the best method, there are just too many possible reasons to pick one over the other. We need a manual override.

I've thought some more about the advantages and disadvantages of right clicking to select the method vs. typing a keyword. The click method is a faster way to test the methods, but then the worksheet doesn't show the method selected. The right click method is obscure to new users. So here is a new idea that should challenge the developers.

Add another section at the bottom of the solve block. This section would be called "method". In the section would be a field with a drop arrow. Clicking on the arrow would show the available methods for the function that has been previously entered in the solve block. Selecting one method would allow the menu to collapse and the field would show the method selected. This is like the field for US State in most online address forms.

The trick is for the available methods to be changed according to the function, e.g. find, minerr, odesolve, etc. The list of methods shown should only be those that apply to the function in the block.

With this design, the method selection procedure is obvious, not hidden as with the right click method. Also, the documentation is complete because the method name is shown. And finally, we don't have to remember the exact spelling of each method.

Emerald III

My first animation on the PlanetPTC

http://communities.ptc.com/videos/1356

and manual selection of method for odesolve:

http://twt.mpei.ac.ru/ochkov/Mathcad_12/Planet/05_Loss_Sputnik.png

Opal

Well, it we are allowed to be overly optimistic, how about when you enter the comma for the optional argument, a drop down list appears instead of a placeholder

Ruby II

I never liked the idea of turning the solve block into that kind of closed, boxed component with its "sections", like it was done in Prime. Its less flexible (e.g. no way to evaluate it symbolically) and the way it is implimented its awfully ugly looking. Mathcad documents should look like handwritten (not my hand, as we can read whats written) or typeset documents with as less compromises as possible. An offset boxed solve block is the wrong direction in that respect. I am not sure about the algorithm used being subject of documention by default - I don't think it should be forced to be visible in any case but I rather would make it an option. This also as the outcome not only is dependent on the algorithm used itself but may also vary the way that algorithm is implemented in different pieces oft software.

So I could well imagine a right click option to change the algo as we are used now but also an additional (optional!!) argument of odesolve which defaults to "auto". We have differently named function for the standalone solvers, so another idea could be to use different function names for a solveblock, too. Odesolve being just one of them and is the "I'll do what I can to get the best algo for your problem".

Personally I don't like the idea of a dropdown menu as it would make the worksheet more "program" looking and less document. Making a dropdown list context sensitive should not really be a challange for programmers, as you wrote. I am not sure if it would be a challange for PTC's developers - after all we have two static format ribbons in Prime, one for Text Formatting, the other for Math Formatting. If I want to highlight a region and change the background color to yellow, I'd be happy If I wouldn't have to think about if thats a Math or a Text region and would like to be able to just format that region, no matter of its type . Also when I select a bunch of regions (Math and Text) I'd like to highlight all of them in one step. That would require a context sensitive, single Format ribbon. Maybe you are right thinking that thats a challange.

Ruby II

Richard Jackson wrote:

Well, it we are allowed to be overly optimistic, how about when you enter the comma for the optional argument, a drop down list appears instead of a placeholder

We are not taking about SMath, aren't we?

Great idea anyway.

Opal

That is indeed one very nice feature of Smath.

Ruby II

Richard Jackson wrote:

That is indeed one very nice feature of Smath.

which most programmers are used from the editor in their IDE anyway.

Emerald III

Now I know why I cannot solve this problem in Prime - I cannot choose the Fixed method in Prime but in Mathcad 15 I can:

tunel-friction.png