comp.lang.ada
 help / color / mirror / Atom feed
* Language Challenge 2000
@ 2000-01-31  0:00 bvoh
  2000-02-01  0:00 ` Jim Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: bvoh @ 2000-01-31  0:00 UTC (permalink / raw)


		Language Challenge 2000

The entire onboard software for the Apollo Lunar Landing Mission was
about 10% the size of today's typical word processor -- a huge regress
by any standard. For a measure of progress in scientific software you
are invited to participate in a comparative test by solving a real world
problem in the language of your choice.

Find the optimal initial angle for a trajectory to reach a target at
2000 m to within .5 m. The equations of motion are given by,

           	mx" + Dcos(alfa) = 0
            	my" + Dsin(alfa) + mg = 0
where
            	D = .5*Cd*A*rho(y)*v^2     alfa = atan(y'/x')

and rho() is a variable atmospheric density w.r.t. altitude.

Parameters: 	m = 20 kg   Cd = .3   A = .02 m^2   g = 9.80665 m/s^2
Initial values:	x = 0 m    y = 0 m   v = 180 m/s   alfa = 40 deg

Rules:  Solution  must be general; trial and error methods based on
apriori knowledge of the solution range do not qualify. Feel free to use
external software resources as well as the "Trajectory" example on our
"Application profiles" page as a convenient guideline. 

Criteria:

	a)  Execution time
	b)  Size of executable

Submit: Executable module (show final angle and distance), main program
text file and indicate the integration and optimization algorithms used.
e.g. Levenberg-Marquardt (netlib). All entries must be received by March
31, 2000.

The best entry in each language will be posted on our site to serve as a
barometer for those pondering what language to choose for their
technical computing. It might also double as a place where flame war
enthusiasts can calibrate their rhetoric against the realities of
feasible solutions.

Questions regarding the contest should be directed to info@sdynamix.com
with Contest 2000 in the "Subject" line.

-----------------------------------------------
Modeling * Simulation * Analysis
http://www.sdynamix.com
-----------------------------------------------




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-01-31  0:00 Language Challenge 2000 bvoh
@ 2000-02-01  0:00 ` Jim Rogers
  2000-02-01  0:00   ` Jeff Carter
  2000-02-01  0:00   ` David
  2000-02-04  0:00 ` Gautier
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Jim Rogers @ 2000-02-01  0:00 UTC (permalink / raw)


In article <38964D82.3423805@sdynamix.com>,
  bvoh@sdynamix.com wrote:
> 		Language Challenge 2000
>
> Criteria:
>
> 	a)  Execution time
> 	b)  Size of executable
>

If this is your only criteria for language choice then you should
always use assembler.

In many problem domains there are many other criterium, which is the
reason there are so many different languages.

--
Jim Rogers
Colorado Springs, Colorado USA


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-02-01  0:00 ` Jim Rogers
  2000-02-01  0:00   ` Jeff Carter
@ 2000-02-01  0:00   ` David
  2000-02-01  0:00     ` Jim Rogers
  1 sibling, 1 reply; 10+ messages in thread
From: David @ 2000-02-01  0:00 UTC (permalink / raw)


In article <876rjf$h1r$1@nnrp1.deja.com>,
  Jim Rogers <ada_daddy@my-deja.com> wrote:
> In article <38964D82.3423805@sdynamix.com>,
>   bvoh@sdynamix.com wrote:
> > 		Language Challenge 2000
> >
> > Criteria:
> >
> > 	a)  Execution time
> > 	b)  Size of executable
> >
>
> If this is your only criteria for language choice then you should
> always use assembler.
>
> In many problem domains there are many other criterium, which is the
> reason there are so many different languages.
>
Just a couple of small "nits" about language.
The words you were trying to use are:
criterion -- singular
criteria  -- plural
They're Greek, and the "ium" ending is from Latin.
So.. you probably meant to say:
If this is your only criterion for language choice then you should
always use assembler.

In many problem domains there are many other criteris, which is the
reason there are so many different languages.



Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-02-01  0:00 ` Jim Rogers
@ 2000-02-01  0:00   ` Jeff Carter
  2000-02-01  0:00   ` David
  1 sibling, 0 replies; 10+ messages in thread
From: Jeff Carter @ 2000-02-01  0:00 UTC (permalink / raw)


