Code Monkey home page Code Monkey logo

gefest's Introduction

Logo of GEFEST framework

package
tests
Build Status
docs Documentation Status
license
Supported Python Versions
support
gitlab
GitLab mirror for this repository
funding

GEFEST (Generative Evolution For Encoded STructures) is a toolbox for the generative design of physical objects.

In core it uses: 1. Numerical modelling to simulate the interaction between object and environment 2. Evolutionary optimization to produce new variants of geometrically-encoded structures

The basic abstractions in GEFEST are Point, Polygon, Structure and Domain. Architecture of the GEFEST can be described as:

/docs/img/workflow.png

The evolutionary workflow of the generative design is the following:

/docs/img/evo.png

The dynamics of the optimisation can be visualized as (breakwaters optimisation case):

/docs/img/breakwaters.gif

How to use

All details about first steps with GEFEST might be found in the quick start guide.

Tutorals for more spicific use cases can be found tutorial section of docs.

Project Structure

The latest stable release of GEFEST is on the main branch.

The repository includes the following directories:

  • Package core contains the main classes and scripts. It is the core of GEFEST framework;
  • Package cases includes several how-to-use-cases where you can start to discover how GEFEST works;
  • All unit and integration tests can be observed in the test directory;
  • The sources of the documentation are in the docs.
  • Weights of pretrained DL models can be downloaded from this repository.

Cases and examples

Note: To run the examples below, the old kernel gefest version, which can be installed on python 3.7 with:

pip install git+https://github.com/aimclub/GEFEST.git@4f9c34c449c0eb65d264476e5145f09b4839cd70
  • Experiments with various real and synthetic cases
  • Case devoted to the red blood cell traps design.

Migrated examples can be found in cases folder of the main branch.

Current R&D and future plans

Currently, we are working on integration of new types of physical objects with consideration of their internal structure.n

The major ongoing tasks:

  • to integrate three dimensional physical objects
  • to implement gradient based approaches for optimization of physical objects

Documentation

Detailed information and description of GEFEST framework is available in the Read the Docs

Contribution guide

The contribution guide is available in the page

Acknowledgments

We acknowledge the contributors for their important impact and the participants of the numerous scientific conferences and workshops for their valuable advice and suggestions.

Contacts

Supported by

National Center for Cognitive Research of ITMO University

Citation

@article{starodubcev2023generative,
title={Generative design of physical objects using modular framework}, author={Starodubcev, Nikita O and Nikitin, Nikolay O and Andronova, Elizaveta A and Gavaza, Konstantin G and Sidorenko, Denis O and Kalyuzhnaya, Anna V}, journal={Engineering Applications of Artificial Intelligence}, volume={119}, pages={105715}, year={2023}, publisher={Elsevier}}
@inproceedings{solovev2023ai,
title={AI Framework for Generative Design of Computational Experiments with Structures in Physical Environment}, author={Solovev, Gleb Vitalevich and Kalyuzhnaya, Anna and Hvatov, Alexander and Starodubcev, Nikita and Petrov, Oleg and Nikitin, Nikolay}, booktitle={NeurIPS 2023 AI for Science Workshop}, year={2023}}

gefest's People

Contributors

aberezin15 avatar denissidoren avatar dreamlone avatar drmpn avatar mangaboba avatar nicl-nno avatar quickjkee avatar solowayg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gefest's Issues

Fix existing examples

The source code of some examples can be non-actual now. They should be validated and fixed if necssary

Existing issues In current version GEFEST.

  • В Breakwaters, варианты кейсов с оптимизаторами SPEA2 и DE конфигурационный файл перезаписывается некорректно, что приводит к поломке файла (INPUT или bw_example_cfg) .
  • Скрипты для Breakwaters не учитывают ограничения по непересечению с существующими объектами (порт, точка замера высоты волн, фарватер). Однако, это предусмотрено функционалом. Пример с суррогатной моделью:
    image
  • Запуск кейсов из aimclub/GEFEST/cases в конфигурации SWAN требуется файл конфигурации "INPUT", однако он отсутствует по пути (gefest/tools/estimators/simulators/swan/swan_model/), а вместо него находится "bw_example_cfg". В последнем открытом Pull requests предложено переименовать "INPUT" в "bw_example_cfg". Предполагаю, что название для конфигурационного файла осталось "INPUT" для того, чтобы была возможность запускать примеры из ITMO-NSS-team/GEFEST. Необходимо унифицировать название конфигурационного файла без потери возможности воспроизведения кейсов в обоих репозиториях.

