MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Manipulate and conflict in options to update front

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80149] Re: Manipulate and conflict in options to update front
  • From: "Nasser Abbasi" <nma at 12000.org>
  • Date: Tue, 14 Aug 2007 06:50:21 -0400 (EDT)
  • References: <200708121108.HAA27177@smc.vnet.net> <f9p5r4$rh5$1@smc.vnet.net>
  • Reply-to: "Nasser Abbasi" <nma at 12000.org>

"Carl Woll" <carlw at wolfram.com> wrote in message 
news:f9p5r4$rh5$1 at smc.vnet.net...
> Nasser Abbasi wrote:
>
>>I seem to have a dilemma here in using Manipulate. There seem to be a 
>>design
>>conflict in how Manipulate works.
>>
>>Manipulate, it seems, has a 6 seconds (or some limit) before the front end
>>times out if an evaluation takes too long.
>>
>>When I use SynchronousUpdating->False option to Manipulate, then the front
>>end will NOT time out no matter how long the evaluation takes, good,
>>however, now when I click the 'play' button on the front end for example, 
>>or
>>if I select a new parameter from the front end, then the front end will 
>>just
>>advance the counters quickly without waiting for the last evaluation to
>>complete, and so one does not see the result on the front end 
>>corresponding
>>to the current values/parameters displayed. It is like the front end is
>>running on its own pace while an evaluation 10 steps earlier still has not
>>finished. I guess this is what I asked for when I did
>>SynchronousUpdating->False.
>>
>>So when I use the SynchronousUpdating->True option, then the front end 
>>will
>>block until the last evaluation completes, good, but a long evaluation 
>>will
>>cause the front end to $Abort if it does not complete after the timeout 
>>set
>>for the front end which I understand is 6 seconds.
>>
>>If I use wrap the evaluation byTimingConstrained and give it long time, it
>>has no effect on the time out for the front end for Manipulate.
>>
>>So I am stuck.
>>
>>How can I make Manipulate front end block until the current evaluation
>>complete fully and display its output before it jumps to the next value 
>>(say
>>when I hit the 'play' button), no matter how long the evaluation?
>>
>>I tried to speed up the evaluation, but I am using symbolic integration 
>>many
>>times in each step,  and I can't seem to speed that any more. I wrote a
>>smalll finite elements program and for each element, there are 2 symbolic
>>integrations, As the number of elements go over 20 or 30, then it starts 
>>to
>>take about 5-10 seconds to complete the whole thing, causing an $Abort. I
>>did Timing and this is where all the time is being spend, in the 
>>Integrate[]
>>function.
>>
>>I do not know how to remove the timeout build in Manipulate front end.
>>
>>Any ideas?
>>
>>thanks,
>>Nasser
>>
>>
>>


> The option you are looking for is DynamicEvaluationTimeout. You can set
> this with options to $FrontEnd:
>
> SetOptions[$FrontEnd, DynamicEvaluationTimeout->10000]
>
> or you can set this as a Style option:
>
> Style[ Manipulate[ ... ], DynamicEvaluationTimeout->10000]
>
> I think the default is 6 seconds.
>
> Carl Woll
> Wolfram Research
>

Thanks Carl, but I am afraid the above did not do what I wanted.

Again, what I wanted is the following: When I click 'play', Manipulate is 
calling my process[] function to do the computation after each increment of 
the counter. I wanted Manipulate to wait until process[] is finished and 
done plotting the result for n, before it calls it again for n+1, and so on. 
I wanted the plot being shown to correspond to the process[] step being 
done.

Although I do not see the $Abort message with your suggestion, the front end 
is still running out of synch with the process[].

I've put 2 small AVI movies which captures me running the program. Both 
movies uses the above option. One uses SynchronousUpdate->True and one with 
it set ->False.   The movies are in this folder on my web site:

http://12000.org/tmp/081307/

You can see if you play the movies, that none of the above cases (both with 
DynamicEvaluationTimeout->10000) achieved the synchronization I want between 
the plotting and the value 'n' being processed at the time. In one cases the 
number of step (the 'n' or counter values jumps over many values missing in 
between values, and in the other case, the counter is running fast while 
process[] still has not update plot for much earlier 'n' values).

I am doing this btw:

process[..this takes long time...when done it plots its results......]
SetOptions[$FrontEnd, DynamicEvaluationTimeout->10000]
Manipulate[ process[p1,p2,...]{.....},SynchronousUpdate->True]

Surely there has to be a way to make Manipulate displaying the plots be 
synchronized with its calls to the process[]?

thanks,
Nasser



  • Prev by Date: Re: Problems naming files with equation names
  • Next by Date: Re: Drawing Potatoes and a Problem with Piecewise
  • Previous by thread: Re: Manipulate and conflict in options to update front
  • Next by thread: Re: Increasing scattered subsequence