Jim Rogers wrote:
> 
> In article <38964D82.3423805@sdynamix.com>,
>   bvoh@sdynamix.com wrote:
> >               Language Challenge 2000
> >
> > Criteria:
> >
> >       a)  Execution time
> >       b)  Size of executable
> >
> 
> If this is your only criteria for language choice then you should
> always use assembler.

Let us not forget the case in which the Tartan Ada-83 compiler produced
smaller and faster code than the best assembler a team of experts could
produce after many months of hand optimization. This was presented in
Ada Letters, but I don't have the details about the issue available.

Thus, even such a benighted set of criteria does not always argue
against high-level languages when an excellent optimizer is available.

-- 
Jeff Carter
"We call your door-opening request a silly thing."
Monty Python & the Holy Grail




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-02-01  0:00   ` David
@ 2000-02-01  0:00     ` Jim Rogers
  0 siblings, 0 replies; 10+ messages in thread
From: Jim Rogers @ 2000-02-01  0:00 UTC (permalink / raw)


In article <877078$km8$1@nnrp1.deja.com>,
  David C. Hoos, Sr. <david.c.hoos.sr@ada95.com> wrote:
> In article <876rjf$h1r$1@nnrp1.deja.com>,
> Just a couple of small "nits" about language.
> The words you were trying to use are:
> criterion -- singular
> criteria  -- plural
> They're Greek, and the "ium" ending is from Latin.
> So.. you probably meant to say:
> If this is your only criterion for language choice then you should
> always use assembler.
>
> In many problem domains there are many other criteris, which is the
> reason there are so many different languages.
>

My English language compiler failed to flag a syntax error.
Sorry about the improper mixture of Greek and Latin suffixes
(or is it suffixi?). :-)

--
Jim Rogers
Colorado Springs, Colorado USA


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-01-31  0:00 Language Challenge 2000 bvoh
  2000-02-01  0:00 ` Jim Rogers
@ 2000-02-04  0:00 ` Gautier
  2000-02-04  0:00   ` Ted Dennison
  2000-02-04  0:00 ` Gautier
  2000-02-04  0:00 ` Vincent DIEMUNSCH
  3 siblings, 1 reply; 10+ messages in thread
From: Gautier @ 2000-02-04  0:00 UTC (permalink / raw)
  To: bvoh

> Criteria:

>         a)  Execution time
>         b)  Size of executable

Let me allow a remark: your b) criterium is a bit ridiculous!
In effect, the size of code for solving your problem
will be so small that the .exe size will essentially contain
the fixed library overhead, that doesn't grow with the program!
It depends on the system, the compiler system (e.g. gcc).
In addition one can compress the .exe with UPX, keep or not
keep the debug info, etc.

According to the weight of b) in your decision only assembler
could win your challenge!

-- 
Gautier

_____\\________________\_______\
http://members.xoom.com/gdemont/




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-01-31  0:00 Language Challenge 2000 bvoh
  2000-02-01  0:00 ` Jim Rogers
  2000-02-04  0:00 ` Gautier
@ 2000-02-04  0:00 ` Gautier
  2000-02-04  0:00 ` Vincent DIEMUNSCH
  3 siblings, 0 replies; 10+ messages in thread
From: Gautier @ 2000-02-04  0:00 UTC (permalink / raw)
  To: bvoh

> Criteria:

>         a)  Execution time
>         b)  Size of executable

Another remark: besides the language/system problem,
the lack of information about weighting between a) and b)
blocks the choice of the algorithm!

To reach the same precision, you can use a simple Euler
method with small steps (tiny but slow program) or
a 13-stage, with variable step, Dormand-Prince method
that will reach the goal in a few steps but
with a bigger code...

-- 
Gautier

_____\\________________\_______\_________
http://members.xoom.com/gdemont/gsoft.htm




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-02-04  0:00 ` Gautier
@ 2000-02-04  0:00   ` Ted Dennison
  0 siblings, 0 replies; 10+ messages in thread
From: Ted Dennison @ 2000-02-04  0:00 UTC (permalink / raw)


In article <389AB13D.42D3C1C1@maths.unine.ch>,
  Gautier <gautier.demontmollin@maths.unine.ch> wrote:
> > Criteria:
>
> >         a)  Execution time
> >         b)  Size of executable
>
> In addition one can compress the .exe with UPX, keep or not
> keep the debug info, etc.

Or better yet, put all of the code in a runtime library! Then all you'd
need is a call to load the library, and another to transfer control to
the library's main routine. As far as speed goes, odds are this is going
to be a toy problem, where load time will be a significant part of
execution time. So we make sure another program pre-loads the library so
that it is already in memory when the toy program is invoked. We win!
Woo Hoo!

So what language can we use that will make a library load and procedure
call take the least time/space? What a wonderful basis for picking the
language to use for your next project! Reliability? Extensibility?
Portability? Support for programming in the large? Bah!

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-01-31  0:00 Language Challenge 2000 bvoh
                   ` (2 preceding siblings ...)
  2000-02-04  0:00 ` Gautier
@ 2000-02-04  0:00 ` Vincent DIEMUNSCH
  2000-02-04  0:00   ` Vincent DIEMUNSCH
  3 siblings, 1 reply; 10+ messages in thread
From: Vincent DIEMUNSCH @ 2000-02-04  0:00 UTC (permalink / raw)


I have a few questions regarding the equations themselves :


>Find the optimal initial angle for a trajectory to reach a target at
>000 m to within .5 m. The equations of motion are given by,
>
>               mx" + Dcos(alfa) = 0
>                my" + Dsin(alfa) + mg = 0
>where
 >               D = .5*Cd*A*rho(y)*v^2     alfa = atan(y'/x')
>
>and rho() is a variable atmospheric density w.r.t. altitude.
>
>Parameters:     m = 20 kg   Cd = .3   A = .02 m^2   g = 9.80665 m/s^2
>Initial values: x = 0 m    y = 0 m   v = 180 m/s   alfa = 40 deg

- What is the rho(y) function exactly ?
- shoudn't it be my" + Dsin(alfa) - mg = 0   instead of  my" + Dsin(alfa) +
mg = 0 ?

And finally cos(atan(y'/x')) = x'/v and sin(atan(y'/x')) = y'/v, which will
certainly speed up computing !!!




>
>
> -----------------------------------------------
> Modeling * Simulation * Analysis
> http://www.sdynamix.com
> -----------------------------------------------





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Language Challenge 2000
  2000-02-04  0:00 ` Vincent DIEMUNSCH
