Opened 13 years ago

Closed 13 years ago

#273 closed enhancement (fixed)

Add tests that instantiate ERFs and call updateForecast()

Reported by: Peter Powers Owned by: Peter Powers
Priority: major Milestone: OpenSHA 1.2
Component: sha Version:
Keywords: Cc:


This is one of several easy to implement baseline tests that will improve routine monitoring of the project.

Change History (2)

comment:1 Changed 13 years ago by Kevin Milner

OK I created a test in trunk/test/org/opensha/sha/earthquake/rupForecastImpl/ Here is the criteria:

Tests the following criteria for each DevStatus?.PRODUCTION ERF.

  • ERF instantiation is not null
  • updateForecast() returns successfully

If the erf is a regular ERF the following criteria is checked:

  • has at least 1 source
  • each source is not null
  • each source has a non null source surface with at least 1 point (exceptions are allowed on getSourceSurface if it is a point source)
  • each source has a non null name
  • each source has a non null TectonicRegionType?
  • each source has at least 1 rupture
    • each rupture is not null
    • each rupture's surface is not null and has at least 1 point
    • each rupture's magnitude and probability are not NaN
    • each rupture's magnitude is within 0 each rupture's probability is within 0<=prob<=1

If the erf is an EpistemicListERF the following criteria is checked:

  • has at least one ERF
  • each ERF conforms to the critera above for regular ERFs.

Unfortunately, of the 22 current production ERFs, there is 1 failure and 4 errors. Here are the failures:

  • WG02_EqkRupForecast (source 40, "San_Andreas...SAN_tail" has no ruptures)
  • PEER_AreaForecast (error)
  • PEER_MultiSourceForecast (error)
  • FloatingPoissonFaultERF (error)
  • PoissonFaultERF (error)

This sort of test doesn't really apply to the PEER & Poisson fault ERFs since they require the user (or a control panel) to set parameters. Should we create some sort of tagging interface, or maybe a boolean in ERF_Ref for differentiating between ERFs that are self-sufficient, and those that aren't?

Leaving this open until these issues are resolved.

comment:2 Changed 13 years ago by Peter Powers

Resolution: fixed
Status: newclosed

WG_02 has been fixed and a switch added to cathc the other four ERFs that fail due to a lack of user input when updateForecast() is called.

Note: See TracTickets for help on using tickets.