Skip to main content

A dynamic, graph-driven Multidisciplinary Design Optimization (MDO) framework integrating FalkorDB, OpenMDAO, and multi-fidelity surrogate models.

Project description

GraphMDO: Dynamic Multi-Fidelity MDO Framework

Python Version Quality Checks Security Scan Deploy Documentation codecov

GraphMDO bridges data engineering and MDO. It extracts topological data (solvers, variables, fidelity levels) to form an oriented graph, specifically utilizing KADMOS for semantic formulation and exporting to CMDOWS. The execution is handled by OpenMDAO and the Surrogate Modeling Toolbox (SMT), driven by constrained Bayesian optimization (ax-platform) or evolutionary algorithms (pymoo). The primary operational goal is to isolate and maximize a single target performance metric while strictly holding all other performance metrics constant.

Key Features

  • Native Graph Formulation: Uses FalkorDB to store problem definitions (variables, tools, dependencies) as a property graph.
  • Dynamic Problem Construction: Automatically translates the graph topology into an executable OpenMDAO problem.
  • Multi-Fidelity Surrogates: Integrates SMT for Co-Kriging and other surrogate models.
  • Constrained Bayesian Optimization: Leverages Ax Platform for robust optimization, easily managing KADMOS multi-objective targets, fidelity, and discrete/continuous parameters.

Project Architecture

  1. FalkorDB: Stores the "Fundamental Problem Graph" (FPG).
  2. Graph Manager: Python API to manipulate the graph structure.
  3. Translator: Converts the graph into an OpenMDAO System.
  4. Optimizer: Drivers (Ax, Pymoo) that execute the OpenMDAO problem holding constraints constant.

Installation

This project uses uv for dependency management.

  1. Install uv (if not installed): See astral.sh/uv.

  2. Clone and Install:

    git clone https://github.com/jultou-raa/GraphMDO.git
    cd GraphMDO
    uv sync
    
  3. FalkorDB: Ensure you have a running FalkorDB instance (e.g., via Docker):

    docker run -p 6379:6379 -it falkordb/falkordb
    

Usage

1. Defining a Problem (Python API)

You can programmatically build your MDO problem graph:

from mdo_framework.db.graph_manager import GraphManager

gm = GraphManager()
gm.clear_graph()

# Define Variables
gm.add_variable("x", value=1.0, lower=0.0, upper=10.0)
gm.add_variable("y", value=2.0, lower=0.0, upper=10.0)
gm.add_variable("z", value=0.0)

# Define Tool
gm.add_tool("MyTool")

# Define Connections
gm.connect_input_to_tool("x", "MyTool")
gm.connect_input_to_tool("y", "MyTool")
gm.connect_tool_to_output("MyTool", "z")

2. Running Optimization

Once the graph is populated, you can run the optimization workflow. You need to provide the actual Python functions corresponding to the tool names in the graph.

from mdo_framework.core.translator import GraphProblemBuilder
from mdo_framework.optimization.optimizer import BayesianOptimizer
from mdo_framework.core.evaluators import LocalEvaluator
from mdo_framework.core.topology import TopologicalAnalyzer

# Define tool implementation
def my_tool_func(x, y):
    return x + y  # Simple example

# Registry maps graph tool names to Python callables
tool_registry = {
    "MyTool": my_tool_func
}

# Build OpenMDAO Problem from Graph
schema = gm.get_graph_schema()
builder = GraphProblemBuilder(schema)
prob = builder.build_problem(tool_registry)

# Resolve Topology mapping design_vars automatically from KADMOS graph
analyzer = TopologicalAnalyzer(schema)
design_vars, _ = analyzer.resolve_dependencies(["z"])
parameters = analyzer.extract_parameters(design_vars)

# Run Optimization
evaluator = LocalEvaluator(prob)
optimizer = BayesianOptimizer(
    evaluator=evaluator,
    parameters=parameters,
    objectives=[{"name": "z", "minimize": True}],
)

result = optimizer.optimize(n_steps=10)
print(f"Best Result: {result['best_objectives']} at {result['best_parameters']}")

3. Running Tests

uv run pytest tests/

Contributing

  1. Follow PEP 8 guidelines.
  2. Ensure 100% test coverage for new features.
  3. Use uv run pre-commit run --all-files before committing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphmdo-0.1.3.tar.gz (175.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphmdo-0.1.3-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file graphmdo-0.1.3.tar.gz.

File metadata

  • Download URL: graphmdo-0.1.3.tar.gz
  • Upload date:
  • Size: 175.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for graphmdo-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ec74f7a3bbd0a4bce299b35feeb4e49fbbd9ceeea701a9173df1ad3bb4e6aa0e
MD5 e65f1f5dac89297ac488fc94c950af26
BLAKE2b-256 eabf00207b38623ede590da1c650493ec93fd41f9575c4d7c8be5029114b4620

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphmdo-0.1.3.tar.gz:

Publisher: pypi-publish.yml on jultou-raa/GraphMDO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file graphmdo-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: graphmdo-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for graphmdo-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2f92d583e9d4c5d64ef6b5eebe9e547e1b6a7f685c57d2580d546433ac8fbf1c
MD5 07b3f57132bc65531daa0b0bab6a7e6e
BLAKE2b-256 bed6158dd302f87c27eb0fcda4a2f3097061e89362565d7fa7c122f7433d516a

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphmdo-0.1.3-py3-none-any.whl:

Publisher: pypi-publish.yml on jultou-raa/GraphMDO

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page