ModECI / MDF

This repository contains the source for the MDF specification and Python API
https://mdf.readthedocs.io
Apache License 2.0
36 stars 69 forks source link

What happens when more than two edges connect to a single input port? #370

Open davidt0x opened 1 year ago

davidt0x commented 1 year ago

What happens when more that two edges connect to a single input port? This came up in our weekly meeting and we didn't know the answer.

pgleeson commented 1 year ago

Also being worked on here: https://github.com/ModECI/MDF/tree/cyclic_graphs

Need to add a field called reduce, can accept one of 2 keywords , add or multiply, and if inputs of different precisions, will return value of highest precision. Any more complex functions required for combining inputs, should be moved to internally in the node with multiple input ports

pgleeson commented 1 year ago

See: https://github.com/ModECI/MDF/commit/6b409a019781b9c8881e5362df3023743fbe1409 for initial implementation.

Note: still some open questions about what to do when a single node is run multiple times, e.g. as part of a graph wide condition. Should the current input to the node be added up each time? Probably not, so added a 3rd option overwrite to add and multiply, which is the default for now...