WeightedResponse

class WeightedResponse @JvmOverloads constructor(parent: ModelElement, name: String? = null) : Response(source)

A weighted response observes many other response variables. Whenever any response variable that it observes changes, it is assigned the underlying value of the response. Thus, observed responses that change more often occur more in the observed sample and thus contribute more 'weight' to the overall mean response. This, in essence, produces a weighted average across the observed responses.

Parameters

parent

the parent model element

name

the name of the aggregate response

Constructors

Link copied to clipboard
constructor(parent: ModelElement, name: String? = null)

Functions

Link copied to clipboard
fun observe(response: Response)
fun observe(response: ResponseCIfc)

The response will be observed by the weighted response such that whenever the response changes, the weighted response will be assigned the same value.

Link copied to clipboard
fun observeAll(responses: Collection<Response>)

Causes all the responses to be observed

Link copied to clipboard
fun remove(response: Response)
fun remove(response: ResponseCIfc)

The response will stop being observed by the weighted response.

Link copied to clipboard
fun removeAll(responses: Collection<Response>)

Causes all the responses to stop being observed