Comments (4)
@Sceki do you mind looking at this one too ? its a bit similar, not on the bound constraints, but on the general eq/ineq constraints
from pagmo2.
@jschueller can you please post a minimal code to reproduce this error?
from pagmo2.
here:
#include <pagmo/algorithms/maco.hpp>
#include <pagmo/population.hpp>
#include <pagmo/problems/rosenbrock.hpp>
#include <pagmo/problems/unconstrain.hpp>
using namespace pagmo;
struct problem1 {
vector_double fitness(const vector_double &x) const
{
const double g = 1.0 + 9.0 * (x[0] + x[1]);
return {x[0], g * (1.0 - std::sqrt(x[0] / g)), x[1]-x[0]}; // zdt1 + constraint x0>x1
}
std::pair<vector_double, vector_double> get_bounds() const
{
return {{0.0, 0.0}, {1.0, 1.0}};
}
vector_double::size_type get_nobj() const
{
return 2;
}
vector_double::size_type get_nic() const
{
return 1;
}
};
int main()
{
try {
problem prob{problem1{}};
prob = unconstrain(prob);
population pop1{prob, 0, 0};
int size = 80;
std::uniform_real_distribution<double> unif(0.0, 1.0);
std::default_random_engine re;
for (int i=0; i<size; ++i)
{
vector_double x(2);
x[0] = unif(re);
do {
x[1] = unif(re);
} while (false && x[0] <= x[1]);// ok if replace false by true
vector_double y = prob.fitness(x);
pop1.push_back(x);
}
maco user_algo1{10u};
pop1 = user_algo1.evolve(pop1);
}
catch(const std::exception & exc) {
std::cout << "ex="<<exc.what() <<std::endl;
return 2;
}
return 0;
}
from pagmo2.
@Sceki were you able to reproduce using my code ?
from pagmo2.
Related Issues (20)
- how to run pagmo2 in parallel cluster? HOT 1
- [BUG] redundant code in moead.cpp HOT 2
- [BUG] Could NOT find pagmo_IPOPT (missing: PAGMO_IPOPT_INCLUDE_DIR) HOT 1
- [BUG] No 2.19.0 tag HOT 2
- [BUG] moead_gen is not documented HOT 2
- [FEATURE] PAGMO_VERSION HOT 2
- Scaling of design variables and
- How to optimize with algorithms::ipopt? HOT 2
- [BUG] Maximize function with Ipopt: incorrect population returned HOT 2
- [BUG] Compilation problem with IPOPT HOT 7
- Question: Use of Hessian with Ipopt
- pagmo-devel 2.19 build 3 not found by meson build system HOT 5
- Passing arguments in a user defined problem HOT 6
- Uninitialized variables may be used in cec2014 problem
- MPI Island class for cluster computing HOT 1
- Avoid multiple definitions of mathematical constants
- No "NaN/infinity" verification in sbx crossover implementation AND no bounds verification for NSGA-II's initial population
- Add NSGA-III implementation
- Question about get_bounds() HOT 3
- [BUG] Many tests fail with unknown location(0): fatal error:
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pagmo2.