noads.core.model#
Core model based on gemseo-jax classes.
- class noads.core.model.AutoModel(name)[source]#
Bases:
ModelModel whose inputs and outputs are auto-detected from a JAX function.
Subclasses implement
_jax_func()with named arguments; the argument names become the discipline input names and the returned variables the output names (viagemseo_jax.auto_jax_discipline.AutoJAXDiscipline). This is the most common base class for NOADS models, as it removes the boilerplate of declaring grammars by hand.- discipline: AutoJAXDiscipline#
- class noads.core.model.JAXModel(function, input_names, output_names, default_inputs, name)[source]#
Bases:
ModelModel built from a dict-based JAX function.
The function maps a dictionary of named input arrays to a dictionary of named output arrays. Input and output names are given explicitly, which allows functions whose signature cannot be introspected (e.g. closures or partial applications). For plain functions with named arguments, prefer
AutoModel, which detects names automatically.- discipline: JAXDiscipline#
- class noads.core.model.Model(discipline)[source]#
Bases:
objectBase class of all NOADS models, wrapping a GEMSEO-JAX discipline.
A model holds a single
gemseo_jax.jax_discipline.JAXDiscipline, i.e. a JAX-traceable function with named inputs and outputs that GEMSEO can execute, couple with other disciplines, differentiate with automatic differentiation, and compile just-in-time. Physical and behavioral models (aircraft, fleet, energy, traffic) expose one or several*_model()factory methods returningModelinstances, which are then assembled byTemporalScenario.- Parameters:
discipline (JAXDiscipline)
- discipline: JAXDiscipline#
Classes