Grasshopper

algorithmic modeling for Rhino

Two Questions: adding multiple columns, storing multiple objects' properties per genome

First off, I would love some input on how to organize and store properties for multiple objects per Galapagos pass/iteration. I can't share the entire definition but I've set up mock parameters and a stand-in fitness value for sake of discussion.

The definition generates a variable number of rectangles from 1 to 20 in count. Each rectangle has width, length, position X, position Y, Orientation and building ID.

I think I need to create table within a table here. Or I need to duplicate the ID value per the number of buildings so that I can group rows of data by the Galapagos iteration.

Secondly, I am getting syntax errors when I try to use the Add Column component. Could this be that our version of MySQL is not compatible? we are using Server version: 5.5.13. I can't change it as it is part of a larger internal infrastructure. IT would prefer that I don't install a local server.

Any thoughts?

Views: 1064

Attachments:

Replies to This Discussion

Hello,

To answer your questions...

Creating Tables and Columns:

I have attached a file showing how to create tables and add columns later.  If you know you have a set list of columns, you can add them to the table all at once.  I also recommend that you use the 'ColumnParameter' component under 'Utility' which basically will help you ensure that your columns have the right data types with primary key and other parameters specified.

Gene Recording


I noticed that your merged lists for creating the 'rows' are not matching properly.  For the numbers you are going to hold constant during a Galapagos run, you will need to duplicate those values so the list matches the total number of iterations.  I have also included an example of this in the attached file.

You may have already found this, but here is a very simple tutorial for creating a gene record database.

http://slingshot-dev.wikidot.com/ghdb-genome

I hope this helps...

-Nate

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service