  Fundamental diagrams describe the relationship between speed, flow, and
density for some roadway (or set of roadway) configuration(s). These diagrams
typically do not reflect, however, information on how speed-flow relationships
change as a function of exogenous variables such as curb configuration, weather
or other exogenous, contextual information. In this paper we present a machine
learning methodology that respects known engineering constraints and physical
laws of roadway flux - those that are captured in fundamental diagrams - and
show how this can be used to introduce contextual information into the
generation of these diagrams. The modeling task is formulated as a probe
vehicle trajectory reconstruction problem with Neural Ordinary Differential
Equations (Neural ODEs). With the presented methodology, we extend the
fundamental diagram to non-idealized roadway segments with potentially
obstructed traffic data. For simulated data, we generalize this relationship by
introducing contextual information at the learning stage, i.e. vehicle
composition, driver behavior, curb zoning configuration, etc, and show how the
speed-flow relationship changes as a function of these exogenous factors
independent of roadway design.
