-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Edge weights are currently static--they must be provided during the generation of the hypergraph. But edge weights are really use case dependent, in that you would want to assign different edge weights to the same graph for different decisions/simulations. While edge weights can be individually modified, it would be preferable to have some check that allows the edge weight to be calculated at run time as a combination of the input nodes.
An example of why this would be useful might be checking a model's fidelity. If an input is well within the model's scope, then the fidelity might be very high. But if an input is near the boundaries of the model's validity frame, the output would be more questionable. That variation could be captured by a function whose domain is the inputs to the edge. Then the model weight would be calculated by that function whenever the edge is simulated.
The format of this would be similar to an via
statement. The default behavior would be to return an edge weight of 1, otherwise a user can supply a custom function that returns different values. The inputs to the function are the same as the inputs to the edge.
Suggested by Evan Taylor (@etaylo6).