-/* Copyright (c) 2007-2011 Massachusetts Institute of Technology
+/* Copyright (c) 2007-2014 Massachusetts Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
}
else
d->N = population;
- if (d->N < n + 1) /* population must be big enough for a simplex */
- return NLOPT_INVALID_ARGS;
+ if (d->N < n + 1) { /* population must be big enough for a simplex */
+ nlopt_stop_msg(stop, "population %d should be >= dimension + 1 = %d",
+ d->N, n+1);
+ return NLOPT_INVALID_ARGS;
+ }
d->n = n;
d->stop = stop;