OpenM++ compiler (omc)
OpenM++ compiler (omc)

The OpenM++ compiler produces c++ (.cpp and .h) files and SQL files (.sql) from model source files (.ompp, .mpp) and parameter value files (.dat, .odat, .csv, .tsv).

The following command line arguments are supported by omc:

  • -Omc.ModelName name/of/model/executable, e.g. RiskPaths
  • -Omc.ScenarioName name/of/base/scenario, e.g. Base (can be list of names if there is more than one parameter directory specified)
  • -Omc.InputDir input/dir/to/find/source/files
  • -Omc.OutputDir output/dir/to/place/compiled/cpp_and_h_and_sql/files
  • -Omc.UseDir use/dir/with/ompp/files
  • -Omc.ParamDir input/dir/to/find/parameter/files/for/scenario (can be list of directories)
  • -Omc.FixedDir input/dir/to/find/fixed/parameter/files/
  • -Omc.InDocDir input/dir/to/find/authored/model/documentation/files/
  • -Omc.OutDocDir output directory to create model documentation files, e.g.: ompp/bin/doc
  • -Omc.ModelDoc if true then generate model documentation
  • -Omc.SqlDir input sql/script/dir to create SQLite database
  • -Omc.SqliteDir output directory to create SQLite model database
  • -Omc.SqlPublishTo create sql scripts to publish in SQLite,MySQL,PostgreSQL,MSSQL,Oracle,DB2, default: SQLite
  • -Omc.CodePage code page for converting source files, e.g. windows-1252
  • -Omc.MessageLanguage language to display output messages, default: user environment settings
  • -Omc.MessageFnc localized message functions, default: LT,logMsg,logFormatted,WriteLogEntry,WarningMsg,ModelExit
  • -Omc.NoLineDirectives suppress #line directives in generated cpp files
  • -Omc.NoMetadata suppress production of model metadata (model cannot be run), default: false
  • -Omc.TraceScanning detailed tracing from scanner
  • -Omc.TraceParsing detailed tracing from parser
  • -OpenM.IniFile path/to/optional/omc.ini

Short form of command line arguments:

  • -m short form of -Omc.ModelName
  • -s short form of -Omc.ScenarioName
  • -i short form of -Omc.InputDir
  • -o short form of -Omc.OutputDir
  • -u short form of -Omc.UseDir
  • -p short form of -Omc.ParamDir
  • -f short form of -Omc.FixedDir
  • -d short form of -Omc.InDocDir
  • -ini short form of -OpenM.IniFile

Also common OpenM log options supported: OpenM.LogToConsole, OpenM.LogToFile, OpenM.LogFilePath, OpenM.LogToStampedFile, OpenM.LogUseTimeStamp, OpenM.LogUsePidStamp, OpenM.LogSql. Please see OpenM++ wiki for more information about log options.
Parameters can be specified on command line or through ini-file. Command line parameters take precedence.