controller time

"Anand Veeraswamy" <[email protected]> Sat, 24 Sep 2005 23:51:42 +0100
Newsgroups gmane.comp.breve
Message-ID <[email protected]>
This is a multi-part message in MIME format.

--===============72514651607915881==
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0011_01C5C162.E9F85910"

This is a multi-part message in MIME format.

------=_NextPart_000_0011_01C5C162.E9F85910
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

In the iterate method of the main controller class I do the following...

I print the controller time and then call a computationally intensive =
function and then print the controller time again.

Since the function that I call is computationally quite intensive I can =
notice that sometimes it takes a while for the display to occur.

But still the controller time before the function call and after the =
function call are the same. Why does that happen?? I also tried using=20
self schedule method-call. That did not solve my problem either.

Actually I have implemented 2 different algorithms to find paths. One =
without using heuristics and one using heuristics and I want to=20
prove that the algorithm using heuristics takes less time. What is the =
best way of doing this?


The code I used in the iterate method is like this=20

+ to iterate: =20
            if flag=3D=3D0: {
            print (controller get-time).//Prints 0.000000
            self findPath.
            print (controller get-time).//Prints 0.000000
            flag=3D1.
            }
            if flag=3D=3D1: {
            print (controller get-time).//Prints 0.000000
            self findPath.
            print (controller get-time).//Prints 0.000000
            flag=3D2.
            }


Anand.




------=_NextPart_000_0011_01C5C162.E9F85910
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2722" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In the iterate method of the main =
controller class=20
I do the following...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I print the controller time and then =
call a=20
computationally intensive function and then print the controller time=20
again.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Since the function that&nbsp;I call is=20
computationally quite intensive I can notice that sometimes it takes a =
while for=20
the display to occur.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>But still the controller time=20
before&nbsp;the&nbsp;function call and after the function call are the =
same. Why=20
does that happen?? I also tried using </FONT></DIV>
<DIV>self schedule method-call. That did not solve my problem =
either.</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Actually I have implemented 2 different =
algorithms=20
to find paths. One without using heuristics and one using heuristics and =
I want=20
to </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>prove that the algorithm using =
heuristics takes=20
less time. What is the best way of doing this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The code I used in the iterate method =
is like this=20
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>+ to iterate:&nbsp;=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if=20
flag=3D=3D0: =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
print (controller get-time).//Prints=20
0.000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
self=20
findPath.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
print (controller get-time).//Prints=20
0.000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
flag=3D1.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
}<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
if=20
flag=3D=3D1: =
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
print (controller get-time).//Prints=20
0.000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
self=20
findPath.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
print (controller get-time).//Prints=20
0.000000<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;=20
flag=3D2.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;=20
}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Anand.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0011_01C5C162.E9F85910--

--===============72514651607915881==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
breve mailing list
[email protected]
http://lists.spiderland.org/mailman/listinfo/breve

--===============72514651607915881==--