@ 2000-02-04  0:00   ` Vincent DIEMUNSCH
  0 siblings, 0 replies; 10+ messages in thread
From: Vincent DIEMUNSCH @ 2000-02-04  0:00 UTC (permalink / raw)


Sorry, I made a mistake,
my" + Dsin(alfa) + mg = 0 is correct !


Vincent DIEMUNSCH a �crit :

> I have a few questions regarding the equations themselves :
>
> >Find the optimal initial angle for a trajectory to reach a target at
> >000 m to within .5 m. The equations of motion are given by,
> >
> >               mx" + Dcos(alfa) = 0
> >                my" + Dsin(alfa) + mg = 0
> >where
>  >               D = .5*Cd*A*rho(y)*v^2     alfa = atan(y'/x')
> >
> >and rho() is a variable atmospheric density w.r.t. altitude.
> >
> >Parameters:     m = 20 kg   Cd = .3   A = .02 m^2   g = 9.80665 m/s^2
> >Initial values: x = 0 m    y = 0 m   v = 180 m/s   alfa = 40 deg
>
> - What is the rho(y) function exactly ?
> - shoudn't it be my" + Dsin(alfa) - mg = 0   instead of  my" + Dsin(alfa) +
> mg = 0 ?
>
> And finally cos(atan(y'/x')) = x'/v and sin(atan(y'/x')) = y'/v, which will
> certainly speed up computing !!!
>
> >
> >
> > -----------------------------------------------
> > Modeling * Simulation * Analysis
> > http://www.sdynamix.com
> > -----------------------------------------------





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2000-02-04  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-31  0:00 Language Challenge 2000 bvoh
2000-02-01  0:00 ` Jim Rogers
2000-02-01  0:00   ` Jeff Carter
2000-02-01  0:00   ` David
2000-02-01  0:00     ` Jim Rogers
2000-02-04  0:00 ` Gautier
2000-02-04  0:00   ` Ted Dennison
2000-02-04  0:00 ` Gautier
2000-02-04  0:00 ` Vincent DIEMUNSCH
2000-02-04  0:00   ` Vincent DIEMUNSCH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox