GithubHelp home page GithubHelp logo

alandefreitas / pareto Goto Github PK

View Code? Open in Web Editor NEW
88.0 4.0 8.0 13.35 MB

Spatial Containers, Pareto Fronts, and Pareto Archives

Home Page: https://alandefreitas.github.io/pareto/

License: MIT License

CMake 17.40% C++ 82.57% C 0.04%
pareto-front dimensional-fronts pareto-archives optimization multiobjective-optimization decision-making dominance spatial-data

pareto's People

Contributors

actions-user avatar alandefreitas avatar jkuck 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  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

pareto's Issues

Clarification on data structure objects in PF

Hello,

I am trying to understand what the number on the right side of the = sign represent in the examples:

import pyfront

pf = pyfront.front(['minimization', 'maximization'])

pf[0.68322, 0.545438] = 17
pf[-0.204484, 0.819538] = 8

In this case, I assume in pf[0.68322, 0.545438] = 17, 0.68322 represent the value of objective 1 and 0.545438 represents the value of objective 2. Is that so? What does 17 represent? Could you clarify what the different numbers stand for?

Also could verify if there's a way to install the library using a package manager (like pip) or does it have to be compiled from source?

Python Bindings for cpython-36m-x86_64-linux-gnu.so

Would it be possible to provide python bindings with the 36m suffix? The current bindings is pareto.cpython-38-x86_64-linux-gnu.so and the 38 is not supported on my linux machine, while the pyfront.cpython-36m-x86_64-linux-gnu.so was supported.

Would appreciate a 36m version of the bindings.

default_capacity as a compile time define?

Feature category

  • enhancement - indicators
  • enhancement - data structures
  • enhancement - bindings
  • enhancement - build system
  • enhancement - documentation

The problem
Hello Alan. This is a great library. Thank you for releasing it.
Can you please make the default_capacity of 1000 as a compile time
define?

static constexpr size_t default_capacity =
number_of_compile_dimensions == 0 ? 1000
: number_of_compile_dimensions <= 10
? static_cast(50)
<< (number_of_compile_dimensions - 1)
: 100000;

I ran into an issue where I exceeded the 1000 limit and end up asserting when _size != total_front_size().
It took some tracing to see why there was an assert as I didn't know of the 1000 limit.

The solution I'd like
#ifndef DEFAULT_CAPACITY
#define DEFAULT_CAPACITY 1000
#endif

static constexpr size_t default_capacity =
number_of_compile_dimensions == 0 ? DEFAULT_CAPACITY
: number_of_compile_dimensions <= 10
? static_cast(50)
<< (number_of_compile_dimensions - 1)
: 100000;

Alternatives I've considered
None

Additional context

Memory Leak

Hi Alan, I'm making a call to pareto::front.hypervolume() and found that this call leaks memory. When running through valgrind, this is the error that I'm getting:

==77189== Mismatched free() / delete / delete []
==77189==    at 0x4C32D3B: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==77189==    by 0x1A6082: pareto::fpli_hv(double*, int, int, double const*) (hypervolume.h:820)
==77189==    by 0x1ACCDA: pareto::front<long, 3ul, unsigned int, pareto::r_tree<long, 3ul, unsigned int, std::less<long>, std::allocator<std::pair<pareto::point<long, 3ul, void> const, unsigned int> > > >::hypervolume(pareto::point<long, 3ul, void>) const (front.h:930)

And the final valgrind ouput looks like this:

==77189== 
==77189== HEAP SUMMARY:
==77189==     in use at exit: 391,049 bytes in 4,115 blocks
==77189==   total heap usage: 1,901,304 allocs, 1,897,189 frees, 471,587,726 bytes allocated
==77189== 
==77189== LEAK SUMMARY:
==77189==    definitely lost: 8,008 bytes in 32 blocks
==77189==    indirectly lost: 265,176 bytes in 2,133 blocks
==77189==      possibly lost: 0 bytes in 0 blocks
==77189==    still reachable: 117,865 bytes in 1,950 blocks
==77189==         suppressed: 0 bytes in 0 blocks
==77189== Rerun with --leak-check=full to see details of leaked memory
==77189== 
==77189== For counts of detected and suppressed errors, rerun with: -v
==77189== ERROR SUMMARY: 32487 errors from 7 contexts (suppressed: 0 from 0)

Do you have any ideas for fixing this problem? Thanks!

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.