p-chambers / occ_airconics

Aircraft Configuration through Integrated Cross-disciplinary Scripting, Python package built on PythonOCC
http://occ-airconics.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Geometry is not carried around with the Individuals in population #17

Open p-chambers opened 7 years ago

p-chambers commented 7 years ago

Behaviour in Topology_GPTools is currently to produce and airconics.Topology from a DEAP primitive tree or individual. The evolved population of individuals therefore have no information about the geometry, and the airconics.Topology objects are required to carry around a copy of an individual from the tree, neither of which is ideal.

The better approach here would be to make the individuals in the gp population also inherit from the Topology class, thus carrying the geometry.

This change would require the Topology_GPTools primitive to be changed, as primitives (methods of the Topology_GPTools class) operate on class attributes, rather than an input Individual or Topology. Once this is done though, the parallelisation will be much easier.