►The public API of CONOPT | The public API for interfacing with CONOPT. APIs exist for Fortran, C, C++, Python and Java |
►Fortran API | The Fortran public API |
Utility Routines | This section describes utility routines in the CONOPT DLL |
►Initialisation Methods | Initialisation methods that must or can be used before CONOPT is started |
The Control Vector | The Control Vector is the main communication region between the modeler and CONOPT |
Registration of problem sizes | Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified |
Registration of options | Options that modify the macro behaviour of CONOPT |
►Registration of callback routines | Registration methods for callback routines to interact with the CONOPT solution algorithm |
Mandatory callback routines | The callback routines that must be implemented by the user |
Optional callback routines | The callback routines that can be used to enhance the solution algorithm |
►Definition of Callback Functions | A detailed overview of the callback function definitions |
Defining the Model | Providing the matrix information and initial values to CONOPT |
Evaluating Non-linear Function Values and Derivatives | Methods for computing the values and derivatives for non-linear functions |
►Defining Second Order Information | Methods for computing second order information for non-linear functions |
Computing the Hessian of the Lagrangian | |
Computing the second derivative on constraint in a direction | |
Second derivative of the Lagrangian in a direction | |
Message Passing and Error Reporting | General messaging callback and optional error reporting callback |
Returning the Solution | Methods for returning the final solution and optimisation status |
Non-default Options | Enables the user to provide an options file and set individual options |
►C API | The C public API |
Utility Routines | This section describes utility routines in the CONOPT DLL. |
►Initialisation Methods | Initialisation methods that must or can be used before CONOPT is started. |
The Control Vector | The Control Vector is the main communication region between the modeler and CONOPT. |
Registration of problem sizes | Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified. |
Registration of options | Options that modify the macro behaviour of CONOPT |
►Registration of callback routines | Registration methods for callback routines to interact with the CONOPT solution algorithm. |
Mandatory callback routines | The callback routines that must be implemented by the user. |
Optional callback routines | The callback routines that can be used to enhance the solution algorithm. |
►Definition of Callback Functions | A detailed overview of the callback function definitions. |
Defining the Model | Providing the matrix information and initial values to CONOPT. |
Evaluating Non-linear Function Values and Derivatives | Methods for computing the values and derivatives for non-linear functions. |
►Defining Second Order Information | Methods for computing second order information for non-linear functions. |
Computing the Hessian of the Lagrangian | |
Computing the second derivative on constraint in a direction | |
Second derivative of the Lagrangian in a direction | |
Message Passing and Error Reporting | General messaging callback and optional error reporting callback. |
Returning the Solution | Methods for returning the final solution and optimisation status. |
Non-default Options | Enables the user to provide an options file and set individual options. |
►C++ API | The C++ public API |
►Conopt Class | The control class for the CONOPT C++ api |
Utility Routines | This section describes utility routines in the CONOPT DLL. |
Solution Status methods | Methods for querying the solution status |
Model data methods | Methods for loading the model data |
Message handler methods | Methods for loading and using a user-defined message handler |
Registration of sizes | Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified. |
Registration of options | Options that modify the macro behaviour of CONOPT. |
►ConoptModelData Class | A necessary class for defining the model data and function evaluations |
Defining the model | Methods that are used to define the model to be solved by CONOPT |
Querying the model | Methods to query information about the model |
Evaluating non-linear function values and derivatives | Virtual functions to be implemented by the user for the evaluation of non-linear functions and derivatives |
Defining the second derivative | Virtual functions that can be optionally implemented by the user to define the second order derivatives |
ConoptMessageHandler Class | An optional class for providing a custom message handler |
►Python API | The Python public API |
►Conopt Class | The control class for the CONOPT C++ api |
Utility Routines | This section describes utility routines in the CONOPT DLL. |
Solution Status methods | Methods for querying the solution status |
Model data methods | Methods for loading the model data |
Message handler methods | Methods for loading and using a user-defined message handler |
Registration of sizes | Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified. |
Registration of options | Options that modify the macro behaviour of CONOPT. |
►ModelData Class | A necessary class for defining the model data and function evaluations |
Defining the model | Methods that are used to define the model to be solved by CONOPT |
Querying the model | Methods to query information about the model |
Evaluating non-linear function values and derivatives | Virtual functions to be implemented by the user for the evaluation of non-linear functions and derivatives |
Defining the second derivative | Virtual functions that can be optionally implemented by the user to define the second order derivatives |
MessageHandler Class | An optional class for providing a custom message handler |
►Java API | The Java public API |
►Conopt Class | The control class for the CONOPT C++ api |
Utility Routines | This section describes utility routines in the CONOPT DLL. |
Solution Status methods | Methods for querying the solution status |
Model data methods | Methods for loading the model data |
Message handler methods | Methods for loading and using a user-defined message handler |
Registration of sizes | Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified. |
Registration of options | Options that modify the macro behaviour of CONOPT. |
►ModelData Class | A necessary class for defining the model data and function evaluations |
Defining the model | Methods that are used to define the model to be solved by CONOPT |
Querying the model | Methods to query information about the model |
Evaluating non-linear function values and derivatives | Virtual functions to be implemented by the user for the evaluation of non-linear functions and derivatives |
Defining the second derivative | Virtual functions that can be optionally implemented by the user to define the second order derivatives |
MessageHandler Class | An optional class for providing a custom message handler |
►Public API files | The source files that define the public API |
C++ API | The source files that define the public C++ API |
Java API | The source files that define the public Java API |
Additional Information | Some additional details and options related to the CONOPT solution algorithm |
►Examples using CONOPT | Examples written in Fortran, C, C++, Python and Java demonstrating how to directly interface with CONOPT |
Fortran - Single Thread | Examples written in Fortran that use a single thread |
C - Single Thread | Examples written in C that use a single thread |
►C++ - Single Thread | Examples written in C++ that use a single thread |
tutorial.cpp | a tutorial providing an introduction to the CONOPT API |
tutorial2.cpp | This model is a revision of Tutorial in which we have added a set of 2nd derivative routines, Tut_2DLagrStr and Tut_2DLagrVal. |
tutorial2r.cpp | This is a revised version of Tutorial2 in which the production function is split into two equations using an intermediate variable. |
tutoriali.cpp | This model is a revision of Tutorial in which we have added a an initialization callback for the First derivative, Tut_FDEvalIni. |
tutorialk.cpp | This model is a revision of Tutorial in which we have made the capital stock, K, a variable in the model fixed at the value 4. |
largebnd.cpp | This is the standard Tutorial model with a little twist: We assign some of the upper bounds a value above the maximum value of Rtmaxv. Earlier this would be a fatal error. Now the bounds are projected on the legal interval, a message is issued, and the model solved. |
largeres1.cpp | Example with a Large Residual in the initial point. |
largeres2.cpp | Example with a Large Residual in the initial point. |
leastsq.cpp | Solves a nonlinear least squares model. |
leastsq10.cpp | This model is similar to leastsq5, but this time we define 2nd order directional information in the form of both an 2DDirIni routine where the bulk of the work is done and a 2DDir routine that just copies the information. |
leastsq2.cpp | This model is similar to leastsq. The key difference is that we supply a callback routine that can compute 2nd derivatives of the model. However, we only include part of the 2nd derivatives corresponding to the direct objective terms, res(i)**2. The terms from b(i,j)*x(j)**2 are ignored in the 2nd derivatives. CONOPT will not notice the incorrect derivatives but it may converge more slowly. |
leastsq5.cpp | This model is similar to leastsq, but this time we define 2nd order information in the form of a 2DDir routine. |
pinadd.cpp | This is a CONOPT implementation of the Pindyck model from the GAMS model library. The implementation is similar to the one in pindyck, but this time we first solve the model for 16 periods and then we gradually increase the number of periods one at a time up to 20. |
pinadd2.cpp | This is a CONOPT implementation of the Pindyck model from the GAMS model library. The implementation is similar to the one in pindyck, but this time we first solve the model for 16 periods and then we gradually increase the number of periods one at a time up to 20. |
pinadd2ddir.cpp | This is a CONOPT implementation of the Pindyck model from the GAMS model library. |
pinadd2err.cpp | This is a CONOPT implementation of the Pindyck model from the GAMS model library. The implementation is similar to the one in pindyck, but this time we first solve the model for 16 periods and then we gradually increase the number of periods one at a time up to 20. |
pindyck.cpp | This is a CONOPT implementation of the Pindyck model from the GAMS model library. The GAMS model follows as documentation: |
qp1.cpp | The current model is a simple QP model with a sparse Q matrix, bounded variables, and one constraint. |
qp2.cpp | Similar to qp1 but uses directional 2nd derivatives. |
qp3.cpp | Similar to qp1 but uses 2nd derivatives as a matrix. |
qp4.cpp | A combination of qp2 and qp3. |
qp5.cpp | Similar to qp1 but uses 2nd derivatives computed using perturbations. |
square.cpp | This is a square model where we pretend that the second constraint is completely nonlinear. |
square2.cpp | A square model where we pretend that the second constraint is completely nonlinear. |
►Python - Single Thread | Examples written in Python that use a single thread |
tutorial.py | a tutorial providing an introduction to the CONOPT API |
tutorial2.py | This model is a revision of Tutorial in which we have added a set of 2nd derivative routines, Tut_2DLagrStr and Tut_2DLagrVal. |
tutoriali.py | This model is a revision of Tutorial in which we have added a an initialization callback for the First derivative, Tut_FDEvalIni. |
qp1.py | The current model is a simple QP model with a sparse Q matrix, bounded variables, and one constraint. |
qp2.py | Similar to qp1 but uses directional 2nd derivatives. |
qp3.py | Similar to qp1 but uses 2nd derivatives as a matrix. |
qp4.py | A combination of qp2 and qp3. |
►Java - Single Thread | Examples written in Java that use a single thread |
tutorial.java | a tutorial providing an introduction to the CONOPT API |
tutorial2.java | This model is a revision of Tutorial in which we have added a set of 2nd derivative routines, Tut_2DLagrStr and Tut_2DLagrVal. |
tutoriali.java | This model is a revision of Tutorial in which we have added a an initialization callback for the First derivative, Tut_FDEvalIni. |
qp1.java | The current model is a simple QP model with a sparse Q matrix, bounded variables, and one constraint. |
qp2.java | Similar to qp1 but uses directional 2nd derivatives. |
qp3.java | Similar to qp1 but uses 2nd derivatives as a matrix. |
qp4.java | A combination of qp2 and qp3. |
Fortran - Open MP | Examples written in Fortran that use Open MP for multithreading |
C - Open MP | Examples written in C that use Open MP for multithreading |
►Automatic differentiation examples | Examples written in C++ and Python that make use of the automatic differentiation package ADOL-C |
►C++ examples using automatic differentiation | Examples written in C++ using the ADOL-C package for automatic differentiation |
tutorial.cpp | Tutorial example using the automatic differentiation library ADOL-C |
tutorial2.cpp | This extends the tutorial by including the computation of the Lagrangian of the Hessian |
tutorial2str.cpp | This extends the tutorial by including the computation of the structure of the Hessian and the value of the Lagrangian of the Hessian |
►Python examples using automatic differentiation | Examples written in Python using the ADOL-C package for automatic differentiation |
tutorial.py | Tutorial example using the automatic differentiation library ADOL-C |
tutorial2.py | This extends the tutorial by including the computation of the Lagrangian of the Hessian |
tutorial2str.py | This extends the tutorial by including the computation of the structure of the Hessian and the value of the Lagrangian of the Hessian |