LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I utilize 'progress bar' to control an uncertain process?

Hi,

I'm relatively new to LabVIEW and I want to add a progress bar to my program.

My purpose is to show the ‘progress’ of QR Decomposition of a very large matrix.

But initially, I do not know the expected time of the whole process, and for QR decomposition,

it seems that I can not divide this process into some steps and finish the whole process

step by step. So a percentage of ‘progress’ of the whole progress can not be measured since I can not fix how ling the whole process will take.

As for such a question, how can I show the ‘progress’ of the whole process of decomposition

using a progress bar. Or there is other ‘tricks’ ?

The attached file is a simply example, actually,the size of matrix is very large.

Any help or references would be very much appreciated.

Many thanks!

0 Kudos
Message 1 of 4
(2,884 Views)
I am not familar with the intracicies of QR decomposition so this might be off-base . . .  but:

It seems like the mathematical process will take a fixed number of discrete computations for a given matrix size.  If you can determine this function (# of computations vs. matrix size) and you know how long each computation takes, then (given a matrix size) you should be able to determine an approximate "total time" for the entire decomposition.  If that is so, then you can increment/update a progress bar at some arbitrary number of points/iterations along the way.

This is assuming that you use a more-or-less brute force method of decomposition (where the algorithm is not elegant enough to know when it is working on already zero'd components).  If you are using a brute force method, then you should have a fixed number of computations for a given size.  Wire up something to count the number of iterations for a series of test matrices (3x3, 5x5, 10x10).  Determine the "big O." Then just calculate it before you start calculating the decomp in the VI.

If you happen to be doing this via Householder reflections, then the "big O" is n^3 for a matrix nxn.

Best of luck,
~milq
0 Kudos
Message 2 of 4
(2,877 Views)
Thanks a lot, I will try
0 Kudos
Message 3 of 4
(2,864 Views)
Another approach is to simply give an indication that something is going on, perhaps by setting a boolean to blink or rotating a picture ring through several steps to give some appearance of animation. It would not tell how much work has been done or how much remains but would indicate to the user that something is happening. Like the "busy" cursor.

Lynn
0 Kudos
Message 4 of 4
(2,851 Views)