Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 23 07:30
    mhmsoota opened #212
  • May 11 19:02
    darioizzo closed #194
  • May 11 19:02
    darioizzo commented #194
  • May 11 17:26
    fialat commented #194
  • Apr 04 06:51
    RockyRocks commented #174
  • Feb 15 02:11
  • Feb 11 22:57
    rebeccaringuette commented #59
  • Feb 03 07:56
  • Nov 12 2020 15:37
  • Sep 24 2020 18:52
  • Jul 02 2020 20:18
    darioizzo closed #211
  • Jul 02 2020 20:18
    darioizzo commented #211
  • Jul 02 2020 17:09
    Nick-Hemenway opened #211
  • Jun 29 2020 08:04
    SAbdulah commented #210
  • Jun 29 2020 07:34
    darioizzo commented #210
  • Jun 28 2020 13:21
    SAbdulah opened #210
  • Jun 02 2020 20:17
  • May 28 2020 06:47

    darioizzo on master

    Fixed abs ambiguity compilation… Merge pull request #197 from ci… (compare)

  • May 28 2020 06:47
    darioizzo closed #197
  • May 27 2020 18:26
    ekrell commented #197
Maurizio De Pittà
it won't work
I suspect I have not installed it...
I just reinstall the OS
but usually cmake comes with Linux doesn't it?
Francesco Biscani
usually you have to install it with the other development tools
Maurizio De Pittà
ok let me figure it out.
Francesco Biscani
what version of numpy are you using?
Maurizio De Pittà
so back to cmake
Francesco Biscani
the pygmo from pip was created with numpy 1.13
Maurizio De Pittà
do I need to type cmake CMakeLists.txt? 'Cause I just installed cmake, but it won't work...
Francesco Biscani
so if you update numpy to the latest version it should work
Maurizio De Pittà
let me check
Maurizio De Pittà

So it is not possible for me to upgrade numpy cause Fedora 26 provides 1.12 as the most updated one, and I risk to get conflicts with all the other packages if I force an upgrade. So I am building from source. cmake CMakeList.txt works fine for pagmo but when I want to build pygmo and I cd /pagmo/pygmo and do cmake CMakeList.txt, the process cannot be completed issuing the following error:

`CMake Error at CMakeLists.txt:10 (if):
if given arguments:

"EQUAL" "2"

Unknown arguments specified`

Dario Izzo
can we move this to https://gitter.im/pagmo2/Lobby please?
@mdepitta Subscribe to the pagmo2 lobby and post again there.

Hello Dear Pygmo Colleagues,

I recently installed pygmo and attempted the exercise cases. The cases not involving SLSQP, IPopt, and SNopt ran successfully. I'm now trying to make the remaining cases run. I have conda 4.3.34 installed, and I think I used 'conda install pygmo'. I have SNopt, which I think is already compiled to run with another tool. I've installed the 'pygmo_plugins_nonfree'package, but am not sure how to set it up with SNopt.

Thanks for your help in advance)


When I run the exercises I get the following error:

      function: evolve
      where: C:\bld\pygmo_plugins_nonfree_1518171231957\work\pagmo_plugins_nonfree-0.3\include\pagmo_plugins_nonfree/snopt7.hpp, 463
      An error occurred while loading the snopt7_c library at run-time. This is typically caused by one of the following

      - The file declared to be the snopt7_c library, i.e. /usr/local/lib/libsnopt7_c.so, is not a shared library containing the necessary C interface symbols (is the file path really pointing to
      a valid shared library?)
       - The library is found and it does contain the C interface symbols, but it needs linking to some additional libraries that are not found
      at run-time.

      We report the exact text of the original exception thrown:
      function: evolve
      where: C:\bld\pygmo_plugins_nonfree_1518171231957\work\pagmo_plugins_nonfree-0.3\include\pagmo_plugins_nonfree/snopt7.hpp, 415
      what: The snopt7_c library path was constructed to be: /usr/local/lib/libsnopt7_c.so and it does not appear to be a file
