Personal tools

Model

Note: Return to reference manual view.

WORK IN PROGRESS: IT technical issue to develop components and models.

1. Concepts

A model consists of at least one component and needs a parameterization and result template to be run.

Example of a model consisting of a common frequency and two claims size generators:

class MarkModel extends Model {

    FrequencyGenerator frequencyGenerator
    SingleClaimsGenerator claimsGeneratorFire
    SingleClaimsGenerator claimsGeneratorMotor

    void initComponents() {
        frequencyGenerator = new FrequencyGenerator()
        claimsGeneratorFire = new SingleClaimsGenerator()
        claimsGeneratorMotor = new SingleClaimsGenerator()

        addStartComponent frequencyGenerator
    }

    void wireComponents() {
        claimsGeneratorFire.inClaimCount = frequencyGenerator.outFrequency
        claimsGeneratorMotor.inClaimCount = frequencyGenerator.outFrequency
    }
}
  • Each model has to be derived from org.pillarone.riskanalytics.core.model.Model and are defined in a Groovy class as wiring would not work in a Java class. Model files should be placed in src/java/models
  • Components have to be declared as member variables and initialized in the initComponents() method.
  • One or several components are the starting point of the 'net', they have to be added as start components so that they won't wait on other components input.
  • Components are wired in order to send information from one to another component. A component will become active once it has received all input from its proceeding components.

 

2. Deterministic Model

A run of a deterministic model contains of a single iteration.

The output of all components in a deterministic model is not random, therefore a single iteration is sufficient.

Document Actions