casperyc

927 Reputation

10 Badges

11 years, 362 days

MaplePrimes Activity


These are replies submitted by casperyc

@Carl Love See this, it's in the left bottom corner.

 

@Carl Love Yes, I would in general use 'print' if i am debugging, or trying to see if the procedure if running or not.

But in this case, I want a graph to track something that's moving for a long time.

In this case, acer's solution is working just fine. I tried yours, it has repeated plots, which does not update.

 

Thanks,

casper

 

@acer That's exacly what I am looking for.

 

Is that possible to "add on" points, rather than plotting the whole "A" every time it's refreshed?

I am just thinking about reducing the memory usage. If I run a task with 30,000 intermiadite values, which I dont need to keep. It would also take "some" space in the RAM and just become wasted. I have also changed "A" to "local".

 

Can I put the component as an output from the procedure? That is, just like a result (it does not need to be save to any variable) while running the procedure, until it's finished. I don't like it fixed at a position.

Hopefully, after I run "mytest", the plot pops up, and shows me the same real time plot, and the final result.

Thanks,

 

casper

@Markiyan Hirnyk Hi Hirnyk,

Sorry that I had only seen this now.

Yes, with the given example. It is for sure it has to optimal points.

As for this quesetion in general, I am trying to simply the target function, so I think it is a good point to stop the discussion now. If I have more question, I will start a new post and try to be more precise.

 

Many thanks,

 

casper

@Markiyan Hirnyk Why do you think I reproach you? If in any way you feel that, I am really sorry.

I do appreciate people helping others on the forum. I am aware that people are busy. I am busy as well as a PhD student.

 

I did excute your file, but there was nothing (for me) to comment on.

I didn't see the result I am hoping to get, even after you made your changes in the file.

The optimization did run, but it did not give me the desired values, see the OP.

And I have pointed out, with(DirectSearch), I dont need to change anything. The problem is just that it does not reach the optimal values.

 

Regard to your last commment, I believe I did reply. (Edited: SORRY, I just noticed that I did NOT reply to the lastest comment.)

casper

 

@Markiyan Hirnyk 

As we can see, that after the changes, we are still unable to get the values.

Could you explain why the changes?

 

with DirectSearch, I dont need to make the changes and it still does not work, see the new sheet attached.

test.mw

It uses a lot of times and does not return anything (wndows X64, Maple 18). I tried the school sever (linux X64, Maple 17), it stops and says that something about "GC stack limit reached" (garbage  collecting thing?).

 

So no way to approach this staright away?

Thanks,

 

casper

@Carl Love That's nice.

But is there a way to keep data as it is (a list). And pass the argument "data", to printf?

The reason is that if I use the above way and change it to evaln, I have to modify every single place in my codes.

For now, i just created a new local variable and assigned it as newvar:=eval(data) to accomodate it the "old data" variable.

Thanks,

 

casper

@Kitonum Perfect, thanks!

@Carl Love I don't know much about ODEs, and was just browsing Maple primes.

I am a bit confused why (how) would you  think of reducing the accuracy?

And what does the Reduced accuracy answer tell us?

 

In my experience, sometimes when I got underflow (tooo small) issue, I would increase accuracy, to get something out of it.

 

Is it a useful thing to explore?

@Alejandro Jakubi

here is what happens

Test file: go.mpl

##############

x:=1;
y:=2;

x+y;

x*y;

x^y;

quit;

##############

 

Windows 7 SP1 X64

In command line (cmd), if I do

cmaple -q go.mpl > results.txt

 

It has contents, as expected.

 

When using

start cmaple -q go.mpl > results.txt

It is BLANK.

 

Again, as I mentioned above, I want to start several maple servers simultaneously to "maximize" the power of my CPU, I found that is the way, i.e. go with "start".

If I only use

 

cmaple 1.mpl

cmaple 2.mpl

cmaple 3.mpl

in a script (.bat) file, it goes with a single mserver.

 

 

@Alejandro Jakubi I am sure that the "true" comes from cmaple (in windows).

The optional parameter -q will produce it. See the picture above.

But anyway, it will not affect a lot. I will just leave it as it is.

My .mpl files has writeto commands and will write my desired results. So I dont need to use ">" to another file.

However, I did test it say the test.mpl file has

x:=1;y:=2;

x+y;

when I run the file like

maple test.mpl > result.txt

The file is BLANK.

I assume this is corrent? The result.txt would only record "formated" output, like printf?

 

@Alejandro Jakubi Yes, I know batch file pretty well.

But just to clarify, what you suggested in linux,

maple a.mpl &
maple b.mpl &
maple c.mpl &

works for me and is what I am expectinig. Without the "&", it still works one by one. (Maybe I am writing it wrong??)

 

However, in windows

cmaple a.mpl
cmaple b.mpl
cmaple c.mpl

will work BUT it not what I expect. It's excutes one by one.

what works for me is

@echo off

start cmaple.exe a.mpl
start cmaple.exe b.mpl
start cmaple.exe c.mpl

That works simultaneously.

 

Just to "improve" a bit more, in windows, the above .bat file show the three cmaple window, is there a option to run silently at background?

Edited:

I now use this

@echo off

start cmaple.exe -q  a.mpl
start cmaple.exe -q  b.mpl
start cmaple.exe -q  c.mpl

 

 

to aviod the messages. Is there a way to get ride of the "true" as well?

Thanks!

@itsme I recently had to do something quite similar. This looks very useful!

@Alejandro Jakubi Sorry I am not quite familiar with the term shell script.

 

Yes, I am running from Windows 7 X64 version. It is like a batch (.bat) file? I think the batch file will run one by one in windows. It's just like running a single line at a time in command line (cmd)?

 

Thanks,

 

casper

 

@Alejandro Jakubi OK. Thanks.

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