AMPL_OUTPUTHANDLER#

group AMPL_OUTPUTHANDLER

Typedefs

typedef void (*AMPL_OutputHandlerCb)(AMPL_OUTPUTKIND kind, const char *text, void *user)#

Callback type for handling AMPL output messages.

This callback is invoked by the AMPL runtime to deliver output generated during model execution, such as solver output, display statements, or informational messages.

Param kind:

The kind of output being produced (see AMPL_OUTPUTKIND)

Param text:

Null-terminated output text

Param user:

User-defined context pointer supplied when the handler was registered

enum AMPL_OUTPUTKIND#

Represents the type of the output coming from the interpreter.

Values:

enumerator AMPL_OUTPUT_WAITING#

Output prompt2, returned when incomplete statements are interpreted.

enumerator AMPL_OUTPUT_BREAK#

Output break, displayed when an operation is interrupted with SIGINT.

enumerator AMPL_OUTPUT_CD#

Output cd, returned by the cd function.

enumerator AMPL_OUTPUT_DISPLAY#

Output display, returned by the display function.

enumerator AMPL_OUTPUT_EXIT#

Output exit, returned as last message from AMPL before exiting the interpreter.

enumerator AMPL_OUTPUT_EXPAND#

Output expand, returned by the expand function.

enumerator AMPL_OUTPUT_LOAD#

Output load, returned by the load function when loading a library.

enumerator AMPL_OUTPUT_OPTION#

Output option, returned by the option function when getting the value of an option.

enumerator AMPL_OUTPUT_PRINT#

Output print, returned by the print function when printing values from AMPL command line.

enumerator AMPL_OUTPUT_PROMPT#

Output prompt1, normal AMPL prompt.

enumerator AMPL_OUTPUT_SOLUTION#

Output solution, returned when loading a solution with the command solution, contains the solver message.

enumerator AMPL_OUTPUT_SOLVE#

Output solve, returned by the solve function, contains the solver message.

enumerator AMPL_OUTPUT_SHOW#

Output show, returned by the show function.

enumerator AMPL_OUTPUT_XREF#

Output xref, returned by the xref function.

enumerator AMPL_OUTPUT_SHELL_OUTPUT#

Output of the AMPL command shell.

enumerator AMPL_OUTPUT_SHELL_MESSAGE#

Messages from the command shell.

enumerator AMPL_OUTPUT_MISC#

Output misc.

enumerator AMPL_OUTPUT_WRITE_TABLE#

Messages from the command write table.

enumerator AMPL_OUTPUT_READ_TABLE#

Messages from the command read table.

enumerator AMPL_OUTPUT_READTABLE#

Internal messages from the command read table.

enumerator AMPL_OUTPUT_WRITETABLE#

Internal messages from the command write table.

enumerator AMPL_OUTPUT_BREAKPOINT#

Breakpoint hit.

enumerator AMPL_OUTPUT_CALL#

Output of a script call.

enumerator AMPL_OUTPUT_CHECK#

Output of a check operation.

enumerator AMPL_OUTPUT_CLOSE#

Output of a close command for output redirection.

enumerator AMPL_OUTPUT_COMMANDS#

Output of a commands call into another file.

enumerator AMPL_OUTPUT_CONTINUE#

Issued when continue is encountered.

enumerator AMPL_OUTPUT_DATA#

Output of a data command.

enumerator AMPL_OUTPUT_DELETECMD#

Output of a delete command.

enumerator AMPL_OUTPUT_DROP#

Output of a drop command.

enumerator AMPL_OUTPUT_DROP_OR_RESTORE_ALL#

Internal.

enumerator AMPL_OUTPUT_ELSE#

Else block.

enumerator AMPL_OUTPUT_ELSE_CHECK#

Internal.

enumerator AMPL_OUTPUT_ENDIF#

End of if block.

enumerator AMPL_OUTPUT_ENVIRON#

Output of a environ command.

enumerator AMPL_OUTPUT_FIX#

Output of a fix command.

enumerator AMPL_OUTPUT_FOR#

Output of a for command.

enumerator AMPL_OUTPUT_IF#

Output of an if command.

enumerator AMPL_OUTPUT_LET#

Output of a let command.

enumerator AMPL_OUTPUT_LOOPEND#

End of loop.

enumerator AMPL_OUTPUT_OBJECTIVE#

Output of an objective command.

enumerator AMPL_OUTPUT_OPTION_RESET#

Occurs when resetting option values.

enumerator AMPL_OUTPUT_PRINTF#

Output of a printf command.

enumerator AMPL_OUTPUT_PROBLEM#

Output of a problem command.

enumerator AMPL_OUTPUT_PURGE#

Output of a purge command.

enumerator AMPL_OUTPUT_RBRACE#

Occurs when a right brace is encountered.

enumerator AMPL_OUTPUT_READ#

Output of a read command.

enumerator AMPL_OUTPUT_RELOAD#

Output of a reload command.

enumerator AMPL_OUTPUT_REMOVE#

Output of a remove command.

enumerator AMPL_OUTPUT_REPEAT#

Beginning of a repeat loop.

enumerator AMPL_OUTPUT_REPEAT_END#

End of a repeat loop.

enumerator AMPL_OUTPUT_RESET#

Output of a reset command.

enumerator AMPL_OUTPUT_RESTORE#

Output of a restore command.

enumerator AMPL_OUTPUT_RUN_ARGS#

Internal.

enumerator AMPL_OUTPUT_SEMICOLON#

Internal.

enumerator AMPL_OUTPUT_SSTEP#

Internal.

enumerator AMPL_OUTPUT_THEN#

Beginning of the then part of an if statement.

enumerator AMPL_OUTPUT_UNFIX#

Output of an unfix command.

enumerator AMPL_OUTPUT_UNLOAD#

Output of an unload command.

enumerator AMPL_OUTPUT_UPDATE#

Output of an update command.

enumerator AMPL_OUTPUT_WRITE#

Output of a write command.