particle_swarm_optimization
Optimizes spacecraft trajectories by applying particle swarm optimization to defined problems, returning the best trajectory and convergence metrics. Use to find near-optimal solutions for complex aerospace design challenges.
Instructions
Optimize spacecraft trajectory using particle swarm optimization.
Args: optimization_problem: Problem definition (objective, constraints, variables) pso_parameters: Optional PSO parameters (n_particles, iterations, etc.)
Returns: JSON string with optimization results including best position found and convergence metrics.
Raises: No exceptions are raised directly; errors are returned as formatted strings.
Note: PSO updates each particle's velocity and position at every iteration: v_i(t+1) = wv_i(t) + c1r1*(p_best_i - x_i) + c2r2(g_best - x_i) x_i(t+1) = x_i(t) + v_i(t+1) where w is the inertia weight (balances exploration vs exploitation), c1/c2 are cognitive/social acceleration coefficients, r1/r2 are random numbers in [0,1], p_best_i is the particle's personal best, and g_best is the global best found by any particle in the swarm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| optimization_problem | Yes | ||
| pso_parameters | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |