Venkat Subramanian

296 Reputation

13 Badges

11 years, 227 days

MaplePrimes Activity


These are replies submitted by

@tomleslie 

Please note that stiff error comes when stiff=true is used. This is the failure of Rosenbrock methods, probably from Maple's failure to find the analytic Jacobian.

For the OP, you may be better off writing your system as a system of first order equations (Maple does this before going to dsolve). Also try implicit =true to see if that helps. This can be done only for first order ODEs.

@tomleslie 

Thanks for your solution. I believe the NLPSolve with method=nonlinearsimplex has no issues (it can't deal with bounds and constraints). It would be great if NLPSolve can use an inbuilt wrapper to make the optimization work for simple returns from the procedures without these _passed numeric returns. I believe the issue may be due to the calls for fdiff. 
Please note that GlobalOptimzation package calls the sqp optimizer, and has no issues with procedures without the extra _passed commands. 

@ I am able to run classicworksheet with maple2021

I had to go to to bin.win folder

run cwmaple.exe

This is actually better than previous versions where I could only run 32bit version in classic worksheet mode. The help file says that cwmaple.exe exists inside bin.x86 folder,  but it is in bin.win folder

@nm 

I have classic worksheet working for Maple2019 (a little unstable, but it works). So classic worksheet (32bit) was dropped either in 2020 or 2021.

Unfortunately no more classic worksheet. I understand that there may not be a demand for 32 bit installations, but I am a big fan of classic worksheet interface, please add it if possible.

@tomleslie 

Please note that this statement (IVP numerical methods are more stable compared to BVP methods) is incorrect. Actually, BVP methods are more stable to solve a given BVP problem. It is easy to show many examples to prove the same. For example, 

take dy1/dt = y2

dy2/dt = tau^2*y1 + (Pi^2-tau^2)*sin(Pi*t)

IVP: t=0, y1= 0, y2 = Pi

BVP: t= 0, y1 = 0; t = 1, y1 = 0

(Credit: Dr. Biegler at CMU)

This model is very stable with a BVP approach, but not with IVP approach. Shooting method is not useful for largescale or stiff problems. At least multiple shooting is needed.

Add some noise to ics, constants, you will see BVP methods behaving much better.

 

@acer 

The current linear sparse direct solver is good. If we can call that in evalhf or compiled procedure (making sure of arrays, etc), that will be of great help for solving large scale problems. Creating an interface to MUMPS or PARDISO will be a great step up (to enable the use of all the cores in the computer).

 

@acer 

I haven't tested mathematica for parallel Sparse Solvers. But MATLAB has this.

@acer 

By arbitrarily defining a 2D grid for linear elliptic problems, I don't see SparseDirect solvers using more than one core in my computer with any version of Maple. Can you please confirm if you are able to run Maple for the following simple script (for 1D problem) for very large N using all the cores? Try N =999, 999999, etc


 

restart;

Digits:=15;

Digits := 15

(1)

N:=5;h:=1.0/(N+1);

N := 5

h := .166666666666667

(2)

A:=Matrix(1..N,1..N,datatype=float[8],storage=sparse):

for i from 1 to N do A[i,i]:=-2/h^2-1.0:
if i >1 then A[i,i-1]:=1/h^2:end:
if i<N then A[i,i+1]:=1/h^2:end:od:

b:=Vector(1..N,storage=sparse,datatype=float[8]):

b[1]:=-1/h^2:

y:=LinearAlgebra:-LinearSolve(A,b,method=SparseDirect):

y[N/2+1/2];

.443527611152833

(3)


 

Download LargeN.mws

 

1. Maple doesn't have a DAE solver, the help file should state the same and instead state that DAEs are converted to explicit ODEs and solved. If possible add the DAE solver in Maplesim to Maple.

2. Make NLPSolve:-Optimize more robust and accurate. For example, if you call a procedure with 2 arguments or more and optimize with bounds and constraints, it will inevitably say -first-order conditions met and optimization not continued. This seems to be a bug in either numerical Jacobian calculation or unfortunately a trick to force users to buy the Global Optimization package. I hope that it is not the case.

3. Update ODE, DAE, BVP, and PDE numerical solvers with sparse linear algebra.

4. Enable parallel computing for sparse linear solver (call MUMPS or PARDISO).

5. Make 1D input the default or at least provide that option when installing the software or opening Maple the first time.

@ecterrab 

Liked your post. The goal should be addressing a problem. 

I would like to see 1D as the default mode as opposed to 2D for Maple? Or at least ask the user during installation to choose 1D as opposed to 2D.

In my humble opinion, Maple should not have done anything beyond the classic Maple worksheet in terms of interface. When that consultant went out of business, Maple should have invested in the same. Typing in Maple 8 or earlier versions was just like typing in a text file. It consumed very little RAM and was very responsive.

 

 

@Aminaple 

take my example 1 and modify it to your example or problem. If needed define your model as first order equations (convert second order to first order equations)

The solver uses implicit midpoint approach for first-order BVPs. (Second-order or higher-order ODEs are converted to first-order systems). The algorithm is given below.

dy/dx = f

y1= y0+h*f(ymid) where ymid is (y1+y0)/2, h is the element size. h = 1/N, N the number of elements. 

Caveat: The Richardson extrapolation method assumes second order of accuracy, but if your model is stiff or ill-conditioned or nearly singular, this will sometimes give wrong/sub-optimal results as the order of accuracy is 1 and the solver does not take care of this.

 

@janhardo 

I meant a tablet/laptop not the browser.

If you install 32 bit Maple, you should be able to use classic worksheet mode. The stability is anyone's guess. But worth trying

@nm 

I think when Maple was started, the goal was perhaps to keep the source codes transparent. New additions (maplesim, stochastic packages, etc) have hidden codes that are nearly impossible to dig. 

Mathematica has everything hidden. MATLAB has many codes that are transparent, but not FFT. Perhaps true for A\b as well.

1 2 3 4 5 6 7 Last Page 1 of 15