const KN_var_type_map = Dict(
    KN_VARTYPE_CONTINUOUS => :Cont,
    KN_VARTYPE_INTEGER => :Int,
    KN_VARTYPE_BINARY => :Bin
)

const KN_rev_var_type_map = Dict(
    :Cont => KN_VARTYPE_CONTINUOUS,
    :Int => KN_VARTYPE_INTEGER,
    :Bin => KN_VARTYPE_BINARY
)

# This list was obtained through AWK with Knitro 11.1 with the following command:
# grep "#define" knitro.h | grep "KN_PARAM_" | awk '{ printf("\"%s\" => Int32(%s),\n",$2,$3) }'
# For versions up to 10.3, use the folowing command:
# grep "#define" knitro.h | grep "KTR_PARAM_" | awk '{ printf("\"%s\" => Int32(%s),\n",$2,$3) }'
const KN_paramName2Indx = Dict(
    "KN_PARAM_NEWPOINT" => Int32(1001),
    "KN_PARAM_HONORBNDS" => Int32(1002),
    "KN_PARAM_ALGORITHM" => Int32(1003),
    "KN_PARAM_ALG" => Int32(1003),
    "KN_PARAM_BAR_MURULE" => Int32(1004),
    "KN_PARAM_BAR_FEASIBLE" => Int32(1006),
    "KN_PARAM_GRADOPT" => Int32(1007),
    "KN_PARAM_HESSOPT" => Int32(1008),
    "KN_PARAM_BAR_INITPT" => Int32(1009),
    "KN_PARAM_ACT_LPSOLVER" => Int32(1012),
    "KN_PARAM_CG_MAXIT" => Int32(1013),
    "KN_PARAM_MAXIT" => Int32(1014),
    "KN_PARAM_OUTLEV" => Int32(1015),
    "KN_PARAM_OUTMODE" => Int32(1016),
    "KN_PARAM_SCALE" => Int32(1017),
    "KN_PARAM_SOC" => Int32(1019),
    "KN_PARAM_DELTA" => Int32(1020),
    "KN_PARAM_BAR_FEASMODETOL" => Int32(1021),
    "KN_PARAM_FEASTOL" => Int32(1022),
    "KN_PARAM_FEASTOLABS" => Int32(1023),
    "KN_PARAM_MAXTIMECPU" => Int32(1024),
    "KN_PARAM_BAR_INITMU" => Int32(1025),
    "KN_PARAM_OBJRANGE" => Int32(1026),
    "KN_PARAM_OPTTOL" => Int32(1027),
    "KN_PARAM_OPTTOLABS" => Int32(1028),
    "KN_PARAM_LINSOLVER_PIVOTTOL" => Int32(1029),
    "KN_PARAM_XTOL" => Int32(1030),
    "KN_PARAM_DEBUG" => Int32(1031),
    "KN_PARAM_MULTISTART" => Int32(1033),
    "KN_PARAM_MSENABLE" => Int32(1033),
    "KN_PARAM_MSMAXSOLVES" => Int32(1034),
    "KN_PARAM_MSMAXBNDRANGE" => Int32(1035),
    "KN_PARAM_MSMAXTIMECPU" => Int32(1036),
    "KN_PARAM_MSMAXTIMEREAL" => Int32(1037),
    "KN_PARAM_LMSIZE" => Int32(1038),
    "KN_PARAM_BAR_MAXCROSSIT" => Int32(1039),
    "KN_PARAM_MAXTIMEREAL" => Int32(1040),
    "KN_PARAM_CG_PRECOND" => Int32(1041),
    "KN_PARAM_BLASOPTION" => Int32(1042),
    "KN_PARAM_BAR_MAXREFACTOR" => Int32(1043),
    "KN_PARAM_LINESEARCH_MAXTRIALS" => Int32(1044),
    "KN_PARAM_BLASOPTIONLIB" => Int32(1045),
    "KN_PARAM_OUTAPPEND" => Int32(1046),
    "KN_PARAM_OUTDIR" => Int32(1047),
    "KN_PARAM_CPLEXLIB" => Int32(1048),
    "KN_PARAM_BAR_PENRULE" => Int32(1049),
    "KN_PARAM_BAR_PENCONS" => Int32(1050),
    "KN_PARAM_MSNUMTOSAVE" => Int32(1051),
    "KN_PARAM_MSSAVETOL" => Int32(1052),
    "KN_PARAM_PRESOLVEDEBUG" => Int32(1053),
    "KN_PARAM_MSTERMINATE" => Int32(1054),
    "KN_PARAM_MSSTARTPTRANGE" => Int32(1055),
    "KN_PARAM_INFEASTOL" => Int32(1056),
    "KN_PARAM_LINSOLVER" => Int32(1057),
    "KN_PARAM_BAR_DIRECTINTERVAL" => Int32(1058),
    "KN_PARAM_PRESOLVE" => Int32(1059),
    "KN_PARAM_PRESOLVE_TOL" => Int32(1060),
    "KN_PARAM_BAR_SWITCHRULE" => Int32(1061),
    "KN_PARAM_HESSIAN_NO_F" => Int32(1062),
    "KN_PARAM_MA_TERMINATE" => Int32(1063),
    "KN_PARAM_MA_MAXTIMECPU" => Int32(1064),
    "KN_PARAM_MA_MAXTIMEREAL" => Int32(1065),
    "KN_PARAM_MSSEED" => Int32(1066),
    "KN_PARAM_MA_OUTSUB" => Int32(1067),
    "KN_PARAM_MS_OUTSUB" => Int32(1068),
    "KN_PARAM_XPRESSLIB" => Int32(1069),
    "KN_PARAM_TUNER" => Int32(1070),
    "KN_PARAM_TUNER_OPTIONSFILE" => Int32(1071),
    "KN_PARAM_TUNER_MAXTIMECPU" => Int32(1072),
    "KN_PARAM_TUNER_MAXTIMEREAL" => Int32(1073),
    "KN_PARAM_TUNER_OUTSUB" => Int32(1074),
    "KN_PARAM_TUNER_TERMINATE" => Int32(1075),
    "KN_PARAM_LINSOLVER_OOC" => Int32(1076),
    "KN_PARAM_BAR_RELAXCONS" => Int32(1077),
    "KN_PARAM_MSDETERMINISTIC" => Int32(1078),
    "KN_PARAM_BAR_REFINEMENT" => Int32(1079),
    "KN_PARAM_DERIVCHECK" => Int32(1080),
    "KN_PARAM_DERIVCHECK_TYPE" => Int32(1081),
    "KN_PARAM_DERIVCHECK_TOL" => Int32(1082),
    "KN_PARAM_LINSOLVER_INEXACT" => Int32(1083),
    "KN_PARAM_LINSOLVER_INEXACTTOL" => Int32(1084),
    "KN_PARAM_MAXFEVALS" => Int32(1085),
    "KN_PARAM_FSTOPVAL" => Int32(1086),
    "KN_PARAM_DATACHECK" => Int32(1087),
    "KN_PARAM_DERIVCHECK_TERMINATE" => Int32(1088),
    "KN_PARAM_BAR_WATCHDOG" => Int32(1089),
    "KN_PARAM_FTOL" => Int32(1090),
    "KN_PARAM_FTOL_ITERS" => Int32(1091),
    "KN_PARAM_ACT_QPALG" => Int32(1092),
    "KN_PARAM_BAR_INITPI_MPEC" => Int32(1093),
    "KN_PARAM_XTOL_ITERS" => Int32(1094),
    "KN_PARAM_LINESEARCH" => Int32(1095),
    "KN_PARAM_OUT_CSVINFO" => Int32(1096),
    "KN_PARAM_INITPENALTY" => Int32(1097),
    "KN_PARAM_ACT_LPFEASTOL" => Int32(1098),
    "KN_PARAM_CG_STOPTOL" => Int32(1099),
    "KN_PARAM_RESTARTS" => Int32(1100),
    "KN_PARAM_RESTARTS_MAXIT" => Int32(1101),
    "KN_PARAM_BAR_SLACKBOUNDPUSH" => Int32(1102),
    "KN_PARAM_CG_PMEM" => Int32(1103),
    "KN_PARAM_BAR_SWITCHOBJ" => Int32(1104),
    "KN_PARAM_OUTNAME" => Int32(1105),
    "KN_PARAM_OUT_CSVNAME" => Int32(1106),
    "KN_PARAM_ACT_PARAMETRIC" => Int32(1107),
    "KN_PARAM_ACT_LPDUMPMPS" => Int32(1108),
    "KN_PARAM_ACT_LPALG" => Int32(1109),
    "KN_PARAM_ACT_LPPRESOLVE" => Int32(1110),
    "KN_PARAM_ACT_LPPENALTY" => Int32(1111),
    "KN_PARAM_BNDRANGE" => Int32(1112),
    "KN_PARAM_BAR_CONIC_ENABLE" => Int32(1113),
    "KN_PARAM_CONVEX" => Int32(1114),
    "KN_PARAM_OUT_HINTS" => Int32(1115),
    "KN_PARAM_EVAL_FCGA" => Int32(1116),
    "KN_PARAM_MIP_METHOD" => Int32(2001),
    "KN_PARAM_MIP_BRANCHRULE" => Int32(2002),
    "KN_PARAM_MIP_SELECTRULE" => Int32(2003),
    "KN_PARAM_MIP_INTGAPABS" => Int32(2004),
    "KN_PARAM_MIP_INTGAPREL" => Int32(2005),
    "KN_PARAM_MIP_MAXTIMECPU" => Int32(2006),
    "KN_PARAM_MIP_MAXTIMEREAL" => Int32(2007),
    "KN_PARAM_MIP_MAXSOLVES" => Int32(2008),
    "KN_PARAM_MIP_INTEGERTOL" => Int32(2009),
    "KN_PARAM_MIP_OUTLEVEL" => Int32(2010),
    "KN_PARAM_MIP_OUTINTERVAL" => Int32(2011),
    "KN_PARAM_MIP_OUTSUB" => Int32(2012),
    "KN_PARAM_MIP_DEBUG" => Int32(2013),
    "KN_PARAM_MIP_IMPLICATNS" => Int32(2014),
    "KN_PARAM_MIP_GUB_BRANCH" => Int32(2015),
    "KN_PARAM_MIP_KNAPSACK" => Int32(2016),
    "KN_PARAM_MIP_ROUNDING" => Int32(2017),
    "KN_PARAM_MIP_ROOTALG" => Int32(2018),
    "KN_PARAM_MIP_LPALG" => Int32(2019),
    "KN_PARAM_MIP_TERMINATE" => Int32(2020),
    "KN_PARAM_MIP_MAXNODES" => Int32(2021),
    "KN_PARAM_MIP_HEURISTIC" => Int32(2022),
    "KN_PARAM_MIP_HEUR_MAXIT" => Int32(2023),
    "KN_PARAM_MIP_HEUR_MAXTIMECPU" => Int32(2024),
    "KN_PARAM_MIP_HEUR_MAXTIMEREAL" => Int32(2025),
    "KN_PARAM_MIP_PSEUDOINIT" => Int32(2026),
    "KN_PARAM_MIP_STRONG_MAXIT" => Int32(2027),
    "KN_PARAM_MIP_STRONG_CANDLIM" => Int32(2028),
    "KN_PARAM_MIP_STRONG_LEVEL" => Int32(2029),
    "KN_PARAM_MIP_INTVAR_STRATEGY" => Int32(2030),
    "KN_PARAM_MIP_RELAXABLE" => Int32(2031),
    "KN_PARAM_MIP_NODEALG" => Int32(2032),
    "KN_PARAM_MIP_HEUR_TERMINATE" => Int32(2033),
    "KN_PARAM_MIP_SELECTDIR" => Int32(2034),
    "KN_PARAM_PAR_NUMTHREADS" => Int32(3001),
    "KN_PARAM_PAR_CONCURRENT_EVALS" => Int32(3002),
    "KN_PARAM_PAR_BLASNUMTHREADS" => Int32(3003),
    "KN_PARAM_PAR_LSNUMTHREADS" => Int32(3004),
    "KN_PARAM_PAR_MSNUMTHREADS" => Int32(3005),
)