Crossover bug for specific parameters of optimiser

The following error occurs in crossover:

image

How to reproduce:

is_closed = True
geometry = Geometry2D(is_closed=is_closed)
domain = Domain(allowed_area=[(0, 0),
                              (0, 300),
                              (300, 300),
                              (300, 0),
                              (0, 0)],
                geometry=geometry,
                max_poly_num=20,
                min_poly_num=1,
                max_points_num=20,
                min_points_num=5,
                is_closed=is_closed)

task_setup = Setup(domain=domain)

# Optimizing stage
start = timeit.default_timer()
optimized_structure = optimize(task_setup=task_setup,
                               objective_function=partial(multi_loss,
                                                          expected_poly_num=expected_poly_num),
                               pop_size=100,
                               max_gens=100)

Note:

bug occurs more frequently if max_poly_num is large.

Unstable behavior on the validation-postprocess step

According with passed unit-tests, created Polygons due processing by validation and resolve_errors function might have only 2 points after that.

This fact returnes an issue due processing Polygons on the Shapely side

Postprocess fails during mutation

The following error was facesd in paper-exp branch:

Traceback (most recent call last):
File "shapely\speedups_speedups.pyx", line 247, in shapely.speedups._speedups.geos_linearring_from_py
AttributeError: 'list' object has no attribute 'array_interface'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:/GEFEST/cases/synthetic/analysis_of_applicability/number_of_vertices.py", line 90, in
result = optimize(task_setup=task_setup,
File "D:\GEFEST\gefest\core\opt\optimize.py", line 18, in optimize
_, best = GA(
File "D:\GEFEST\gefest\core\opt\GA\GA.py", line 20, in solution
self._pop.extend(self.reproduce(self._pop))
File "D:\GEFEST\gefest\core\opt\GA\base_GA.py", line 95, in reproduce
child_gen = self.mutation(structure=child_gen,
File "D:\GEFEST\gefest\core\opt\operators\mutation.py", line 55, in mutation
new_structure = get_pop_worker(domain=domain)
File "D:\GEFEST\gefest\core\opt\operators\initial.py", line 44, in get_pop_worker
structure = postprocess(structure, domain)
File "D:\GEFEST\gefest\core\algs\postproc\resolve_errors.py", line 33, in postprocess
elif out_of_bound(local_structure, domain):
File "D:\GEFEST\gefest\core\algs\geom\validation.py", line 33, in out_of_bound
if not domain.geometry.is_contain_poly(poly, domain_poly):
File "D:\GEFEST\gefest\core\geometry\geometry_2d.py", line 95, in is_contain_poly
geom_poly = GeomPolygon([self._pt_to_geom(pt) for pt in poly_1.points])
File "D:\GEFEST\venv_new\lib\site-packages\shapely\geometry\polygon.py", line 243, in init
ret = geos_polygon_from_py(shell, holes)
File "D:\GEFEST\venv_new\lib\site-packages\shapely\geometry\polygon.py", line 509, in geos_polygon_from_py
ret = geos_linearring_from_py(shell)
File "shapely\speedups_speedups.pyx", line 341, in shapely.speedups._speedups.geos_linearring_from_py
ValueError: A LinearRing must have at least 3 coordinate tuples

User and developer documentation

Task to obtain mandatory documentation:

  • Host in documentation read-the-docs;
  • Create quick-start guide;
  • #40
  • #36
  • Create extended tutorial for beginners;
  • Create advanced tutorial for developes;

Formal deadline: 01.09.2022

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.