From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: Function definitions Date: Sat, 21 Jun 2014 12:38:23 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <610b9d5b-a9a5-464d-9de3-b2f754f58cff@googlegroups.com> <2aa95b6a-951f-4e1d-adbb-612521fdbe9e@googlegroups.com> Injection-Date: Sat, 21 Jun 2014 12:38:23 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="e458ff8b81bc0c159989eb0e36c6e372"; logging-data="20202"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nWyWEM2EmHIVhR83XFFrb7xNzJBBcr9w=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:nYuuH4BxBrsTCYk92RlTZhMDDYQ= Xref: news.eternal-september.org comp.lang.ada:20487 Date: 2014-06-21T12:38:23+00:00 List-Id: On 2014-06-21, montgrimpulo wrote: > Here is another try to describe my problem. > > I want to conduct a genetic optimisation-program. There is a function F (the objective function), > and a function G (the constraint function) which I can define only at runtime. The program handles > individuals within a population. The size of an individual as well as the size of the population are dynamic and only known at runtime. > When you say F and G can only be defined at runtime, are you wanting to dynamically generate Ada code at runtime and then execute it, or are you just wanting to execute the same Ada code, but with different search parameters and different sized arrays ? I think the next stage is to try and find out what is so special about F and G; you clearly need discriminated records, but I'm not yet 100% convinced, for example, you need generics if this is just searching for optimised values. Also, can you talk about how these arrays are populated in the first place and how that population process fits into the overall program structure ? Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world