Skip to main content
Glama

genetic_algorithm_optimization

Optimize spacecraft trajectories using genetic algorithms to solve aerospace engineering problems with defined objectives and constraints.

Instructions

Optimize spacecraft trajectory using genetic algorithm.

Args: optimization_problem: Problem definition (objective, constraints, variables) ga_parameters: Optional GA parameters (population_size, generations, etc.)

Returns: JSON string with optimization results

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
optimization_problemYes
ga_parametersNo

Implementation Reference

  • The handler function for the 'genetic_algorithm_optimization' MCP tool. It accepts an optimization problem definition and optional GA parameters, attempts to delegate to an external trajopt integration for the actual computation, and returns JSON-formatted results or error messages if unavailable or failed.
    def genetic_algorithm_optimization( optimization_problem: dict, ga_parameters: dict | None = None ) -> str: """Optimize spacecraft trajectory using genetic algorithm. Args: optimization_problem: Problem definition (objective, constraints, variables) ga_parameters: Optional GA parameters (population_size, generations, etc.) Returns: JSON string with optimization results """ try: from ..integrations.trajopt import ( genetic_algorithm_optimization as _ga_optimize, ) result = _ga_optimize(optimization_problem, ga_parameters or {}) return json.dumps(result, indent=2) except ImportError: return "Genetic algorithm optimization not available - install optimization packages" except Exception as e: logger.error(f"GA optimization error: {str(e)}", exc_info=True) return f"GA optimization error: {str(e)}"
  • Registers the genetic_algorithm_optimization tool with the FastMCP server using the mcp.tool decorator/function.
    mcp.tool(genetic_algorithm_optimization)
  • Imports the genetic_algorithm_optimization handler from the optimization tools module for use in the FastMCP server.
    from .tools.optimization import ( genetic_algorithm_optimization, monte_carlo_uncertainty_analysis, optimize_thrust_profile, particle_swarm_optimization, porkchop_plot_analysis, trajectory_sensitivity_analysis, )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cheesejaguar/aerospace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server