CONOPT
Loading...
Searching...
No Matches
Registration of options

Functions

int jconopt.Conopt.debugFV (int debugfv)
 turn Debugging of FDEval on and off.
 
int jconopt.Conopt.squareModel (int square)
 square models.
 
int jconopt.Conopt.setLicense (int licint1, int licint2, int licint3, String licstring)
 define the License Information.
 
int jconopt.Conopt.setItLim (int itlim)
 define the Iteration Limit.
 
int jconopt.Conopt.setErrLim (int errlim)
 define the Error Limit.
 
int jconopt.Conopt.setMaxSup (int maxsup)
 limit on superbasics.
 
int jconopt.Conopt.allowEmptyRow (int emptyrow)
 allow empty rows.
 
int jconopt.Conopt.allowEmptyCol (int emptycol)
 allow empty columns.
 
int jconopt.Conopt.debug2D (int debug2d)
 turn debugging of 2nd derivatives on and off.
 
int jconopt.Conopt.disCont (int discont)
 allow discontinuous functions and derivatives.
 
int jconopt.Conopt.clearM (int clearm)
 ClearM.
 
int jconopt.Conopt.setResLim (double reslim)
 define resource limit.
 
int jconopt.Conopt.setMaxHeap (double maxheap)
 define Limit on Heap Memory.
 
int jconopt.Conopt.setThreadS (int threads)
 number of threads allowed internally in CONOPT.
 
int jconopt.Conopt.setThreadF (int threadf)
 number of threads allowed for simultaneous FDEval calls.
 
int jconopt.Conopt.setThread2D (int thread2d)
 number of threads allowed for simultaneous 2DDir calls.
 
int jconopt.Conopt.setThreadC (int threadc)
 check for thread compatibility.
 

Detailed Description

Options that modify the macro behaviour of CONOPT.

These cover conventions for indexes coidef_base() and argument passing coidef_fortran() and coidef_c(). They also cover limits on the algorithms, such as iteration limits coidef_itlim() and error limits coidef_errlim(). These options must be specified before the CONOPT solving is started, i.e before a call to coi_solve().

Function Documentation

◆ debugFV()

int jconopt.Conopt.debugFV ( int debugfv)
inline

turn Debugging of FDEval on and off.

CONOPT has a Function and Derivative Debugger that can check if the function values and derivatives computed by FDEval seem to be consistent and the derivatives are consistent with the sparsity pattern of the Jacobian.

The interpretation of DebugFV is:

  • 0: No debugging (the default value)
  • -1: Perform debugging in the initial point only.
  • +n: Perform debugging every n’th iteration.

The value can also be defined in an options file or options routine be setting LKDEBG. Error messages and error return codes are described in Error Return Codes.

Parameters
debugfvthe flag to enable debugging of function evaluations

Definition at line 331 of file Conopt.java.

◆ squareModel()

int jconopt.Conopt.squareModel ( int square)
inline

square models.

CONOPT has a special routine for solve square sets of equations without an objective function.

Parameters
squareSquare = 1 informs CONOPT that the model is Square. Square = 0 is the default used for an ordinary optimization model.

Definition at line 342 of file Conopt.java.

◆ setLicense()

int jconopt.Conopt.setLicense ( int licint1,
int licint2,
int licint3,
String licstring )
inline

define the License Information.

The license consists of three integer codes and a string that defines the user. If the license is not defined or if it is incorrect then CONOPT will run in small-scale demo mode and it will only be able to solve small models.

Parameters
licint1the first license integer code
licint2the second license integer code
licint3the third license integer code
licstringthe license string

Definition at line 353 of file Conopt.java.

◆ setItLim()

int jconopt.Conopt.setItLim ( int itlim)
inline

define the Iteration Limit.

By default CONOPT uses an iteration limit of 1 million iterations. This method can be used to set a new iteration limit.

The call is optional.

Parameters
itlimthe iteration limit

Definition at line 364 of file Conopt.java.

◆ setErrLim()

int jconopt.Conopt.setErrLim ( int errlim)
inline

define the Error Limit.

The nonlinear functions may not be defined in all points, and the user written callback routine FDEval has an argument for telling CONOPT if a point is “bad”. CONOPT may try other points to avoid “bad” points up to a defined error limit (as specified by a call to this method). The default error limit is zero, i.e. CONOPT will by default stop if a “bad” point is encountered.

The call is optional.

Parameters
errlimthe error limit

Definition at line 375 of file Conopt.java.

◆ setMaxSup()

int jconopt.Conopt.setMaxSup ( int maxsup)
inline

limit on superbasics.

CONOPT uses a reduced gradient algorithm and performs its optimization in a space of “Superbasic” variables. It needs a square matrix of size the number of superbasic variables for estimated second order information. Since this matrix can be fairly large, CONOPT places a limit that by default is at least 500 rows and columns. For larger models CONOPT reserves around 25% of the memory needed for other purposes to this matrix. If you have a model with many superbasic variables it may be advantageous to increase this limit.

Note
If you provide second order information, through one of the 2DLagr, 2DDir, or 2DDirLag routines, then it is usually not worth while to increase MaxSup.

The limit can also be defined in an options file or options routine by setting LFNSUP.

Parameters
maxsupthe limit on superbasics

Definition at line 408 of file Conopt.java.

◆ allowEmptyRow()

int jconopt.Conopt.allowEmptyRow ( int emptyrow)
inline

allow empty rows.

CONOPT performs many tests on the input data and by default it does not allow empty rows, i.e. constraints that do not depend on any variables. In some modeling systems environments it can be useful to allow empty rows.

Parameters
emptyrow1 allows empty rows, 0 is the default behavior.

Definition at line 419 of file Conopt.java.

◆ allowEmptyCol()

int jconopt.Conopt.allowEmptyCol ( int emptycol)
inline

allow empty columns.

CONOPT performs many tests on the input data and by default it does not allow empty columns, i.e. variables that do not appear in any constraints. In some modeling systems environments it can be useful to allow empty columns. To bypass the usual tests you must inform CONOPT that empty columns should be allowed.

Parameters
emptycol1 allows empty columns, 0 is the default behaviour.

Definition at line 430 of file Conopt.java.

◆ debug2D()

int jconopt.Conopt.debug2D ( int debug2d)
inline

turn debugging of 2nd derivatives on and off.

CONOPT has a rudimentary routine for checking if the 2nd derivatives computed by 2DLagr, 2DDir, or 2DDirLag seem to be consistent with the derivatives computed by FDEval.

The interpretation of Debug2D is:

  • 0: No debugging (the default value)
  • -1: Perform debugging in the initial point only.
  • +n: Perform debugging every n’th iteration.

The value can also be defined in an options file or options routine be setting LKDEB2. Error return codes and examples of messages can be found in Error Return Codes.

Parameters
debug2dthe flag to enable the debugging of the second derivative evaulations

Definition at line 441 of file Conopt.java.

◆ disCont()

int jconopt.Conopt.disCont ( int discont)
inline

allow discontinuous functions and derivatives.

CONOPT assumes that all functions are smooth with smooth derivatives and that these functions and derivatives can be computed with a noise level close to the machine precision. CONOPT can also be used on models with non-smooth derivatives, e.g. models with ABS or MIN or MAX functions, but the algorithm will still work as if all functions and derivatives are smooth. A few internal tests may fail for a model with discontinuous derivatives. The call will only turn the tests off or on; it will not alter the optimization behavior.

Parameters
discont1 allows discontinuous functions and derivatives, 0 is the default behaviour.

Definition at line 452 of file Conopt.java.

◆ clearM()

int jconopt.Conopt.clearM ( int clearm)
inline

ClearM.

Parameters
clearm

Definition at line 463 of file Conopt.java.

◆ setResLim()

int jconopt.Conopt.setResLim ( double reslim)
inline

define resource limit.

CONOPT will by default allow the optimization to run for 1 million seconds. A new limit can be set by a call to this method.