Dario Izzo
@agbejoye The channel for pagmo2 related questions is: https://gitter.im/pagmo2/Lobby. Can you post there please?
Copy that!
Kyle Medley
Hi all! Thanks for this great project! I was wondering if there is a literature reference for the ageing clustered Barabasi Albert topology? (http://esa.github.io/pygmo/documentation/topology.html#PyGMO.topology.ageing_clustered_ba)
I used to be able to run the pykep examples but now I get in my anaconda install on Linux for example1:
$ python3 /local/scratch/bgodard/sw/anaconda3/lib/python3.6/site-packages/pykep/examples/_ex1.py
mu: 10 - lambda: 20 - mueff: 5.9388 - N: 11
cc: 0.282335 - cs: 0.361861 - c1: 0.0127203 - cmu: 0.0469557 - sigma: 0.5 - damps: 1.36186 - chiN: 3.24255

   Gen:        Fevals:          Best:            dx:            df:         sigma:
      1              0        15468.6        2625.02    1.68662e+06            0.5
Traceback (most recent call last):
  File "/local/scratch/bgodard/sw/anaconda3/lib/python3.6/site-packages/pykep/examples/_ex1.py", line 39, in <module>
  File "/local/scratch/bgodard/sw/anaconda3/lib/python3.6/site-packages/pykep/examples/_ex1.py", line 29, in run_example1
    pop = algo.evolve(pop)
  File "/local/scratch/bgodard/sw/anaconda3/lib/python3.6/site-packages/pykep/examples/_ex_utilities.py", line 17, in fitness
    return self.prob.fitness(x)
  File "/local/scratch/bgodard/sw/anaconda3/lib/python3.6/site-packages/pykep/trajopt/_pl2pl_N_impulses.py", line 98, in fitness
    T[i] = log(x[2 + 4 * i])
ValueError: math domain error
Dario Izzo
@bgodard you have the latest pykep and pygmo?
$ conda search -f pykep
Loading channels: done
# Name                  Version           Build  Channel             
pykep                       2.0          py27_0  conda-forge         
pykep                       2.0          py35_0  conda-forge         
pykep                       2.0          py36_0  conda-forge         
pykep                       2.1          py27_0  conda-forge         
pykep                       2.1          py27_1  conda-forge         
pykep                       2.1          py35_0  conda-forge         
pykep                       2.1          py35_1  conda-forge         
pykep                       2.1          py36_0  conda-forge         
pykep                       2.1          py36_1  conda-forge         
$ conda list |grep pykep
pykep                     2.1                      py36_1    conda-forge
$ conda search -f pagmo
Loading channels: done
# Name                  Version           Build  Channel             
pagmo                       2.0               0  conda-forge         
pagmo                       2.1               0  conda-forge         
pagmo                       2.2               0  conda-forge         
pagmo                       2.2               1  conda-forge         
pagmo                       2.3               0  conda-forge         
pagmo                       2.4               0  conda-forge         
pagmo                       2.4               1  conda-forge         
pagmo                       2.5               0  conda-forge         
pagmo                       2.6               0  conda-forge         
pagmo                       2.6               1  conda-forge         
pagmo                       2.7               0  conda-forge         
$ conda list |grep pagmo
pagmo                     2.7                           0    conda-forge
$ conda search -f pygmo
[truncated output]          
pygmo                       2.6     np114py35_1  conda-forge         
pygmo                       2.6     np114py36_1  conda-forge         
pygmo                       2.7          py27_0  conda-forge         
pygmo                       2.7          py35_0  conda-forge         
pygmo                       2.7          py36_0  conda-forge         
$ conda list |grep pygmo
pygmo                     2.7                      py36_0    conda-forge
The above was on Redhat Linux 6.5. I have now tried a fresh anaconda install on a different system (Ubuntu 18.04), updated all packages to current and I get the same error.
Dario Izzo
@bgodard OK can you open an issue on pykep? I will look into it when I get my hands back into pykep
@darioizzo Done: esa/pykep#75. Errata: in my previous post, it should have read Redhat Linux 7.5
Dario Izzo
@bgodard Thanks I should be able to make a new release this month .... before summer and patch your issue if I manage to reproduce it.
Thanks to the devs for such a great package. I am working on an optimisation problem where the objective function takes around an hour to calculate and is limited to one core per instance for historical reasons. Due to the significant gains, I am planning a very basic parallel objective function, I started today and apologise for being quite rusty at C++. It seems like it requires API changes, is there a better way to do it? All that I've done so far is one commit, with two new mandatory functions 'start_fitness' and 'wait_get_fitness'. Fork is here https://github.com/willcodeforfudd/pagmo2 start_fitness returns a hash value, and wait_get_fitness is intended to collect the value from the hash (though for now, it just calls fitness).
Francesco Biscani
Hey @willcodeforfudd , the chat channel for pagmo2 is here https://gitter.im/pagmo2/Lobby
I am replying there to your question
Sorry. Thanks for fixing this.

Hello, there. I am new to pygmo and I just tried to use it today.
Here is my definition of the function

    class problem_udp:
        def fitness(self,x):
            out = []            
            out.append(rbf[m](x.reshape(1,n)))         #  rbf is outside defined class that return values of objective or constraint
            for i in range (m):
            return out
        def get_bounds(self):
        def get_nic(self):
            return m
        def get_nec(self):
            return 0
        def gradient(self,x):
            return pg.estimate_gradient_h(lambda x: self.fitness(x), x)

When I solve it, there is a error

  File "", line 625, in <module>
    pop = pg.population(prob = problem_udp(), size = 1)

  File "", line 450, in _population_init
    __original_population_init(self, prob, size, seed)

TypeError: No registered converter was able to produce a C++ rvalue of type double from this Python object of type numpy.ndarray

I do not know how to fix it cause I am also new to C++.

Could someone give me some advice about it?

Marcus Märtens
@liupangxianren since you are using pagmo2, please ask your questions in the corresponding channel
Other than that it looks like you want to give a UDP (user defined problem) to the population constructor. In pagmo2 this does not work. Instead, you have to construct a problem out of the UDP.
my_udp = problem_udp()
my_prob = pg.problem(my_udp)
pop = pg.population(prob = my_prob, size = 1)
Francesco Biscani
@liupangxianren I think we need more info on that rbf object you are using in the fitness. In your fitness() implementation, could you tell us what kind of objects out contains?
@bluescarni @CoolRunning Thanks for your help.
I have solved this issue. Because the indices of the list 'out' is an numpy array with a scalar. This raises the error.
Christopher Iliffe Sprague
Is there a gitter for dcgp?
Dario Izzo
@cisprague Its esa/dcgp, I just created it .... :)
Christopher Iliffe Sprague
Cool! Thanks. And the web-tool you have is super cool
Hi everyone, I have some questions about running pygmo algorithms in parallel. Is this the right place to do it?
Marcus Märtens

