resibots / limbo

A lightweight framework for Gaussian processes and Bayesian optimization of black-box functions (C++11)

Home Page:http://www.resibots.eu/limbo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dynamic size of input dimensions?

jussihi opened this issue · comments

Let's consider a problem of N nodes in a 3d space, where one needs to find the right positions of the said nodes (with regards to some measurement data gathered from the environment/other nodes). Now, moving any of these N nodes will affect the evaluation function, so when I have N number of nodes and I try to solve the optimal locations of each node, my input dimension is of size N*3.

Now, if I don't know the number of nodes in advance, how should I write code with limbo, when its evaluation function seems to require the input dimension to be known during compile time (BO_PARAM macro expands to static constexpr during compilation).

Should I just create a macro of my own which generates evaluation functions to let's say 1-10 nodes and then use the correct generated eval struct, or is there a more sophisticated way to tackle this problem? I didn't look much further "under the hood", but why should the size of the input dimension be fixed during compilation?

Ah, just as I asked this, I figured that it had been answered already in #305.

I will close this one.