emendes

415 Reputation

6 Badges

7 years, 332 days

MaplePrimes Activity


These are replies submitted by emendes

@sursumCorda  Here is part of the code (modified to fit here).

dsnmodel := {diff(x(t), t) = -10*x(t) + 10*y(t), diff(y(t), t) = -z(t)*x(t) + 28*x(t) - y(t), diff(z(t), t) = y(t)*x(t) - (8*z(t))/3, x(0) = 1/10, y(0) = 1/10, z(0) = 1/10};

tfinal:=200:
mf:=500000:
dt:=0.001:


dsol1 := dsolve(dsnmodel, numeric, method = rkf45, output = procedurelist,range=0..tfinal,maxfun=mf):

fig:=Array(1..2):
fig[1]:=plots:-odeplot(dsol1, [x(t), y(t), z(t)],refine=2,caption="Fig. 1 - Lorenz system",captionfont = ["ROMAN", 20]):
fig[2]:=plots:-odeplot(dsol1, [x(t), y(t), z(t)],refine=2,caption="Fig. 2 - Another system",captionfont = ["ROMAN", 20],color = "SteelBlue"):
plots:-display(fig);

@acer 

Yes, it does when I Print directly.   Yes for PDF export as well. When I choose Open in Preview Maple sends the doc to printer. 

Print Preview = Print layout Mode?   No, it does not. 

Where do I add style-line?  In plots:-odeplot?

@emendes Just an update.   I installed Maple 2023 over the weekend and the problem persists.   

@Carl Love That is weird! Maple 2002.2 on Mac M1 started freezing on Monday for no reason. Most of the time I had  to kill the process related to it.  Maple 2022.2 on Linux did not show the same problem though.  

@acer Many many thanks.   Please correct me if i am worng.  These new fancy ways open a door of  new possibilities.  Suppose I want to find the indices of a list that corresponds to elements less than 9.   Would the following command be efficient for long lists?

[for t,v in eval(T) do `if`(v<=9,t,NULL); end do];

@acer Thank you ever so much.   No problem to understand your solution.   The problem is: why I did not think of that?  If you have the time and patience, please post the fancy ways with comments.  

@Kitonum Many thanks. I think I can follow all the steps of your solution but if you think that there is something that stands out, please let me know.  

@Carl Love Many many thanks.   I have checked the help file on anames and there is nothing that explicitly mention procedure there. It would be helpful if Maple included it there.  

@dharr As I said in my first post to this question,  I use Grid, solve, simplify and subs extensively. What I noticed was that if there is at least one cpu running at 100%, there is a chance that the calculations will end eventually. However if no cpu is at 100%, it is a bug for sure.   I constantly run something overnight or even for days.  

@nm Sorry for taking so long to post the results.  I tried with 300, 500 and 700 and time results were 25896.743, 22570.095 and 24704.806 respectively.  In all the runs the output was always "Timed out OK".  

Now I will try with 2000 and see what happens.   I forgot to mention that I am using Maple 2021.2 for mac intel.   

@nm First of all thanks for posting such a question.   I must confess I don't understand how timelimit actually works.  In the example you sent my old mac had no problem to run the code: "Time out ok" in 120.736 (quite close to twice the estipulated time) . However when I use timelimit with subs, simplify and solve alongside Grid:-Map or Grid:-Seq, I have no idea how it behaves.  I have one example that runs solve 11165 times with timelimit set to 5.   I am not sure the calculations will end since it has been running for more than a day (Grid:Seq sent out "done sending all partitations" last night).  What seems odd to me is that none of the cpus are at 100%, at least one of them should.   In another example,  Maple has been running for a week (at least in this case I see that one cpu is running at 100% all the time).

(!) never worked for me in the examples I have.   The only solution is "Quit Maple 2022" or "Force quit".   

Finally, I totally agree with what you said in the last two paragraphs.   

@Joe Riel Many thanks.   How about the use of  any Grid procedure ( in a user made procedure) within a module.  Can it be done?  And how?  As said I have tried to do it but without success.  

@Joe Riel Many thanks.  I tested your solution on a large set and works just fine.   

Why don't I need to issue Grid:-Set(CleanExpr,'coefmodel') in this case?   I thought I had to issue Grid-Set for all new procedures and variables used in them.  I use Grid:-Map extensively and if I am not careful to define all procedures and variables using Grid:-Set, Maple complains and aborts the calculations.   

I have also tried to put all Grid:-Map procedures in a module but Maple complains as if I didn't issue Grid:-Set at all (I tried to place Grid:-Set inside and outside of the module but to no avail).   

In what follows the first set of  " ... should like to see" is copied from the one sent last year.  

My wish has to do with Grid and Threads packages:

1) Efficient usage of memory -   Once a grid command finishes the memory allocated should return to Maple (I am not sure whether this is possible or not). There is a post in the list showing that, in some calculations using Grid, Maple hangs for no apparent reason.

2) A clear explanation in the help files (examples) on which variables should be Grid:-Set and which don't.  (Although I have received help from top users on the list and from maple support, the answers are not the same in some cases).

3) CodeTools:-ThreadSafetyCheck - Some of the functions that are threadsafe checked by this command cause Maple to hang.  Is the list of threadsafe functions updated?  

Timelimit

1) Once the time to finish is set, maple will terminate the operation no matter what.

@acer Thank you.   I don't know how I miss that but I did.  No excuse.   

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