The creation of a new composite strategy is realized via the Strategy Class Coder software. This topic provides a step-by-step guide for this creation.
The composite strategy will compose two simple strategies.
1. Download the Strategy Class Coder application (http://components.biomamodelling.org/components/scc/publish.htm)
2. Open the SCC software and click on "Data-interfaces DLL". A file browser will appear.
3. Select the .dll file CRA.Diseases.Airborne.DiseaseProgress.Interfaces containing the definition of the domain classes of the DiseaseProgress component.
4. Once done, the SCC software will automatically configure according to the domain classes included in the .dll file loaded:
5. Then, click on the "Strategies DLL" button. A file browser will appear.
6. Select the .dll file CRA.Diseases.Airborne.DiseaseProgress, containing the definition of the strategies of the DiseaseProgress component.
7. Once done, click on the "Composite or Context strategy" button. The panel "Associated strategies" will appear.
8. Then, the General panel has to be filled with the definition of the Domain, the Model Type, the Strategy name, the Strategy description (these fields must be filled according to the user need). The right part of the graphical user interface let the opportunity to add some information about the author of the strategy. This part is common to the creation of a simple strategy.
9. The definition of the input and output variables ("Inputs - Outputs" panel) and of the parameters ("Parameters" panel) of a composite strategy is the same as of a simple strategy, therefore please see the topic "How to create a simple strategy"
10. Once done, select the "AssociatedStrategies" panel. Click on the "SelectStrategy" button to select the simple, composite or context strategies to be composed.
11. In this example, the two strategies Incubation and Latency are composed. Then click on the "GenerateCode" button
12. Most of the generated code of a composite strategy is the same as for simple strategy (topic "What is a strategy"). The only differences are that SCC automatically retrieves the input and output variables and the parameters from the associated strategies for the test of pre- and post- conditions.
As for simple strategies, the only method which should be implemented by the developer is the "Estimate" method.
Once a composite strategy is created, the SCC software compiles a code region ("Composite class: associations"), in which the method "EstimateOfAssociatedClasses" calls the "Update" method of the simple strategies associated. This is the only logic implemented by default.
Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator