<commit_before>{
    "restart_log" : true,
    "engine" : {
        "type" : "sim",
        "start_time" : "-P30D",
        "end_time" : null
    },
    "events" : [
        //{
        //    "action" : { "install_analyser" : {} }
        //},
        {
            "comment" : "Smart Meters across the UK",
            "repeats" : 5000,
            "action": {
                "create_device" : {
                    "functions" : {
                        "basic" : {
                            "label_root" : "Meter "
                        },
                        "comms" : {
                            "reliability" : "rssi",
                            "reliability_above_rssi_knee" : 0.90,
                            "period" : "PT1H",
                            "suppress_messages" : true
                        },
                        "enumerated" : {
                            "name" : "fault",
                            "values" :  [null,   "tamper", "mains loss", "cover removed", "hardware fault", "calibration error", "internal fault", "link interference", "over-temperature"],
                            "periods" : ["P5D",  "P140D",   "P80D",       "P100D",          "P200D",           "P200D",             "P150D",           "P120D",              "P300D"],
                            "comment" : "we include null as a state too, so that faults get cleared after a while"
                        },
                        "firmware" : {},
                        "latlong" : {
                            "generate_addresses" : true,
                            "area_centre" : "Sheffield, UK",
                            "area_radius" : "Edinburgh, UK",
                            "devices_per_address" : [1,3]
                        },
                        "variable" : [
                            {   "name" : "vendor",  "value" : ["Landis & Gyr", "EDMI", "Aclara", "Itron", "Kaifa", "Honeywell", "Flonidan", "GWI"]},
                            {   "name" : "model",   "value" : ["E470-5394", "ES-10A", "SGM1412", "EM425-I2", "MA120", "AS203P", "BK-G4E", "E470", "G4-MG-SE"]},
                            {   "name" : "hardware_version", "value" : [0.4,0.6,0.9,1.1,1.5] },
                            {	"name" : "device_type", "value" : "smart_meter"},
                            {   "name" : "icon", "value" : "bolt"},
                            {   "name" : "energy", "timefunction" : { "count" : { "interval" : "PT1H" } } }
                        ]
                    }
                }
            }
        },
        {
            "comment" : "Inject a comms failure in one region",
            "at" : "P20D",
            "action": {
                "change_property" : {
                    "identity_property" : "address_administrative_area_level_2",
                    "identity_value" : "South Yorkshire",<commit_msg>Added regional comms failure<commit_after>#define INSTALL_METER
            "action": {
                "create_device" : {
                    "functions" : {
                        "basic" : {
                            "label_root" : "Meter "
                        },
                        "comms" : {
                            "reliability" : "rssi",
                            "reliability_above_rssi_knee" : 0.90,
                            "period" : "PT1H",
                            "suppress_messages" : true
                        },
                        "enumerated" : {
                            "name" : "fault",
                            "values" :  [null,   "tamper", "mains loss", "cover removed", "hardware fault", "calibration error", "internal fault", "link interference", "over-temperature"],
                            "periods" : ["P5D",  "P140D",   "P80D",       "P100D",          "P200D",           "P200D",             "P150D",           "P120D",              "P300D"],
                            "comment" : "we include null as a state too, so that faults get cleared after a while"
                        },
                        "firmware" : {},
                        "latlong" : {
                            "generate_addresses" : true,
                            "area_centre" : "Sheffield, UK",
                            "area_radius" : "Edinburgh, UK",
                            "devices_per_address" : [1,3]
                        },
                        "variable" : [
                            {   "name" : "vendor",  "value" : ["Landis & Gyr", "EDMI", "Aclara", "Itron", "Kaifa", "Honeywell", "Flonidan", "GWI"]},
                            {   "name" : "model",   "value" : ["E470-5394", "ES-10A", "SGM1412", "EM425-I2", "MA120", "AS203P", "BK-G4E", "E470", "G4-MG-SE"]},
                            {   "name" : "hardware_version", "value" : [0.4,0.6,0.9,1.1,1.5] },
                            {	"name" : "device_type", "value" : "smart_meter"},
                            {   "name" : "icon", "value" : "bolt"},
                            {   "name" : "energy", "timefunction" : { "count" : { "interval" : "PT1H" } } }
                        ]
                    }
                }
            }
#enddef
{
    "comment" : "Smart Meters across the UK",
    "restart_log" : true,
    "engine" : {
        "type" : "sim",
        "start_time" : "-P30D",
        "end_time" : null
    },
    "events" : [
        //{
        //    "action" : { "install_analyser" : {} }
        //},
        {   
            "comment" : "install lots of meters instanteneously at the start",
            "repeats" : 3000,
            INSTALL_METER
        },
        {   
            "comment" : "Install more meters gradually thereafter (showing a CEO-pleasing installation curve)",
            "repeats" : 3000,
            "interval" : "PT45M",   // takes three months to install the rest
            "time_advance" : false, // Don't advance the "at" time (so subsequent actions will occur relative to the START of this installation)
            INSTALL_METER
        },
        {
            "comment" : "Inject a comms failure in one region",
            "at" : "P10D",
            "action": {
                "change_property" : {
                    "is_attribute" : true,
                    "identity_property" : "address_administrative_area_level_2",
                    "identity_value" : "South Yorkshire",
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.02545968882602546, 'mean_word_length': 1.0622164614387557, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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}}
{'dir': 'git-commits-cleaned', 'id': '5184938', 'n_tokens_mistral': 1933, 'n_tokens_neox': 1777, 'n_words': 364}