Personal tools
You are here: Home Community Help Center Reference Manuals RiskAnalytics Developer's Guide Model Concepts

3.1. Concepts

Up one level
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.

 

Document Actions