Note
ResLim is a double precision number.
Parameters
reslimthe solve time limit in seconds

Definition at line 474 of file Conopt.java.

◆ setMaxHeap()

int jconopt.Conopt.setMaxHeap ( double maxheap)
inline

define Limit on Heap Memory.

By default CONOPT will allocate the memory it needs from the computers heap memory using Allocate or malloc calls. For very large models CONOPT may try to allocate more than the available physical memory and the responsiveness of the computer may suffer. This may not be acceptable in certain server environments. This method is used to define a limit on the amount of heap memory that CONOPT will allocate. If CONOPT reaches a point where it needs more memory than allowed it will try to continue without extra memory (if this is possible) or it will stop with an out of memory message and the sovle will return the value 113 or 114.

MaxHeap is measured in MegaBytes. A positive MaxHeap value indicates a limit while Maxheap = 0.0 indicates that the limit is set by the physical memory or the virtual memory system on the machine. After you have solved a model you can query the amount of memory actually used with the coiget_maxheapused() or COIGET_MaxHeapUsed().

The call is optional.

Parameters
maxheapthe limit on heap memory

Definition at line 485 of file Conopt.java.

◆ setThreadS()

int jconopt.Conopt.setThreadS ( int threads)
inline

number of threads allowed internally in CONOPT.

As discussed in Multi Threading CONOPT can use multiple threads using the OpenMP standard. The multi-threading capability is divided into three areas: (1) Internally in CONOPT, (2) during function and derivative calls using the FDEval callback routine, and (3) during directional 2nd derivative calls using the 2DDir callback routine.

This method is used to define how many threads can be used internally in CONOPT. The argument ThreadS is interpreted as follows:

  • ThreadS = 0: use MaxThread threads, as many as the OpenMP system will allocate,
  • ThreadS = 1: use one thread (this is the default),
  • ThreadS > 1: use min(ThreadS,MaxThread) threads.
Parameters
threadsthe number of threads allowed internally

Definition at line 496 of file Conopt.java.

◆ setThreadF()

int jconopt.Conopt.setThreadF ( int threadf)
inline

number of threads allowed for simultaneous FDEval calls.

This method can be used to define how many threads can be used for simultaneous FDEval calls. The argument ThreadF is interpreted as follows:

  • ThreadF = 0: use the same number of threads as internally in CONOPT (this is the default),
  • ThreadF = 1: use one thread,
  • ThreadF > 1: use min(ThreadS,ThreadF) threads.
Parameters
threadfthe number of threads for simultaneous FDEval calls

Definition at line 507 of file Conopt.java.

◆ setThread2D()

int jconopt.Conopt.setThread2D ( int thread2d)
inline

number of threads allowed for simultaneous 2DDir calls.

This method can be used to define how many threads can be used for simultaneous 2DDir calls. The argument Thread2D is interpreted as follows:

  • Thread2D = 0: use the same number of threads as internally in CONOPT (this is the default),
  • Thread2D = 1: use one thread,
  • Thread2D > 1: use min(Thread2D,ThreadF) threads.
Parameters
thread2dthe number of threads for simultaneous 2DDir calls

Definition at line 518 of file Conopt.java.

◆ setThreadC()

int jconopt.Conopt.setThreadC ( int threadc)
inline

check for thread compatibility.

When using multiple threads, the result of the execution is in most cases independent of the number of threads. However, a few operations mostly related to summations can create slightly different results depending on the number of threads, and therefore the results may depend on the number of threads. ThreadC can be used to force reproducible results. The execution is done as if there were ThreadC threads independent of the actual number of ThreadS (ThreadS > ThreadC).

This method can be used to define how many threads CONOPT should simulate. The argument ThreadC is interpreted as follows:

  • ThreadC = 0: let the execution be controlled by ThreadS defined above,
  • ThreadC > 1: simulate the use of ThreadC > ThreadS threads.

The upper bound on ThreadC is currently 8.

Parameters
threadcthe number of threads CONOPT should simulate

Definition at line 529 of file Conopt.java.