These are chat archives for bluescarni/pagmo_reborn

29th
May 2016
Marcus Märtens
@CoolRunning
May 29 2016 11:52
Hi guys - there is warning making me mad... :worried:
            std::vector<int>::reverse_iterator r_it_idx = d.rbegin();
            std::vector<int>::reverse_iterator r_it_idx_e = d.rend();
This gives: 'initializing': conversion from 'size_t' to 'int', possible loss of data
Dario Izzo
@darioizzo
May 29 2016 11:54
what is d?
Marcus Märtens
@CoolRunning
May 29 2016 11:55
std::vector<int> d;
changing the type from int to size_t is not really helping
I get the same warning if I do that consistently.
Dario Izzo
@darioizzo
May 29 2016 11:59
weird in clang I get nothing if i compile:
#include <iterator>
#include <vector>

int main()
{
  std::vector<int> d(5);
  std::vector<int>::reverse_iterator r_it_idx = d.rbegin();
  std::vector<int>::reverse_iterator r_it_idx_e = d.rend();
}
with g++ -std=c++11 prova.cpp
you on MSCV right?
need to go away, will resume in a few hours
Marcus Märtens
@CoolRunning
May 29 2016 12:02
k
that minimal example is also not making problems for me... weird. Something must happen in the rest of the code.
Marcus Märtens
@CoolRunning
May 29 2016 12:18
This piece of code is a mess - I have no clue, what it is doing
Dario Izzo
@darioizzo
May 29 2016 12:42
Back ...
Can you post the error message? The whole output from the compiler
Francesco Biscani
@bluescarni
May 29 2016 13:16
I'm loving how the docs are turning out
Dario Izzo
@darioizzo
May 29 2016 13:18
in python?
or overall?
Francesco Biscani
@bluescarni
May 29 2016 13:18
working on python right now
Dario Izzo
@darioizzo
May 29 2016 13:18
yeah, looking forward to the merge :)
Francesco Biscani
@bluescarni
May 29 2016 13:19
the C++ doc so far is a bit terse for my tastes
Dario Izzo
@darioizzo
May 29 2016 13:21
I imagine, its probably me liking to be "neatly or effectively concise"
Francesco Biscani
@bluescarni
May 29 2016 13:22
I like consistency better; what I mean is that sometimes there is full documentation for the methods, sometimes not
admittedly I have it easier in Python as I can define documentation strings using C++ functions, so I don't have to boringly repeat myself :)
Dario Izzo
@darioizzo
May 29 2016 13:25
example (in c++?) what is undocumented?
you mean stuff like:
    /// Gets the verbosity level
    unsigned int get_verbosity() const
    {
        return m_verbosity;
    }
