CONOPT
Loading...
Searching...
No Matches
Java - Single Thread

Topics

 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.
 
 largebnd.java
 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.java
 Example with a Large Residual in the initial point.
 
 largeres2.java
 Example with a Large Residual in the initial point.
 
 leastsq.java
 Solves a nonlinear least squares model.
 
 leastsq10.java
 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.java
 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.java
 This model is similar to leastsq, but this time we define 2nd order information in the form of a 2DDir routine.
 
 pinadd.java
 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.java
 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.java
 This is a CONOPT implementation of the Pindyck model from the GAMS model library.
 
 pinadd2err.java
 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.java
 This is a CONOPT implementation of the Pindyck model from the GAMS model library. The GAMS model follows as documentation:
 
 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.
 
 qp5.java
 Similar to qp1 but uses 2nd derivatives computed using perturbations.
 
 square.java
 This is a square model where we pretend that the second constraint is completely nonlinear.
 
 square2.java
 A square model where we pretend that the second constraint is completely nonlinear.
 
 square3.java
 A square model where we pretend that the second and third constraints are completely nonlinear.
 
 tutorial2r.java
 This is a revised version of Tutorial2 in which the production function is split into two equations using an intermediate variable.
 
 tutorialk.java
 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.
 

Detailed Description

Examples written in Java that use a single thread.

To build an run a single example it is necessary to also build the common files std.java and MsgHandler.java in examples/common. For the tutorial example, this is built by calling

javac -d obj -cp ../../lib/conopt.jar ../common/std.java ../common/MsgHandler.java tutorial.java
Definition std.py:1

The compiled class files are in the obj directory.

The tutorial example can then be run by calling

java -cp ../../lib/conopt.jar:obj -Djava.library.path=../../lib tutorial

On Windows, replace javac and java with javac.exe and java.exe.