[galib] Beginners Problems...

Chris Chapman cnchapman at msn.com
Fri Jul 20 19:41:57 EDT 2007


I just answered another message with links to VS2005 compilation 
instructions, which are here:
http://hyperdrifter.com/index.php?option=com_content&task=view&id=13&Itemid=1

That should get you compiling.

Now, as for interfacing with SQL Server, more detail is necessary to answer 
the question, such as which versions of things you're talking about and 
exactly what is happening in SQL (e.g., is it just retrieving an answer from 
a lookup database, or is it executing a complex stored procedure written in 
C++; is your C++ program written as a client app or executed on the same 
machine as SQL server?).

However, in general there are a variety of possible ways to interface 
between a C++ program and SQL server.  Using CLR is one possibility.  
Another option is to use older MFC APIs.  Another might be some other ODBC 
APIs, such as SimpleDB (http://simpledb.sourceforge.net/), but that depends 
on exactly what you need to access in SQL and whether it's exposed in ODBC.  
Another possibility would be to split the program into two apps and pass 
information between them in various ways (calling one as a DLL, writing to a 
file, writing to a local DB table, etc).  Another would be to isolate the 
data retrieval part into a script (e.g., in Perl) and call that from the GA 
app.

The choice among those would probably depend most on the complexity of the 
call, the number of times it would be expected to execute, and the ratio of 
time to call the data retrieval procedure vs. the time it takes to execute 
(calling an external Perl script 10M times to retrieve a single lookup value 
each time is not going to be very efficient).  Making some guesses about the 
problem, I'd probably look first to the MFC or ODBC solutions if efficiency 
is important, and to the Perl option if not.

Best wishes, and I'd suggest to post back a solution if you find one 
(assuming the problem is not overly specialized).

----Original Message Follows----
From: "TIMOTHY RONALD PHILLIPS" <t.r.phillips at newcastle.ac.uk>
To: <galib at mit.edu>
Subject: [galib] Beginners Problems...
Date: Wed, 18 Jul 2007 19:17:51 +0100

I am fairly new to C++ so please bear with what may seem like overly or
simple trival questions.

The problem I am trying to apply GALib to requires interfacing with an
SQLServer as the object function is a model output, and the SQLsever is
the interface between the GA and the Model (accepts the inputs based on
the GA, and model writes outputs to SQLServer)

So far I have noticed that the code to interface with the SQL sever
requires Common Language Runtime Support, but the code incorperationg
GALib doesn't not support GALib.

Is it possible to have a /clr compatible section to link with the SQL
and a non-/clr compatable section to run the GA?

Also I can't complile the examples in VC++2005. I know projects aren't
supported but even with no clr the list of errors is amazing

So it is possible to use GALib to solve a problem where
1.	The objective function is generated by an external exectable,
and retrevied from an SQL server
2.	Where the imputs based off the phenotype of a solution are
outputted to an SQL server

If it is any advice on how to accumplish this?

Or easy is it to learn how to compile the source code from the command
line?


Tim

_______________________________________________
galib mailing list
galib at mit.edu
http://mailman.mit.edu/mailman/listinfo/galib





More information about the galib mailing list