<jupyter_start><jupyter_text>Simple Static Volume ExampleFrom the OpenSE Cookbook, [Simple Static Roll Up Pattern](https://mms.openmbee.org/alfresco/mmsapp/mms.html/projects/PROJECT-ID_2_2_17_7_33_25_AM_3ccfaf88_159fe0d7ba9__7d4e_cae_tw_jpl_nasa_gov_127_0_0_1/master/documents/_18_5_2_e64033a_1513278979739_556269_28755/views/_18_0_6_baa02e2_1488179002585_271114_52894)<jupyter_code>package SimpleStaticVolumeExample{
    package Analysis{
        import ScalarValues::Real;
        import ScalarFunctions::*;
        import Structure::*;

        block AnalysisContext{
            part subsystem : SubsystemWithVolume[0..*];

            value offset : Real = 0.0;
            value totalVolume : Real;
                
            constraint sum : TotalChildren(
                child = SubsystemWithVolume::volume, 
                total = totalVolume,
                offset = offset);
        }

        constraint def TotalChildren(child : Real[0..*], total : Real, offset : Real){
            total = sum(child) + offset;
        }
    }

    package Structure{
        import ScalarValues::Real;
        import Analysis::*;
        
        block SubsystemWithVolume{
            value volume : Real;
        }

        block ComponentA :> SubsystemWithVolume;
        block ComponentB :> SubsystemWithVolume;
        block ComponentC :> SubsystemWithVolume;
        block ComponentD :> SubsystemWithVolume;

        individual def analysisContext :> AnalysisContext;
        
        individual analysisExample : analysisContext{
            block componentA specializes ComponentA{
                :>> volume = 10.0;
            }
            block componentB specializes ComponentB{
                :>> volume = 8.0;
            }
            block componentC specializes ComponentC{
                :>> volume = 2.5;
            }
            block componentD specializes ComponentD{
                :>> volume = 9.0;
            }
        }
    }
}
%viz --view=Default SimpleStaticVolumeExample<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.07801766437684005, 'fraction_numerical': 0.05053974484789009, 'mean_word_length': 2.0987841945288754, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 18, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '264413', 'license': 'Apache-2.0', 'n_tokens_mistral': 634, 'n_tokens_neox': 560, 'n_words': 110, 'path': 'SysML2x/RollUpPatterns/SimpleStaticVolumeExample.ipynb', 'repo_name': 'Open-MBEE/SE-Cookbook', 'size': '2038'}