Francesco Biscani
@bluescarni
May 29 2016 13:25
well for instance the fitness() method is well documented in pagmo::problem, but the fitness() method in the concrete problems are not as well documented
Dario Izzo
@darioizzo
May 29 2016 13:25
?
Francesco Biscani
@bluescarni
May 29 2016 13:26
the ctor of rosenbrock does not indicate it can throw for dimension < 2
stuff like that
I mean, we can decide to be terse or verbose but I'd prefer that we do it consistently
Dario Izzo
@darioizzo
May 29 2016 13:27
on the fitness, the mathematical details of the computations are in the general description of the problem.
the throw is instead been fogotten
Francesco Biscani
@bluescarni
May 29 2016 13:28
no I mean like documenting the params and stuff like that
return values
Dario Izzo
@darioizzo
May 29 2016 13:29
ah right, yeah too repetitive. I assumed it obvious for the interface methods ...
can always be added
Francesco Biscani
@bluescarni
May 29 2016 13:30
yeah I was wondering if it is one of those things to be filled in at a later stage or it is intended to stay like that :)
Francesco Biscani
@bluescarni
May 29 2016 13:52
there's also a bit of inconsistency that the population has a default ctor with null_problem but problem does not
Marcus Märtens
@CoolRunning
May 29 2016 13:52
hold on a sec
1>------ Build started: Project: hypervolume, Configuration: Debug x64 ------
1>  hypervolume.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\utility(203): error C2220: warning treated as error - no 'object' file generated
1>  c:\pagmo\pagmoreborn\include\detail\hypervolume_hv3d.hpp(146): note: see reference to function template instantiation 'std::pair<pagmo::vector_double,int>::pair<std::vector<double,std::allocator<_Ty>>,unsigned __int64,void,0>(std::pair<std::vector<_Ty,std::allocator<_Ty>>,unsigned __int64> &&) noexcept' being compiled
1>          with
1>          [
1>              _Ty=double
1>          ]
1>  c:\pagmo\pagmoreborn\include\detail\hypervolume_hv3d.hpp(146): note: see reference to function template instantiation 'std::pair<pagmo::vector_double,int>::pair<std::vector<double,std::allocator<_Ty>>,unsigned __int64,void,0>(std::pair<std::vector<_Ty,std::allocator<_Ty>>,unsigned __int64> &&) noexcept' being compiled
1>          with
1>          [
1>              _Ty=double
1>          ]
1>C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\utility(203): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
========== Build: 0 succeeded, 1 failed, 24 up-to-date, 0 skipped ==========
I see... I mixed up files
Error is happening in 146...
Francesco Biscani
@bluescarni
May 29 2016 13:57
basically you're trying to init an int via an unsigned int (size_t is unsigned)
that is happening in the initialisation of a pair
std::pair<pagmo::vector_double,int>
the second element of the pair is being initialised with an unsigned value
Marcus Märtens
@CoolRunning
May 29 2016 13:59
Yeah, I was looking at the completely wrong place.
Trying to sort this out now
Francesco Biscani
@bluescarni
May 29 2016 14:02
coolio
Marcus Märtens
@CoolRunning
May 29 2016 14:04
T.insert(std::make_pair(s_x, n + 1));
n needs to be int
However, n is int n = p.size();
With pbeing std::vector<vector_double> p(points.begin(), points.end());
apparently, this gives size_t
so now my error is in int n = p.size();
How I miss ducktyping
Marcus Märtens
@CoolRunning
May 29 2016 14:10
I sort of repaired it by int n = (int) p.size(); but this seems not exactly best practice
Francesco Biscani
@bluescarni
May 29 2016 14:14
size() is unsigned for a reason, if you are using n as some type of index or size it should probably be unsigned
but for now it'll do
Marcus Märtens
@CoolRunning
May 29 2016 14:21
It would be cleaner to have pairs with unsigned int then probably
Francesco Biscani
@bluescarni
May 29 2016 14:22
yes but if it requires too many changes it's better to postpone it
Marcus Märtens
@CoolRunning
May 29 2016 14:22
Finally... it compiles... and 3d hypervolume test passes as well
Francesco Biscani
@bluescarni
May 29 2016 14:23
:clap:
Marcus Märtens
@CoolRunning
May 29 2016 19:38
Did the multi-objective optimization ever work on MGA-1DSM problems? I have my doubts that these algorithms are doing anything once seeded. Am I missing a detail? :worried:
Dario Izzo
@darioizzo
May 29 2016 20:55
What is worrying you exactly? We used moo extensively on DSM models
Marcus Märtens
@CoolRunning
May 29 2016 21:03
First of all: you cannot just start MOO on the DSM - you have to find some good solutions first and seed the population.
This seed will typically have 3-4 fronts or more...
All what the MOO algorithm seems to do is to kick out those dominated fronts and - if you are lucky - minimally spread some solutions around
In fact, if you plot the seeding population together with the final population of the MO-optimization, you barely see an effect.
Dario Izzo
@darioizzo
May 29 2016 21:15
What we do is to solve the so problem with only dv, then seed that into a random pop and solve by decomposition
This makes the moo create a front using the dv starting solution and spreading it ....
But why are u asking? What exactly are you working on? I mean what problem?
Marcus Märtens
@CoolRunning
May 29 2016 21:16
I am working on the slides for the talk :)
I wanted to show an application on PaGMO so I was playing around with some MGA-1DSM stuff
btw: do you have access on the webserver?
Dario Izzo
@darioizzo
May 29 2016 21:17
Ah right ... so use moead, Nsga ii sucks
Then only seed with one Sol, the global optimal for dv
Which web server?
Marcus Märtens
@CoolRunning
May 29 2016 21:18
Any will do :)
Dario Izzo
@darioizzo
May 29 2016 21:18
So you are asking if I have access to any web server?
We have the ACT one, and Sophia
Marcus Märtens
@CoolRunning
May 29 2016 21:18
Well, could be sophia
The presentation I created needs a webserver to run, but it is cool as fuck
You just need to put the .html-file somewhere and it should work
Dario Izzo
@darioizzo
May 29 2016 21:19
send it then ... I a curious
Marcus Märtens
@CoolRunning
May 29 2016 21:19
okay, one second
send
Dario Izzo
@darioizzo
May 29 2016 21:22
why the web server? I can open it clicking on the html file
Marcus Märtens
@CoolRunning
May 29 2016 21:23
That is the uncool version
You need the web-server for the interactive things
Francesco Biscani
@bluescarni
May 29 2016 21:24
why not run a local webserver from python? I'm pretty sure it's a one-liner for a simple webserver
Dario Izzo
@darioizzo
May 29 2016 21:24
I have fired up the simple HTTP server from python
python -m SimpleHTTPServer 8000
but I still do not see any interactive shit
Marcus Märtens
@CoolRunning
May 29 2016 21:25
Sure, for the presentation I can do it locally
Dario Izzo
@darioizzo
May 29 2016 21:25
That is cool!! But I canno get it
Maybe you need some special kind of web server?
Marcus Märtens
@CoolRunning
May 29 2016 21:26
It needs to support Javascript
Dario Izzo
@darioizzo
May 29 2016 21:26
nodejs then ...
Francesco Biscani
@bluescarni
May 29 2016 21:26
isn't kind of the point of javascript to be client side?
Marcus Märtens
@CoolRunning
May 29 2016 21:29
maybe you can - I still fiddling around with it
Dario Izzo
@darioizzo
May 29 2016 21:30
how did you create the presentation?
Francesco Biscani
@bluescarni
May 29 2016 21:31
ah dammit it does not embed
Marcus Märtens
@CoolRunning
May 29 2016 21:32
Believe it or not: It is an IPython-notebook
Dario Izzo
@darioizzo
May 29 2016 21:32
lol
Marcus Märtens
@CoolRunning
May 29 2016 21:33
I send it to you... with the notebook you can actually see it working locally
Dario Izzo
@darioizzo
May 29 2016 21:33
Anyway, each time I get to see an overview of PaGMO I always reach the same conclusion ... ITS A FUCKING COOL PROJECT!!
Marcus Märtens
@CoolRunning
May 29 2016 21:34
there, check the notebook + the command from the eMail
That works locally for me
ah this works :)
Marcus Märtens
@CoolRunning
May 29 2016 21:38
good old giphy
Francesco Biscani
@bluescarni
May 29 2016 21:38
pagmo -> cool story
Francesco Biscani
@bluescarni
May 29 2016 21:40
lol nice
Marcus Märtens
@CoolRunning
May 29 2016 21:45
I also got it working now with the python server... just need to download reveal.js
Marcus Märtens
@CoolRunning
May 29 2016 21:51
@darioizzo Does it work?
Dario Izzo
@darioizzo
May 29 2016 21:57
I am on OSX dude .... nothing works
Will try tomorrow on linux .... (in osx I do not have py3 cleanly installed)
Marcus Märtens
@CoolRunning
May 29 2016 21:58
ah... sucks :P
If clone that thing (https://github.com/hakimel/reveal.js/) into the same directory, it should also work with the HTML
I am in love with this. Almost goodbye powerpoint.
Dario Izzo
@darioizzo
May 29 2016 22:01
works!!!
Super cool
So this is an ipython notebook right?
We can add it to the pagmo repo :)
Marcus Märtens
@CoolRunning
May 29 2016 22:02
This is an IPython notebook on crystal meth
Dario Izzo
@darioizzo
May 29 2016 22:02
BTW we do have MOEA/D as an algo too.
Marcus Märtens
@CoolRunning
May 29 2016 22:03
yeah, but I wanted to advertise Pade a bit
Dario Izzo
@darioizzo
May 29 2016 22:03
The one you describe its an approach, not an algo
I mean decomposing and solving in different islands
Ah ok PaDE it is ...
you do not name it ...
we also have a pape ron pade
paper
quote it ...
Marcus Märtens
@CoolRunning
May 29 2016 22:04
Will do
Still work in progress... especially at the end
Dario Izzo
@darioizzo
May 29 2016 22:04
Mambrini, Andrea, and Dario Izzo. "PaDe: a parallel algorithm based on the MOEA/D framework and the island model." Parallel Problem Solving from Nature–PPSN XIII. Springer International Publishing, 2014. 711-720.
Marcus Märtens
@CoolRunning
May 29 2016 22:05
I wonder, whether I should make a real big presentation and then just show part of it... It is sort of cool that you can move down for more details, but move right for the next topic and so on
Dario Izzo
@darioizzo
May 29 2016 22:05
On PyGMO 2.0:
Easy distribution: pip install pygmo
probably not ...
Marcus Märtens
@CoolRunning
May 29 2016 22:06
bummer
Dario Izzo
@darioizzo
May 29 2016 22:06
And I would advertise the type erasure thingy. Its a big selling point. The point being:
Before you had to code inheriting stuff from PyGMO
Now you can just code your stuff independently
Then if you put it into a pagmo::problem you get for free all the PaGMO power
So the user code and PaGMO are perpendicular !!
Marcus Märtens
@CoolRunning
May 29 2016 22:08
That is sort of hard to put into one line :)
Dario Izzo
@darioizzo
May 29 2016 22:09

Enhanced parallelization (ZeroMQ islands) -> I would just say

Enhanced parallelization: cross platform (OSX, Windows, linux)
Enhanced clustering capabilities

Anyway ... super cool work!!
Marcus Märtens
@CoolRunning
May 29 2016 22:11
thx - still not so happy with some parts
but it is a start
Try putting it on a webserver tomorrow... I wanna show Kiryx
And Francesco as well ^^