GithubHelp home page GithubHelp logo

brayanrodbajo / cego-tonb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from braytest/cego-tonb

0.0 1.0 0.0 474 KB

License: MIT License

CMake 0.47% Python 0.80% TeX 0.79% Jupyter Notebook 88.54% C++ 9.40%

cego-tonb's Introduction

CEGO

CEGO (pronounced sea-go) is C++11 Evolutionary Global Optimization. This library is used to:

  • Solve unconstrained global optimization problems (Soft bound constraints can be added to the objective function as needed)
  • The input variables can be constrained to be integers (see PressureVesselOptimization )

It allows for:

  • A flexible C++11 architecture for doing parallel global optimization with multithreading
    • Also allows for new evolutionary optimization techniques to be specified with a minimum of code
    • Uses the age-layered approach
  • A fundamental C++ datatype (CEGO::numberish) that can be either an integer or a floating double precision value
  • Python wrappers of the core of the library (single-threaded)

The C++ API documentation (generated by doxygen ) is available here

Automated Tests on TravisCI: Build Status

Examples:

Try it in your browser: Binder

Statically rendered examples are provided as Jupyter notebooks served on nbviewer (link to folder), roughly sorted in terms of complexity of the example:

License

*MIT licensed (see LICENSE for specifics), not subject to copyright in the USA. Foreign Rights Reserved, Secretary of Commerce.

Dependencies

Contributing/Getting Help

If you would like to contribute to CEGO or report a problem, please open a pull request or submit an issue. Especially welcome would be additional tests.

If you want to discuss or request assistance, please open an issue.

To get started, you should check out the Jupyter notebooks in the notebooks folder; they demonstrate some of the capabilities of CEGO.

Installation

Prerequisites

You will need:

  • cmake (on windows, install from cmake, on linux sudo apt install cmake should do it, on OSX, brew install cmake)
  • Python (the anaconda distribution is used by the authors)
  • a compiler (on windows, Visual Studio 2015+ (express version is fine), g++ on linux/OSX)

If on linux you use Anaconda and end up with an error something like

ImportError: /home/theuser/anaconda3/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/theuser/anaconda3/lib/python3.6/site-packages/CEGO.cpython-35m-x86_64-linux-gnu.so)

it can be sometimes fixed by installing libgcc with conda: conda install libgcc. This is due to an issue in Anaconda

To install in one line from github (easiest)

This will download the sources into a temporary directory and build and install the python extension so long as you have the necessary prerequisites:

pip install git+git://github.com/usnistgov/CEGO.git

From a cloned repository

Alternatively, you can clone (recursively!) and run the setup.py script

git clone --recursive https://github.com/usnistgov/CEGO
cd CEGO
python setup.py install

to install, or

python setup.py develop

to use a locally-compiled version for testing. If you want to build a debug version, you can do so with

python setup.py build -g develop

With a debug build, you can step into the debugger to debug the C++ code, for instance.

Cmake build

Starting in the root of the repo (a debug build with the default compiler, here on linux):

git clone --recursive https://github.com/usnistgov/CEGO
cd CEGO
mkdir build
cd build
cmake ..
cmake --build .

For those using Anaconda on Linux, please use the following for cmake:

mkdir build
cd build
cmake .. -DPYTHON_EXECUTABLE=`which python`
cmake --build .

For Visual Studio 2015 (64-bit) in release mode, you would do:

git clone --recursive https://github.com/usnistgov/CEGO
cd CEGO
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015 Win64"
cmake --build . --config Release

If you need to update your submodules (pybind11 and friends)

git submodule update --init

For other options, see the cmake docs

cego-tonb's People

Contributors

braytest avatar

Watchers

James Cloos avatar

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.