17#define COI_CALLCONV __stdcall
25#define COI_API __declspec(dllexport)
26#elif defined(__GNUC__) && __GNUC__ >= 4
27#define COI_API __attribute__((__visibility__("default")))
38 typedef struct coiRec* coiHandle_t;
40 typedef int(
COI_CALLCONV *COI_READMATRIX_t)(
double LOWER[],
double CURR[],
double UPPER[],
int VSTA[],
int TYPEX[],
double RHS[],
int ESTA[],
int COLSTA[],
int ROWNO[],
double VALUE[],
int NLFLAG[],
int NUMVAR,
int NUMCON,
int NUMNZ,
void* USRMEM);
41 typedef int(
COI_CALLCONV *COI_FDEVAL_t)(
const double X[],
double* G,
double JAC[],
int ROWNO,
const int JACNUM[],
int MODE,
int IGNERR,
int* ERRCNT,
int NUMVAR,
int NUMJAC,
int THREAD,
void* USRMEM);
42 typedef int(
COI_CALLCONV *COI_FDEVALINI_t)(
const double X[],
const int ROWLIST[],
int MODE,
int LISTSIZE,
int NUMTHREAD,
int IGNERR,
int* ERRCNT,
int NUMVAR,
void* USRMEM);
43 typedef int(
COI_CALLCONV *COI_FDEVALEND_t)(
int IGNERR,
int* ERRCNT,
void* USRMEM);
44 typedef int(
COI_CALLCONV *COI_STATUS_t)(
int MODSTA,
int SOLSTA,
int ITER,
double OBJVAL,
void* USRMEM);
45 typedef int(
COI_CALLCONV *COI_SOLUTION_t)(
const double XVAL[],
const double XMAR[],
const int XBAS[],
const int XSTA[],
const double YVAL[],
const double YMAR[],
const int YBAS[],
const int YSTA[],
int NUMVAR,
int NUMCON,
void* USRMEM);
46 typedef int(
COI_CALLCONV *COI_MESSAGE_t)(
int SMSG,
int DMSG,
int NMSG,
char* MSGV[],
void* USRMEM);
47 typedef int(
COI_CALLCONV *COI_ERRMSG_t)(
int ROWNO,
int COLNO,
int POSNO,
const char* MSG,
void* USRMEM);
48 typedef int(
COI_CALLCONV *COI_PROGRESS_t)(
int LEN_INT,
const int INTX[],
int LEN_RL,
const double RL[],
const double X[],
void* USRMEM);
49 typedef int(
COI_CALLCONV *COI_OPTION_t)(
int NCALL,
double* RVAL,
int* IVAL,
int* LVAL,
char* NAME,
void* USRMEM);
50 typedef int(
COI_CALLCONV *COI_TRIORD_t)(
int MODE,
int TYPEX,
int STATUS,
int ROWNO,
int COLNO,
int INF,
double VALUE,
double RESID,
void* USRMEM);
51 typedef int(
COI_CALLCONV *COI_FDINTERVAL_t)(
const double XMIN[],
const double XMAX[],
double* GMIN,
double* GMAX,
double JMIN[],
double JMAX[],
int ROWNO,
const int JACNUM[],
int MODE,
double PINF,
int NUMVAR,
int NUMJAC,
void* USRMEM);
52 typedef int(
COI_CALLCONV *COI_2DDIR_t)(
const double X[],
const double DX[],
double D2G[],
int ROWNO,
const int JACNUM[],
int* NODRV,
int NUMVAR,
int NUMJAC,
int THREAD,
void* USRMEM);
53 typedef int(
COI_CALLCONV *COI_2DDIRINI_t)(
const double X[],
const double DX[],
const int ROWLIST[],
int LISTSIZE,
int NUMTHREAD,
int NEWPT,
int* NODRV,
int NUMVAR,
void* USRMEM);
54 typedef int(
COI_CALLCONV *COI_2DDIREND_t)(
int* NODRV,
void* USRMEM);
55 typedef int(
COI_CALLCONV *COI_2DDIRLAGR_t)(
const double X[],
const double DX[],
const double U[],
double D2G[],
int NEWPT,
int* NODRV,
int NUMVAR,
int NUMCON,
void* USRMEM);
56 typedef int(
COI_CALLCONV *COI_2DLAGRSIZE_t)(
int* NODRV,
int NUMVAR,
int NUMCON,
int* NHESS,
int MAXHESS,
void* USRMEM);
57 typedef int(
COI_CALLCONV *COI_2DLAGRSTR_t)(
int HSRW[],
int HSCL[],
int* NODRV,
int NUMVAR,
int NUMCON,
int NHESS,
void* USRMEM);
58 typedef int(
COI_CALLCONV *COI_2DLAGRVAL_t)(
const double X[],
const double U[],
const int HSRW[],
const int HSCL[],
double HSVL[],
int* NODRV,
int NUMVAR,
int NUMCON,
int NHESS,
void* USRMEM);
int COIDEF_2DLagrSize(coiHandle_t cntvect, COI_2DLAGRSIZE_t coi_2dlagrsize)
program fvforall
Main program. A simple setup and call of CONOPT.
program fvinclin
Main program. A simple setup and call of CONOPT.
int COIDEF_ReadMatrix(coiHandle_t cntvect, COI_READMATRIX_t coi_readmatrix)
define callback routine for providing the matrix data to CONOPT.
int COIDEF_Message(coiHandle_t cntvect, COI_MESSAGE_t coi_message)
define callback routine for handling messages returned during the solution process.
int COIDEF_FDEval(coiHandle_t cntvect, COI_FDEVAL_t coi_fdeval)
define callback routine for performing function and derivative evaluations.
int COIDEF_ErrMsg(coiHandle_t cntvect, COI_ERRMSG_t coi_errmsg)
define callback routine for returning error messages for row, column or Jacobian elements.
int COIDEF_Solution(coiHandle_t cntvect, COI_SOLUTION_t coi_solution)
define callback routine for returning the final solution values.
int COIDEF_Status(coiHandle_t cntvect, COI_STATUS_t coi_status)
define callback routine for returning the completion status.
int COIDEF_FDEvalEnd(coiHandle_t cntvect, COI_FDEVALEND_t coi_fdevalend)
define callback routine for the termination of the function and derivative evaluation.
int COIDEF_2DDirLagr(coiHandle_t cntvect, COI_2DDIRLAGR_t coi_2ddirlagr)
define callback routine for computing the second derivative of the Lagrangian in a direction.
int COIDEF_2DLagrStr(coiHandle_t cntvect, COI_2DLAGRSTR_t coi_2dlagrstr)
define callback routine for providing the structure of the second derivatives of the Lagrangian.
int COIDEF_2DDirIni(coiHandle_t cntvect, COI_2DDIRINI_t coi_2ddirini)
define callback routine for initializing the computation of second derivatives for a constraint in a ...
int COIDEF_2DDir(coiHandle_t cntvect, COI_2DDIR_t coi_2ddir)
define callback routine for computing the second derivative for a constraint in a direction.
int COIDEF_2DDirEnd(coiHandle_t cntvect, COI_2DDIREND_t coi_2ddirend)
define callback routine for termination the computation of second derivatives for a constraint in a d...
int COIDEF_UsrMem(coiHandle_t cntvect, void *usrmem)
provides a pointer to user memory that is available in all callback functions. NOTE: this is not a ca...
int COIDEF_Option(coiHandle_t cntvect, COI_OPTION_t coi_option)
define callback routine for defining runtime options.
int COIDEF_Optfile(coiHandle_t cntvect, const char *optfile)
define callback routine for defining an options file.
int COIDEF_FDInterval(coiHandle_t cntvect, COI_FDINTERVAL_t coi_fdinterval)
define callback routine for performing function and derivative evaluations on intervals.
int COIDEF_FDEvalIni(coiHandle_t cntvect, COI_FDEVALINI_t coi_fdevalini)
define callback routine to perform initialization tasks for the function and derivative evaluation.
int COIDEF_Progress(coiHandle_t cntvect, COI_PROGRESS_t coi_progress)
define callback routine for monitoring the algorithmic progress.
int COIDEF_2DLagrVal(coiHandle_t cntvect, COI_2DLAGRVAL_t coi_2dlagrval)
define callback routine for computing the values of the second derivatives of the Lagrangian.
int COIDEF_TriOrd(coiHandle_t cntvect, COI_TRIORD_t coi_triord)
define callback routine for providing the triangular order information.
int COIDEF_EmptyCol(coiHandle_t cntvect, int emptycol)
allow empty columns.
int COIDEF_Square(coiHandle_t cntvect, int square)
square models.
int COIDEF_HessFac(coiHandle_t cntvect, double hessfac)
factor for Hessian density relative to Jacobian density HessFac.
int COIDEF_ThreadS(coiHandle_t cntvect, int threads)
number of threads allowed internally in CONOPT.
int COIDEF_EmptyRow(coiHandle_t cntvect, int emptyrow)
allow empty rows.
int COIDEF_FVincLin(coiHandle_t cntvect, int fvinclin)
include the linear terms in function evaluations.
int COIDEF_IniStat(coiHandle_t cntvect, int inistat)
handling of the initial status values.
int COIDEF_Debug2D(coiHandle_t cntvect, int debug2d)
turn debugging of 2nd derivatives on and off.
int COIDEF_StdOut(coiHandle_t cntvect, int tostdout)
allow output to StdOut.
int COIDEF_ErrLim(coiHandle_t cntvect, int errlim)
define the Error Limit.
int COIDEF_ResLim(coiHandle_t cntvect, double reslim)
define resource limit.
int COIDEF_DisCont(coiHandle_t cntvect, int discont)
allow discontinuous functions and derivatives.
int COIDEF_MaxHeap(coiHandle_t cntvect, double maxheap)
define Limit on Heap Memory. ""
int COIDEF_ThreadF(coiHandle_t cntvect, int threadf)
number of threads allowed for simultaneous FDEval calls.
int COIDEF_DebugFV(coiHandle_t cntvect, int debugfv)
turn Debugging of FDEval on and off.
int COIDEF_ClearM(coiHandle_t cntvect, int clearm)
ClearM.
int COIDEF_FVforAll(coiHandle_t cntvect, int fvforall)
call the FDEval for all constraints, including linear constraints.
int COIDEF_ItLim(coiHandle_t cntvect, int itlim)
define the Iteration Limit.
int COIDEF_ThreadC(coiHandle_t cntvect, int threadc)
check for thread compatibility.
int COIDEF_MaxSup(coiHandle_t cntvect, int maxsup)
limit on superbasics.
int COIDEF_Thread2D(coiHandle_t cntvect, int thread2d)
number of threads allowed for simultaneous 2DDir calls.
int COIDEF_License(coiHandle_t cntvect, int licint1, int licint2, int licint3, const char *licstring)
define the License Information.
int COIDEF_OptDir(coiHandle_t cntvect, int optdir)
defines the Optimization Direction.
int COIDEF_ObjCon(coiHandle_t cntvect, int objcon)
defines the Objective Constraint.
int COIDEF_NumVar(coiHandle_t cntvect, int numvar)
defines the number of variables in the model.
int COIDEF_NumHess(coiHandle_t cntvect, int numhess)
defines the Number of Hessian Nonzeros.
int COIDEF_ObjVar(coiHandle_t cntvect, int objvar)
defines the Objective Variable.
int COIDEF_NumNlNz(coiHandle_t cntvect, int numnlnz)
defines the Number of Nonlinear Nonzeros.
int COIDEF_NumNz(coiHandle_t cntvect, int numnz)
defines the number of nonzero elements in the Jacobian.
int COIDEF_NumCon(coiHandle_t cntvect, int numcon)
defines the number of constraints in the model.
int COI_Free(coiHandle_t *cntvect)
frees the control vector.
void COI_Finalize(void)
finializes the solving process for CONOPT. This must be called when using OpenMP. It will terminate t...
int COI_Create(coiHandle_t *cntvect)
initializes CONOPT and creates the control vector.
double COIGET_MaxHeapUsed(coiHandle_t cntvect)
After a model has been solved this method will return the amount of heap memory used.
void COIGET_Version(int *major, int *minor, int *patch)
returns the version number. It can be used to ensure that the modeler is linked to the correct versio...
int COIGET_RangeErrors(coiHandle_t cntvect)
returns the range errors that were encountered.
int COIGET_MaxThreads(coiHandle_t cntvect)
returns the maximum number of threads that can be used by CONOPT.
int COI_Solve(coiHandle_t cntvect)
method for starting the solving process of CONOPT.
program square
Main program. A simple setup and call of CONOPT.