CONOPT
Loading...
Searching...
No Matches

Functions

integer(c_int) function conopt::coidef_numvar (cntvect, numvar)
 defines the number of variables in the model.
 
integer(c_int) function conopt::coidef_numcon (cntvect, numcon)
 defines the number of constraints in the model.
 
integer(c_int) function conopt::coidef_numnz (cntvect, numnz)
 defines the number of nonzero elements in the Jacobian.
 
integer(c_int) function conopt::coidef_numnlnz (cntvect, numnlnz)
 defines the Number of Nonlinear Nonzeros.
 
integer(c_int) function conopt::coidef_numhess (cntvect, numhess)
 defines the Number of Hessian Nonzeros.
 
integer(c_int) function conopt::coidef_optdir (cntvect, optdir)
 defines the Optimization Direction.
 
integer(c_int) function conopt::coidef_objcon (cntvect, objcon)
 defines the Objective Constraint.
 
integer(c_int) function conopt::coidef_objvar (cntvect, objvar)
 defines the Objective Variable.
 

Detailed Description

Before any model data can be loaded into CONOPT, the dimensions of the problem must be first specified.

This includes the number of variables, the number of constraints, the number of non-zeros, etc. The routines for registering the problem sizes are given in this section. These sizes are used in callbacks when loading the problem matrix and evaluating the first derivatives.

Function Documentation

◆ coidef_numvar()

integer(c_int) function conopt::coidef_numvar ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value numvar )

defines the number of variables in the model.

Attention
Mandatory routine. The number must be positive.

defines the number of variables in the model. The number does not include any slack or artificial variables.

Parameters
cntvectthe control vector
numvarthe number of variables

Definition at line 96 of file conopt.f90.

◆ coidef_numcon()

integer(c_int) function conopt::coidef_numcon ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value numcon )

defines the number of constraints in the model.

Attention
Mandatory routine. The number must be positive.

defines the number of constraints in the model. The number includes the objective function if the objective is defined as an expression (see coidef_objcon() and coidef_objvar()).

Parameters
cntvectthe control vector
numconthe number of constraints

Definition at line 120 of file conopt.f90.

◆ coidef_numnz()

integer(c_int) function conopt::coidef_numnz ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value numnz )

defines the number of nonzero elements in the Jacobian.

Attention
Mandatory routine. The number must be positive.

defines the number of nonzero elements in the Jacobian of the model (the matrix of first derivatives of all constraints with respect to all variables).

Parameters
cntvectthe control vector
numnzthe number of nonzero elements

Definition at line 143 of file conopt.f90.

◆ coidef_numnlnz()

integer(c_int) function conopt::coidef_numnlnz ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value numnlnz )

defines the Number of Nonlinear Nonzeros.

Attention
Mandatory routine.

defines the number of nonlinear nonzeros in the Jacobian. The number is zero if the model is linear and positive if the model is nonlinear.

Parameters
cntvectthe control vector
numnlnzthe number of nonlinear nonzeros

Definition at line 166 of file conopt.f90.

◆ coidef_numhess()

integer(c_int) function conopt::coidef_numhess ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value numhess )

defines the Number of Hessian Nonzeros.

defines the number of nonzeros in the Hessian. The number is zero if the model is linear and positive if the model is nonlinear.

Parameters
cntvectthe control vector
numhessthe number of nonzeros in Hessian

Definition at line 187 of file conopt.f90.

◆ coidef_optdir()

integer(c_int) function conopt::coidef_optdir ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value optdir )

defines the Optimization Direction.

defines the optimization direction. OptDir = +1 defines maximization and OptDir = -1 defines minimization. Setting an optimization direction is optional. If no optimization direction is set, the CONOPT will search for a feasible solution and then stop.

Parameters
cntvectthe control vector
optdirthe optimization direction

Definition at line 212 of file conopt.f90.

◆ coidef_objcon()

integer(c_int) function conopt::coidef_objcon ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value objcon )

defines the Objective Constraint.

Note
The constraint must be a Free Row, see argument TYPE in ReadMatrix in section ReadMatrix.

If both an objective variable and constraint are set, the last one set will be used in the optimization. You can turn a previously defined objective off by defining variable or constraint 0 as the objective (Fortran notation) or variable or constraint -1 (C notation).

Parameters
cntvectthe control vector
objconthe index of the objective constraint

Definition at line 238 of file conopt.f90.

◆ coidef_objvar()

integer(c_int) function conopt::coidef_objvar ( integer(c_int), dimension(*), intent(inout) cntvect,
integer(c_int), value objvar )

defines the Objective Variable.

Parameters
cntvectthe control vector
objvarthe index of the objective variable

Definition at line 256 of file conopt.f90.