7.5 Summary

The five callback stages currently defined by Matpower are summarized in Table 7-4.

Table 7-4:Callback Functions
name

invoked

typical use

ext2int

…from ext2int immediately after case data is converted from external to internal indexing.

Check consistency of input data, convert to internal indexing.

formulation

…from opf after OPF Model (om) object is initialized with standard OPF formulation.

Modify OPF formulation, by adding user-defined variables, constraints, costs.

int2ext

…from int2ext immediately before case data is converted from internal back to external indexing.

Convert data back to external indexing, populate any additional fields in the results struct.

printpf

…from printpf after pretty-printing the standard OPF output.

Pretty-print any results not included in standard OPF.

savecase

…from savecase after printing all of the other case data to the file.

Write non-standard case struct fields to the case file.