Comments (1)
Hello @kmodexc, thanks for sharing a MWE, I could replicate your error.
I initially thought this was a bug, but if you diff
alpso.py
and alpso_ext
(the latter is the one imported when "parallelType": "EXT"
) you will see how the parallel version expects a different objFunc
signature that returns a vector f
of len(swarsize)
instead of a scalar.
I am not familiar with this PSO algorithm , but in the default mode alpso
loops over every particle of the swarm and evaluates the (scalar) objfunc at that point. In the parallel version, there is no such loop. We do not have examples afaik, but it looks like alpso_ext
passes an array with all the DVs of all the particles at a given iteration, and expects a vector f with all the function values of the particles at the same iteration.
In short, if you remove the "parallelType": "EXT"
option the optimizer will work. To run the optimizer in parallel mode, it is on the user to provide an objfunc
that runs in parallel and returns a vector of the correct size.
from pyoptsparse.
Related Issues (20)
- `import pyoptsparse` hangs (on local machine) when using a vpn HOT 11
- Different behavior of Popen with and without pyoptsparse. HOT 4
- NumPy 2.0 compatibility
- NumPy 1.25 deprecation
- installation error
- Numpy 1.25 deprecation warnings reintroduced
- SNOPT tests failing on stable images HOT 2
- Linking pyoptsparse to cyipopt
- Non-linear Sparse Constraint Jacobians
- SNOPT printout contains non-UTF8 characters
- pyOPTsparse and NLPQLP HOT 1
- error during the installation
- ParOpt error at opt call HOT 1
- Error during installation HOT 1
- Error while importing pyoptsparse HOT 4
- URGENT: Open MPI failure HOT 3
- print (sol) of nsga2 is error
- How to obtain the Pareto front via NSGA-II HOT 1
- Turn SNOPT restart dict into a class object
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 pyoptsparse.