ObjectModel Overview

In the Phenome, objects are defined in terms of a combination of Object ClassType and inherit from a ROOT object in that class. Each object is then defined by a PropertyModel (capable of being described with individual properties), a DataModel (made up of interesting KPIs for an object), an ActionModel (a description of actions that can be performed on or by the object), a RelationModel (a set of instructions that describe how the objects behave in relation to other objects), and a ThoughtModel (describing inputs for predictive problems).

Root Objects

In the Metadata, each Object Model has a header section that defines these types. The sky is the limit, but say for example you wanted to model Refrigerators in the Phenome. The first thing that must be done is to create a ROOT object for a refrigerator.

Example of OBJECT_MODEL section HEADER for a REFRIGERATOR:

{
    "id": "ROOT_REFRIGERATOR",
    "description": "All Refrigerators",
    "model_classtype": "APPLIANCE",
    "model_subclasstype": "REFRIGERATOR",
    "model_classname": "appliancedoctor.appliances.fridges.basefridge.BaseFridge",
    "model_classname_poller": "APPLIANCE_POLLER",
    "model_classname_results": "appliancedoctor.appliance_results.ApplianceResults",
    "model_classname_processor": "appliancedoctor.appliance_processor.ApplianceProcessor",
    "phenome": {
        "property_model": [
            { "name": "door_style", "description": "Style of Doors", "property_type": "CONFIGURATION", "value_type": "TEXT", "default": "single-door" }
        ]
    }
}

In this initial configuration we defined a refrigerator and a door style property.

  • model_classtype is an “APPLIANCE”

  • model_subclasstype we created something called a “REFRIGERATOR”

  • the ROOT OBJECT_MODEL definition would be identified as “ROOT_REFRIGERATOR”

  • each fridge has a property called door_style

Each Root Object will have a Property Model defined (see PropertyModel). The property model will contain all the common properties for ALL refrigerators, irregardless of make or model. Then following that first OBJECT_MODEL definition, subsequent definitions can be made for particular MAKES and MODELS of refrigerators.

Derived Objects

Now that we have defined a ROOT refrigerator (one that all other refrigerators will be based on), we will have to add some different types of refrigerators.

You might have an LG refrigerator, that uses the default door_style, so the definition is very simple.

{
    "id": "LG_REFRIGERATOR",
    "description": "LG Refrigerator",
    "model_classtype": "APPLIANCE",
    "model_subclasstype": "REFRIGERATOR",
    "model_classname": "appliancedoctor.appliances.fridges.basefridge.BaseFridge"
}

If our LG refrigerator needs it’s own class for some special handling, we could simply replace the model_classname:

  • “model_classname”: “appliancedoctor.appliances.fridges.lg.LGFridge

We have defined a new type of LG fridge here, and specified the specific Class (LGFridge - probably a subclass of BaseFridge) for instantiation.

You might also have a Sub-Zero, but this has a different door_style and it’s own class:

{
    "id": "SUBZERO_REFRIGERATOR",
    "description": "Sub-Zero Refrigerator",
    "model_classtype": "APPLIANCE",
    "model_classname": "appliancedoctor.appliances.fridges.subzero.SubZeroFridge",
    "properties": {
        "property": [
            { "name": "door_style", "value": "side-by-side" }
        ]
    }
}

In this case we are not adjusting the Phenome of the object, we are just modifying an object property, so properties is directly in-line with the top-level object_model definitions.

And if you’re really lucky, you might also have a Sub-Zero model 15000:

{
    "id": "SUBZERO_REFRIGERATOR_15000",
    "description": "Sub-Zero Refrigerator (model 15000)",
    "model_classtype": "APPLIANCE",
    "model_classname": "appliancedoctor.appliances.fridges.subzero.SubZeroFridge",
    "phenome": {
        "property_model": [
            { "name": "electronic_display", "description": "Door Display", "property_type": "CONFIGURATION", "value_type": "TEXT", "default": "LCD" }
        ]
    }
    "properties": {
        "property": [
            { "name": "door_style", "value": "side-by-side-glass" }
        ]
    }
}

This one has both a different door style but also has a new property that is not in the ROOT object model. Because it defines a new property, we must include a Phenome subsection and modify the property model of this particular Fridge.