Skip to content

Config MDEO plugin

Contributes the search, solver and runtime sections: which moves the search may make, which algorithm makes them, and what resources the run may use. It also owns the executable section, so this is the plugin that actually starts an optimisation.

At a glance

Plugin idconfig-mdeo-service
Display nameConfig MDEO
DescriptionLanguage support for config MDEO sections (search and solver)
Default URL/plugin/config-mdeo
Sourceapp/packages/service-config-mdeo, app/packages/language-config-mdeo
Depends onThe Config and Config Optimization plugins; executions go to optimizer-execution

Languages contributed

Language idNameExtensionTextual editorGraphical editorGenerated
config-mdeoConfig MDEO

The config-mdeo language

A generated language with no extension and no editor, used the same way as config-optimization: the config service sends it the fragment of a .config file containing this plugin's sections, and it parses them with a standalone grammar built from the same rules.

Contribution plugins contributed

Target languageSectionsExecutable
configsearch, solver, runtimesolver
Contribution plugin idconfig-mdeo
Short namemdeo
Grammar dependenciesconfig-optimization
Section dependenciesproblem from optimization

The section dependency matters: before this plugin can resolve create Annotation or mutate Canvas.layers it has to know which metamodel the problem uses. The config service therefore computes the problem section first and passes its result along.

The search section

The mutation operators available to the search.

mdeo-config
search {
    mutations {
        using "./match.mt"

        create Annotation
        delete Annotation
        mutate Circle

        add Layer.shapes
        remove Layer.shapes
        mutate Canvas.layers
    }
}
EntryMeaning
using "path.mt"Use a hand-written model transformation as a mutation operator
create ClassGenerate an operator that adds an instance of the class
delete ClassGenerate an operator that removes an instance
mutate ClassGenerate an operator that changes an instance's properties
add Class.edgeGenerate an operator that adds a link
remove Class.edgeGenerate an operator that removes a link
mutate Class.edgeGenerate an operator that rewires a link

Entries may be mixed and repeated in any order. Generated operators are written into the result tree as .mt_gen files, so you can read exactly what the search was allowed to do.

The solver section

The search algorithm and when to stop. This is the executable section: a config file containing it gets a run action.

mdeo-config
solver {
    algorithm = NSGAII

    parameters {
        population = 40
        variation = mutation

        mutation {
            step = interval(1, 5)
            strategy = random
        }
    }

    termination {
        evolutions = 500
    }

    batches = 3
}
KeyValuesMeaning
algorithmNSGAII, IBEA, SPEA2, SMSMOEA, VEGA, PESA2, PAESThe multi-objective algorithm
batchesintegerRun the same configuration this many times independently

parameters

KeyValuesMeaning
populationintegerPopulation size
variationmutation, genetic, probabilisticHow offspring are produced
bisectionsintegerPESA2 / PAES only
mutation { … }blockMutation tuning, see below
archive { size = n }blockPESA2 / PAES only

mutation

KeyValuesMeaning
stepn, fixed, fixed(n), interval(lo, hi)How many operators to apply per mutation
strategyrandom, repetitiveHow operators are chosen
selectionrandomHow matches are selected
applicationrandomHow an operator is applied
creditrandomOperator credit assignment
repairdefaultRepair strategy after a mutation

step = interval(1, 5) draws uniformly from [1, 5) on every call; fixed with no argument means one.

termination

KeyMeaning
evolutionsStop after this many generations
timeStop after this many seconds
deltaStop when the improvement stays below this threshold
iterationsNumber of non-improving iterations tolerated before stopping

Several conditions combine with OR — the first one to trigger ends the run.

The runtime section

Execution limits.

mdeo-config
runtime {
    timeout {
        script = 1000
        transformation = 1000
    }

    backend = MDEO

    resources {
        threads = 10
        nodes = 4
        threadsPerNode = 3
    }
}
KeyMeaning
timeout.scriptMilliseconds a single objective or constraint evaluation may take
timeout.transformationMilliseconds a single transformation application may take
backendMDEO (default) or Tinker — the graph representation used during search
resources.threadsUpper bound on total worker threads
resources.nodesUpper bound on execution nodes taking part
resources.threadsPerNodeUpper bound on threads per node

All fields are optional and act as upper bounds against what the deployment actually offers.

Full example

mdeo-config
// Which model is optimised, and against which metamodel.
// Contributed by the Config Optimization plugin.
problem {
    metamodel = "./shapes.mm"
    model = "./shapes.m"
}

// What "better" means. Contributed by the Config Optimization plugin.
goal {
    import { shapeCount, invisibleShapes, emptyLayers } from "./metrics.fn"

    minimize invisibleShapes
    maximize shapeCount
    constraint emptyLayers

    refine Canvas.layers[1..4]
}

// How new candidate models are derived. Contributed by the Config MDEO plugin.
search {
    mutations {
        using "./match.mt"
        using "./control-flow.mt"

        create Annotation
        delete Annotation
        mutate Circle

        add Layer.shapes
        remove Layer.shapes
        mutate Canvas.layers
    }
}

// Which search algorithm runs, and for how long. Contributed by the Config MDEO plugin.
solver {
    algorithm = NSGAII

    parameters {
        population = 40
        variation = mutation

        mutation {
            step = interval(1, 5)
            strategy = random
            selection = random
            application = random
            credit = random
            repair = default
        }
    }

    termination {
        evolutions = 500
        time = 600
        delta = 5
        iterations = 3
    }

    batches = 3
}

// Execution limits for the run. Contributed by the Config MDEO plugin.
runtime {
    timeout {
        script = 1000
        transformation = 1000
    }

    backend = MDEO

    resources {
        threads = 10
        nodes = 4
        threadsPerNode = 3
    }
}

Server-side capabilities

KeyKindContents
astfile dataThe serialised AST of the standalone language
configrequestComputes the section data for search, solver and runtime
config-executionrequestStarts an optimisation run
config-execution-get-summaryrequestThe markdown summary of a run
config-execution-get-file-treerequestThe result file tree
config-execution-get-file / -get-filesrequestResult file contents
config-execution-cancelrequestCancel a running optimisation
config-execution-deleterequestDelete a finished run and its results

Execution requests are forwarded to the optimizer-execution service, which is the component that scales across nodes. See Reading the results for what comes back.

Released under the terms of the repository licence.