Cool! Thanks. And the web-tool you have is super cool

Thank you! I will tell the creator...

After failing to install pagmo from the source code I tried to install it with conda. Thus, I went on according to the instructions and used following codes in Anaconda terminal:
$ conda config --add channels conda-forge
$ conda install pagmo pagmo-devel
however, it seems it's not working. I waited for more than 24 hours. and the only resluts I get is as follow:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining msys2-conda-epoch: 5%|██▍ | 19/404 [00:00<00:01, 256.50it/s]|Examining clangdev: 6%|███▍ | 23/404 [00:00<00:01, 291.02it/-
Comparing specs that have this dependency: 12%|████▋ | 4/34 [02:23<17:57, 35.90s/i/
Comparing specs that have this dependency: 32%|████████████▌ | 11/34 [07:52<16:27, 42.92s/i| -
Examining clangxx: 32%|█████████████████▋ | 130/404 [3:02:16<33:17:40, 437.45s/i/
Comparing specs that have this dependency: 12%|████▋ | 4/34 [01:13<09:12, 18.43s/i- -
Examining llvm-meta: 36%|███████████████████▏ | 146/404 [7:24:50<25:06:39, 350.38s/i- \
Comparing specs that have this dependency: 30%|██████████▉ | 10/33 [59:29<2:16:49, 356.94s/i/ \
Comparing specs that have this dependency: 82%|███████████████████████████▊ | 27/33 [4:49:17<1:04:17, 642.86s/i- \Examining llvmdev: 42%|██████████████████████▊ | 171/404 [14:24:05<46:24:02, 716.92s/i- -
Comparing specs that have this dependency: 21%|███████ | 7/34 [1:58:00<7:35:10, 1011.50s/i\
Comparing specs that have this dependency: 32%|███████████ | 11/34 [2:00:39<4:12:18, 658.18s/it]\
Finding shortest conflict path for llvmdev==5.0.0: 100%|█████████████████████████████| 2/2 [1:10:51<00:00, 2125.98s/it]
I would appreciate if you let me know which part I'm doing wrong
Dario Izzo
@ShavaraniMahdi the chat for pagmo2 is https://gitter.im/pagmo2/Lobby this channel is now for the obsolete pagmo1.x
As for your ticket, thanks for reporting. It seems to me your conda env has some pinned old packages. Can you try from a clean conda env and only install pagmo?
Hussein Almulla
Hi, Is there anyone used pygmo to calculate hypervolume?
I am having some problems with it.
Dario Izzo
Use pagmo2 chat... Pagmo 1.x is no longer supported.