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, 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.2.tar.gz (174.5 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.2-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphmdo-0.1.2.tar.gz
  • Upload date:
  • Size: 174.5 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.2.tar.gz
Algorithm Hash digest
SHA256 30c7d8ebca9273eecae2c5b1fde0382568a9904671d81af05ee2d768818fb259
MD5 d966dc3d498d8244bde25fa197dd3478
BLAKE2b-256 5a6d03a42722cae0cd908ceb513d2f6d243ef4595912eba560efc0f70157de87

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphmdo-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: graphmdo-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 22.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 371da59f2a3d3d776eed9900733b50c04e2312f63c0c51f4d9718384f77fd3e7
MD5 1eeb1d52a437e3ced40c1a29fe248176
BLAKE2b-256 0183c03f97fabccbff4b22339f6b08519502124ec64a861b8239b39c699ab925

See more details on using hashes here.

Provenance

The following attestation bundles were made for graphmdo-0.1.2-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