Model output mapping section names to their contents.

The default mode will populate the json key with an object mapping variable names to their values (see the MiniZinc documentation for details on the format).

Note that sections ending with _json will be arrays.

interface Output {
    default?: string;
    dzn?: string;
    json?: {
        [variable: string]: any;
    };
    raw?: string;
    [section: string]:
        | string
        | any[]
        | object
        | undefined;
}

Indexable

  • [section: string]:
        | string
        | any[]
        | object
        | undefined

    Output to user-defined sections

Properties

Properties

default?: string

The string output to the 'default' section (where no section was specified).

dzn?: string

The DZN output if produced.

model.solve({
jsonOutput: false,
options: {
solver: 'gecode',
'output-mode': 'dzn'
}
});
json?: {
    [variable: string]: any;
}

The JSON output if produced

raw?: string

The output of all sections combined