USACE / go-consequences

A lightweight consequences computational engine written in Go
MIT License
14 stars 11 forks source link

Sample Occupancy type is super inefficient #64

Open HenryGeorgist opened 3 years ago

HenryGeorgist commented 3 years ago

https://github.com/USACE/go-consequences/blob/64ddb7aac89f8cd85a2970e6612be90a9af5b092/structures/structure.go#L52

The way we sample occupancy type is to actually update the uncertainty on all damage functions in the entire damage function family. At the time of sampling though we actually know the hazard, we should only sample the damage function for the given hazard.

HenryGeorgist commented 3 years ago

this would require a change to the sample interface to allow for an argument of hazard, not a big deal, but it makes it where it does not conform to the value sampler interface - which is probably ok.