HydroPilot

UQPyL Integration

UQPyL Integration

HydroPilot provides UQPyLAdapter to bridge HydroPilot configurations into UQPyL optimization workflows.

Core idea

UQPyLAdapter wraps a HydroPilot configuration as a UQPyL Problem. This lets UQPyL optimizers call HydroPilot model evaluations through the standard Problem interface.

What the adapter maps

  • design parameter count -> nInput
  • objective count -> nObj
  • constraint count -> nCon
  • bounds -> lb and ub
  • variable types -> varType and varSet

How evaluation flows

The adapter delegates to SimModel internally. In practice, the flow is:

text
UQPyL algorithm
  -> Problem.evaluate(X)
  -> UQPyLAdapter
  -> SimModel.run(X)
  -> HydroPilot runtime
  -> objective / constraint arrays

This keeps concerns separate:

  • HydroPilot owns model execution, parameter writing, output extraction, and metric evaluation
  • UQPyL owns optimization, search policy, and higher-level algorithm behavior

Basic usage

python
from UQPyL.optimization.soea import GA
from hydropilot.integrations import UQPyLAdapter

with UQPyLAdapter("config.yaml") as problem:
    algorithm = GA()
    result = algorithm.run(problem, seed=42)

The adapter can also be called directly through evaluate(X), objFunc(X), and conFunc(X) when you want lower-level control.

When to use it

Use this path when:

  • the model execution layer is easier to express in HydroPilot
  • the search or analysis algorithm is easier to express in UQPyL
  • you want to separate hydrological runtime concerns from optimization concerns

Scope and limits

UQPyLAdapter is a bridge, not a second analysis layer inside HydroPilot.

What it gives you:

  • a UQPyL-compatible Problem
  • standard objective and constraint accessors
  • reuse of HydroPilot's runtime and config system

What it does not give you:

  • UQPyL algorithms themselves
  • optimizer-specific convergence guarantees
  • HydroPilot-native implementations of UQPyL analysis modules