CONOPT
Loading...
Searching...
No Matches
mp_qpbandb.c File Reference

Detailed Description

Similar to qpdense but with added binary variables to model that not too many x-values can be selected.

For more information about the individual callbacks, please have a look at the source code.

Definition in file mp_qpbandb.c.

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <omp.h>
#include "coiheader.h"
#include "comdecl.h"

Data Structures

struct  BBNode
 

Functions

void c_log (char *msgt, int code)
 
void list_node (struct BBNode *node)
 
void list_nodes ()
 
void remove_activenode (struct BBNode *node)
 
void return_freenode (struct BBNode *node)
 
struct BBNodeget_freenode ()
 
void add_activenode (struct BBNode *node)
 
void add2workpool (struct BBNode *node)
 
int select_var (struct BBNode *node)
 
void create_workpool ()
 
void solve_workpool ()
 
void bandb_solve ()
 
float rndx ()
 
void defdata ()
 
int COI_CALLCONV QP_ReadMatrix (double LOWER[], double CURR[], double UPPER[], int VSTA[], int TYPE[], double RHS[], int ESTA[], int COLSTA[], int ROWNO[], double VALUE[], int NLFLAG[], int NUMVAR, int NUMCON, int NUMNZ, void *USRMEM)
 Define information about the model.
 
int COI_CALLCONV QP_FDEval (const double X[], double *G, double JAC[], int ROWNO, const int JCNM[], int MODE, int IGNERR, int *ERRCNT, int NUMVAR, int NUMJAC, int THREAD, void *USRMEM)
 Compute nonlinear terms and non-constant Jacobian elements.
 
int COI_CALLCONV QP_2DDir (const double X[], const double DX[], double D2G[], int ROWNO, const int JACNUM[], int *NODRV, int NUMVAR, int NUMJAC, int THREAD, void *USRMEM)
 Computes the second derivative of a constraint in a direction.
 
int COI_CALLCONV QP_2DLagrStr (int HSRW[], int HSCL[], int *NODRV, int NUMVAR, int NUMCON, int NHESS, void *USRMEM)
 Specify the structure of the Lagrangian of the Hessian.
 
int COI_CALLCONV QP_2DLagrVal (const double X[], const double U[], const int HSRW[], const int HSCL[], double HSVL[], int *NODRV, int NUMVAR, int NUMCON, int NHESS, void *USRMEM)
 Compute the Lagrangian of the Hessian.
 
int COI_CALLCONV BB_Message (int SMSG, int DMSG, int NMSG, char *MSGV[], void *USRMEM)
 
int COI_CALLCONV BB_ErrMsg (int ROWNO, int COLNO, int POSNO, const char *MSG, void *USRMEM)
 
int COI_CALLCONV BB_Status (int MODSTA, int SOLSTA, int ITER, double OBJVAL, void *USRMEM)
 
int COI_CALLCONV BB_Solution (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)
 
int main (int argc, char **argv)
 Main program. A simple setup and call of CONOPT.
 

Variables

double Q [NQ]
 
double Mean [NN]
 
double Target
 
int binmap [NN]
 
int seed = 12359
 
coiHandle_t * CntVect1
 
double bintol = 1.0e-7
 
int totnodes
 
int freenodes
 
int actnodes
 
int numsolve
 
int intfound
 
int numintfound
 
double bestint
 
double solution [NVAR]
 
struct BBNodeactnode
 
struct BBNodefreenode
 
int maxpool
 
int workpool
 
struct BBNodework_node [maxmaxpool]
 
int parallel
 
double stime
 

Macro Definition Documentation

◆ NN

#define NN   32

Definition at line 36 of file mp_qpbandb.c.

◆ NVAR

#define NVAR   (NN*2) /* Number of All variables, continuous and binary */

Definition at line 37 of file mp_qpbandb.c.

◆ NBIN

#define NBIN   NN /* Number of binary variables */

Definition at line 38 of file mp_qpbandb.c.

◆ MAXBIN

#define MAXBIN   15 /* Max number of nonzero X-variables */

Definition at line 39 of file mp_qpbandb.c.

◆ NOBS

#define NOBS   60 /* Number of observations used to estimate Q */

Definition at line 40 of file mp_qpbandb.c.

◆ NQ

#define NQ   (NN*(NN+1)/2) /* Number of nonzeros in triangle of Q */

Definition at line 41 of file mp_qpbandb.c.

◆ maxmaxpool

#define maxmaxpool   64 /* Allocation size for WorkPool */

Definition at line 131 of file mp_qpbandb.c.

Function Documentation

◆ c_log()

void c_log ( char * msgt,
int code )

Definition at line 52 of file mp_qpbandb.c.

◆ list_node()

void list_node ( struct BBNode * node)

Definition at line 144 of file mp_qpbandb.c.

◆ list_nodes()

void list_nodes ( )

Definition at line 153 of file mp_qpbandb.c.

◆ remove_activenode()

void remove_activenode ( struct BBNode * node)

Definition at line 168 of file mp_qpbandb.c.

◆ return_freenode()

void return_freenode ( struct BBNode * node)

Definition at line 181 of file mp_qpbandb.c.

◆ get_freenode()

struct BBNode * get_freenode ( )

Definition at line 191 of file mp_qpbandb.c.

◆ add_activenode()

void add_activenode ( struct BBNode * node)

Definition at line 219 of file mp_qpbandb.c.

◆ add2workpool()

void add2workpool ( struct BBNode * node)

Definition at line 232 of file mp_qpbandb.c.

◆ select_var()

int select_var ( struct BBNode * node)

Definition at line 240 of file mp_qpbandb.c.

◆ create_workpool()

void create_workpool ( )

Definition at line 266 of file mp_qpbandb.c.

◆ solve_workpool()

void solve_workpool ( )

Definition at line 360 of file mp_qpbandb.c.

◆ bandb_solve()

void bandb_solve ( )

Definition at line 502 of file mp_qpbandb.c.

◆ rndx()

float rndx ( )

Definition at line 561 of file mp_qpbandb.c.

◆ defdata()

void defdata ( )

Definition at line 569 of file mp_qpbandb.c.

◆ QP_ReadMatrix()

int COI_CALLCONV QP_ReadMatrix ( double LOWER[],
double CURR[],
double UPPER[],
int VSTA[],
int TYPE[],
double RHS[],
int ESTA[],
int COLSTA[],
int ROWNO[],
double VALUE[],
int NLFLAG[],
int NUMVAR,
int NUMCON,
int NUMNZ,
void * USRMEM )

Define information about the model.

where:

  • LOWER: Vector of lower bounds on the variables. CONOPT will fill the vector with a special internal value that represent minus infinity or no lower bound before issuing the callback.
  • CURR: Vector of initial values of the variables. CONOPT will fill the vector with the default initial value of zero before issuing the callback.
  • UPPER: Vector of upper bounds on the variables. CONOPT will fill the vector with a special internal value that represent plus infinity or no upper bound before issuing the callback.
  • VSTA: Vector of initial status values for the variable. VSTA is only used if coidef_inistat() was called with IniStat = 1 or 2.

    If IniStat = 1 the value of VSTA must be defined as:

    • 0: The variable is initialized non-basic (if CURR = LOWER or CURR = UPPER) or super-basic, and
    • 1: The variable is initialized basic

    and if IniStat = 2 the value of VSTA must be defined as:

    • 0: The variable is initialized at lower bound
    • 1: The variable is initialized at upper bound
    • 2: The variable is initialized basic, and
    • 3: The variable is initialized superbasic.

    IniStat = 1 is simple to implement by hand, while IniStat = 2 is consistent with the output status defined in the Solution callback method. Note that if the numerical value in CURR are inconsistent with the status value, the numerical values will be used.

    If IniStat = 0 (the default value) CONOPT will not use VSTA and you do not have to define it.


  • TYPE: Vector of equation types. The values of TYPE have the following meaning:
    • 0: An equality constraint.
    • 1: A greater than or equal constraint.
    • 2: A less than or equal constraint.
    • 3: A free row.

      There is no default value for TYPE so it must be defined for all constraints. Note that CONOPT does not accept ranges.


  • RHS: Vector of right hand sides values. The default value is zero.
  • ESTA: Vector of initial status values for the slacks in the constraints. ESTA is only used if coidef_inistat() was called with IniStat = 1 or 2.

    If IniStat = 1 the value of ESTA must be defined as:

    • 0: The slack is initialized non-basic (if the constraint is binding in the initial point) or super-basic, and
    • 1: The slack is initialized basic

    and if IniStat = 2 the value of ESTA must be defined as:

    • 0: The slack is initialized at lower bound.
    • 1: The slack is initialized at upper bound.
    • 2: The slack is initialized basic, and
    • 3: The slack is initialized superbasic.

    Again, IniStat = 1 is simple to implement by hand, while IniStat = 2 is consistent with the output status defined in Solution callback method.

    If IniStat = 0 (the default value) then CONOPT will not use ESTA.

  • COLSTA: Vector of start of column pointers. All non-zero Jacobian elements must be sorted by column, i.e. all elements in column i comes before all elements in column i+1. COLSTA points to the first element in each column. If you have selected Base = 1 (Fortran conventions) then COLSTA must therefore satisfy: COLSTA(1) = 1 and COLSTA(N+1) = NZ+1. If you have selected Base = 0 (C conventions) then COLSTA must therefore satisfy: COLSTA[0] = 0 and COLSTA[N] = NZ. COLSTA must in both cases be increasing.
  • ROWNO: Vector of row or equation numbers of the non-zeros. The numbers must be in the range 1 through M inclusive if you have defined Base = 1 (Fortran conventions) and in the range 0 to M-1 inclusive if you have defined Base = 0 (C conventions). Although the columns are sorted, the rows do not have to be sorted within each column.
  • VALUE: Vector of values of the Jacobian elements. VALUE must be defined for all constant Jacobian elements, i.e. elements for which the following NLFLAG = 0. VALUE does not have to be defined for varying Jacobian elements.
  • NLFLAG: Vector of nonlinearity flags:

    • 0: The non-zero is constant, i.e. the variable appears linearly.
    • 1: The non-zero is varying, i.e. the variable appears nonlinearly

    NLFLAG is not read if the model is linear, i.e. if NLNZ = 0, otherwise it must be defined. Note that if you have an LP model, you should probably select a specialized LP algorithm instead of CONOPT.

  • N: Number of variables as defined in coidef_numvar().
  • M: Number of constraints as defined in coidef_numcon().
  • NZ: Number of Jacobian elements as defined in coidef_numnz().
  • USRMEM: User memory as defined in coidef_usrmem() (Only for Fortran and C API).

The lower bounds in LOWER must be less than or equal to the upper bounds in UPPER. Some of the bounds may be -INF or +INF, which are the bounds CONOPT assigns by default. If a bound is infinite, the user should normally not change the corresponding entry in LOWER or UPPER. If it is more convenient for the modeler to assign a value representing infinity it should be done using the values that are present in LOWER and UPPER when ReadMatrix is called, for example taken from the first element before any assignments are done. As an alternative, you may define the numerical value of Infinity to be used by the solution algorithm in option RTMAXV and store the same value in UPPER and -RTMAXV in LOWER.

The values in CURR, both those defined by the modeler and those defined by default, are without warning moved to the nearest bound if they are outside the bounds.

Note
CONOPT assumes that all functions are defined for all values of the variables between their bounds. CONOPT will never attempt to evaluate the functions in points outside the bounds specified by LOWER and UPPER.

Definition at line 637 of file mp_qpbandb.c.

◆ QP_FDEval()

int COI_CALLCONV QP_FDEval ( const double X[],
double * G,
double JAC[],
int ROWNO,
const int JCNM[],
int MODE,
int IGNERR,
int * ERRCNT,
int NUMVAR,
int NUMJAC,
int THREAD,
void * USRMEM )

Compute nonlinear terms and non-constant Jacobian elements.

where:

  • X: Vector with the point of evaluation. The point is provided by CONOPT.
  • G: Scalar function value: The value of G must be returned by the modeler if MODE = 1 or 3, otherwise it will be ignored. If FVincLin defined in coidef_fvinclin() is 0, the default value, then G should return the sum of the nonlinear terms in row number ROWNO, and if FVincLin is 1 then G should return the sum of both linear and nonlinear terms. The nonlinear terms are defined as all terms that correspond to Jacobian elements with NLFLAG = 1 when loading the model. Constant terms in nonlinear constraints may be included in G provided RHS in ReadMatrix is adjusted correspondingly. Constant terms in linear constraints may also be defined here provided FVforAll is given the non default value 1 in coidef_fvforall(). In summary, G should include the following, depending on FVincLin and FVforAll:
FVforAll \ FVincLin 0 1
0 G includes nonlinear terms only. FDEval is only called for nonlinear rows. G includes linear and nonlinear terms. FDEval is only called for nonlinear rows.
1 G includes nonlinear and constant terms. FDEval is called for all rows. G includes linear, nonlinear, and constant terms. FDEval is called for all rows.
  • JAC: Vector of Jacobian values. All the nonlinear Jacobian values in row number ROWNO (and only these) should be evaluated. The indices in JAC are the indices of the variables, i.e. the derivative with respect to X(I) should be returned in JAC(I). JAC must be returned by the modeler if MODE = 2 or 3; otherwise it must be ignored.
  • ROWNO: Scalar with the number of the row for which nonlinearities are to be evaluated. Is provided by CONOPT. Note that if FVforAll = 0, the default value, then FDEval will only be called for nonlinear rows, and constant terms in linear rows must therefore be included in RHS in ReadMatrix. If FVforAll = 1 then FDEval will be called for all rows, and the linear constraints must return any constant term that is not included in the right hand side. CONOPT will initialize G to zero so FDEval can just return for linear rows without constant terms. In summary, FDEval will be called for the following values of ROWNO, depending on FVforAll:

    • 0: Called for all nonlinear rows only.
    • 1: Called for all rows.

    The row numbers are consistent with the Base selected by the modeler.

  • JCNM: Vector with a list of column numbers for the nonlinear nonzero Jacobian elements in the current row. It is only defined when MODE = 2 or 3. JCNM and NJ are provided for modelers that may find this information useful; it can be ignored by others. The numbers are consistent with the Base (Fortran or C conventions) selected by the modeler.
  • MODE: Scalar indicator for mode of evaluation, provided by CONOPT:
    • 1: Only evaluate the sum of the nonlinear terms (and possibly linear terms) in row ROWNO and return the value in G.
    • 2: Only evaluate the nonlinear Jacobian elements in row ROWNO and return them in JAC.
    • 3: Perform both option 1 and 2.
  • IGNERR: Scalar that indicates whether CONOPT assumes the point to be safe (0) or potentially unsafe (1). During certain parts of the optimization CONOPT will make very long steps and it is not unlikely that one of the constraints is not defined. If an error is encountered while IGNERR is 1, this error is not included in the ErrLim limit, and the modeler may skip any error messages that otherwise should be issued from FDEval.
  • ERRCNT: Scalar Function Evaluation Error Indicator. FDEval must set this argument to 1 each time a function value cannot be computed. The counts are accumulated by CONOPT (except when IGNERR = 1). If their sum exceeds the ErrLim value defined in coidef_errlim(), CONOPT will stop the optimization, communicate the solution to the modeler with solver status SOLSTA = 5 (Evaluation Error Limit) in callback routine Status, and return control to the modeler. If ERRCNT has been set by FDEval then G and JAC will not be used and CONOPT will in general try to backtrack to a "safe" point. Note that CONOPT assumes that all functions are defined for all values of the variables between their bounds. CONOPT will never call FDEval with X outside the bounds specified in ReadMatrix. Also see the Progress callback routine for an alternative way of stopping CONOPT.
  • NEWPT: Scalar new point indicator, provided by CONOPT:

    • 0: This is the same point as in last call, i.e. ROWNO has changed but the nonlinear variables in X have not changed. Some variables that are linear in all constraints may also have been changed.
    • 1: This is a new point.

    NEWPT is provided by CONOPT as a service to the modeler. It may be used to calculate and reuse terms that depend on X but are common among several equations, e.g. when some of the equations represent simultaneous sets of differential equations solved by an expensive integration routine.

  • N: Number of variables as defined in coidef_numvar().
  • NJ: Number of nonlinear nonzero Jacobian elements in the current row and number of elements in the JCNM vector. JCNM is only defined when MODE = 2 or 3; when MODE = 1 then NJ has the value 1 and JCNM points to a random vector.
  • THREAD: In some multi-threading environments multiple copies of FDEval can be called at the same time, (see Multi Threading). THREAD will hold the number of the thread for the current call of FDEval. THREAD is in the interval from 0 to the maximum number of threads allowed for FDEval.
  • USRMEM: User memory as defined in coidef_usrmem() (Only for Fortran and C API).

You should notice the difference between the ERRCNT and the return code of FDEval. A nonzero value returned in ERRCNT indicates that the current point defined in X is bad. The function value G or the derivatives JAC could not be computed and CONOPT should try to backtrack to a safe point. A nonzero value returned as the value of FDEval indicates that there is a serious or permanent error and there is no reason to continue the optimization. The return code on FDEval can for example be used if a data file is not found, or if FDEval is called with a value of ROWNO that was not expected.

Definition at line 770 of file mp_qpbandb.c.

◆ QP_2DDir()

int COI_CALLCONV QP_2DDir ( const double X[],
const double DX[],
double D2G[],
int ROWNO,
const int JACNUM[],
int * NODRV,
int NUMVAR,
int NUMJAC,
int THREAD,
void * USRMEM )

Computes the second derivative of a constraint in a direction.

where:

  • X: Vector with the point in which the directional second derivatives should be computed. Defined by CONOPT.
  • DX: Vector with the direction in which the directional second derivatives should be computed. Defined by CONOPT.
  • D2G: Vector returning the directional second derivative. The relevant positions (see JCNM below) will be zero on entry to 2DDir.
  • ROWNO: The constraint for which the directional second derivatives should be computed. Defined by CONOPT. 2DDir will be called for one constraint at a time and only for nonlinear constraints.
  • JCNM: List of column numbers for the variables that appear nonlinearly in the current constraint. JCNM and NJ (see below) are provided as a service to modelers that may find this information useful; it can be ignored by others.
  • NODRV: Must be set to 1 if the directional second derivatives for some reason could not be computed, for example because some of them were not defined. CONOPT will not use any output from a point that returned a nonzero NODRV.
  • N: The number of variables in the model as defined in coidef_numvar(). Provided by CONOPT.
  • NJ: The number of variables appearing nonlinearly in the current constraint. Defined by CONOPT.
  • THREAD: In some multi-threading environments multiple copies of FDEval can be called at the same time, (see Multi Threading). THREAD will hold the number of the thread for the current call of FDEval. THREAD is in the interval from 0 to the maximum number of threads allowed for FDEval.
  • USRMEM: User memory as defined in coidef_usrmem() (Only for Fortran and C API).

Definition at line 833 of file mp_qpbandb.c.

◆ QP_2DLagrStr()

int COI_CALLCONV QP_2DLagrStr ( int HSRW[],
int HSCL[],
int * NODRV,
int NUMVAR,
int NUMCON,
int NHESS,
void * USRMEM )

Specify the structure of the Lagrangian of the Hessian.

where:

  • ROWNO: Vector of row numbers of the lower triangular part of the Hessian. Must be defined by the modeler when MODE = 2 and is provided as a help to the modeler when MODE = 3.
  • COLNO: Vector of column numbers of the lower triangular part of the Hessian. Must be defined by the modeler when MODE = 2 and is provided as a help to the modeler when MODE = 3. The elements of the Hessian must be sorted column wise, i.e. COLNO must be non-decreasing. Within each column the elements must be sorted row-wise, i.e. the elements of ROWNO must be increasing for sequences for which COLNO is constant. The row and column numbers are interpreted according to Base, i.e. they are between 1 and N when Base = 1 (Fortran conventions) and between 0 and N-1 when Base = 0 (C conventions).
  • NODRV: Can be set to 1 if the derivatives for some reason could not be computed, for example because some of them were not defined. Is initialized to 0 by CONOPT. CONOPT will not use second order methods in the current point if NODRV is 1.
  • N: The number of variables in the model as defined in coidef_numvar(). Provided by CONOPT.
  • M: The number of constraints in the model as defined in coidef_numcon(). Provided by CONOPT.
  • NHESS: The number of nonzero elements in the Hessian. When MODE = 1 CONOPT will define the maximum number of elements it will accept in NHESS, and 2DLagrVal must return the actual number of element. If the actual number is larger than the input value of NHESS then CONOPT will not use the Hessian of the Lagrangian and 2DLagrVal will not be called again. When MODE > 1 NHESS is defined by CONOPT as the value provided by the modeler in the first call.
  • USRMEM: User memory as defined in coidef_usrmem() (Only for Fortran and C API).

Definition at line 866 of file mp_qpbandb.c.

◆ QP_2DLagrVal()

int COI_CALLCONV QP_2DLagrVal ( const double X[],
const double U[],
const int HSRW[],
const int HSCL[],
double HSVL[],
int * NODRV,
int NUMVAR,
int NUMCON,
int NHESS,
void * USRMEM )

Compute the Lagrangian of the Hessian.

where:

  • MODE: Distinguishes between the three modes described above.
  • X: Vector with the point in which the Hessian of the Lagrangian should be computed. Defined by CONOPT when MODE = 3.
  • U: The vector of weights on the individual constraints. The Lagrangian is defined as L = SUM(r in rows)U(r) . function(r). U is defined by CONOPT when MODE = 3.
  • ROWNO: Vector of row numbers of the lower triangular part of the Hessian. Must be defined by the modeler when MODE = 2 and is provided as a help to the modeler when MODE = 3.
  • COLNO: Vector of column numbers of the lower triangular part of the Hessian. Must be defined by the modeler when MODE = 2 and is provided as a help to the modeler when MODE = 3. The elements of the Hessian must be sorted column wise, i.e. COLNO must be non-decreasing. Within each column the elements must be sorted row-wise, i.e. the elements of ROWNO must be increasing for sequences for which COLNO is constant. The row and column numbers are interpreted according to Base, i.e. they are between 1 and N when Base = 1 (Fortran conventions) and between 0 and N-1 when Base = 0 (C conventions).
  • VALUE: Vector returning the values of the second derivatives when MODE = 3. The individual elements must be defined in the order used for ROWNO and COLNO. VALUE will be initialized to zero when 2DLagrVal is called and it must be defined by the modeler.
  • NODRV: Can be set to 1 if the derivatives for some reason could not be computed, for example because some of them were not defined. Is initialized to 0 by CONOPT. CONOPT will not use second order methods in the current point if NODRV is 1.
  • N: The number of variables in the model as defined in coidef_numvar(). Provided by CONOPT.
  • M: The number of constraints in the model as defined in coidef_numcon(). Provided by CONOPT.
  • NHESS: The number of nonzero elements in the Hessian. When MODE = 1 CONOPT will define the maximum number of elements it will accept in NHESS, and 2DLagrVal must return the actual number of element. If the actual number is larger than the input value of NHESS then CONOPT will not use the Hessian of the Lagrangian and 2DLagrVal will not be called again. When MODE > 1 NHESS is defined by CONOPT as the value provided by the modeler in the first call.
  • USRMEM: User memory as defined in coidef_usrmem() (Only for Fortran and C API).

2DLagrVal will only be called in points in which the constraint values have been computed successfully before with FDEval. Checks for function evaluation errors can therefore usually be limited. Note that 2DLagrVal in some cases can be called in a point that is different from the last point in which FDEval was called.

The maximum number of Hessian nonzero elements accepted by CONOPT is computed as the option value RVHESS multiplied by the number of nonlinear Jacobian elements. The default value of RVHESS is 10. If the Hessian has more than 10 times as many elements as the Jacobian it is expected that it is too expensive to compute and that directional 2nd derivatives in some form are more efficient to use. The modeler may allow CONOPT to use a denser Hessian by increasing RVHESS.

There is a rudimentary debugger of the values returned by 2DLagrVal. It can be turned on by setting Debug2D in coidef_debug2d() or with the option LKDEB2. Information on the debugger including messages and error return codes can be found in Error Return Codes.

Definition at line 887 of file mp_qpbandb.c.

◆ BB_Message()

int COI_CALLCONV BB_Message ( int SMSG,
int DMSG,
int NMSG,
char * MSGV[],
void * USRMEM )

Definition at line 897 of file mp_qpbandb.c.

◆ BB_ErrMsg()

int COI_CALLCONV BB_ErrMsg ( int ROWNO,
int COLNO,
int POSNO,
const char * MSG,
void * USRMEM )

Definition at line 904 of file mp_qpbandb.c.

◆ BB_Status()

int COI_CALLCONV BB_Status ( int MODSTA,
int SOLSTA,
int ITER,
double OBJVAL,
void * USRMEM )

Definition at line 911 of file mp_qpbandb.c.

◆ BB_Solution()

int COI_CALLCONV BB_Solution ( 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 )

Definition at line 929 of file mp_qpbandb.c.

◆ main()

int main ( int argc,
char ** argv )

Main program. A simple setup and call of CONOPT.

Definition at line 963 of file mp_qpbandb.c.

Variable Documentation

◆ Q

double Q[NQ]

Definition at line 42 of file mp_qpbandb.c.

◆ Mean

double Mean[NN]

Definition at line 43 of file mp_qpbandb.c.

◆ Target

double Target

Definition at line 44 of file mp_qpbandb.c.

◆ binmap

int binmap[NN]

Definition at line 45 of file mp_qpbandb.c.

◆ seed

int seed = 12359

Definition at line 46 of file mp_qpbandb.c.

◆ CntVect1

coiHandle_t* CntVect1

Definition at line 48 of file mp_qpbandb.c.

◆ bintol

double bintol = 1.0e-7

Definition at line 107 of file mp_qpbandb.c.

◆ totnodes

int totnodes

Definition at line 108 of file mp_qpbandb.c.

◆ freenodes

int freenodes

Definition at line 109 of file mp_qpbandb.c.

◆ actnodes

int actnodes

Definition at line 110 of file mp_qpbandb.c.

◆ numsolve

int numsolve

Definition at line 111 of file mp_qpbandb.c.

◆ intfound

int intfound

Definition at line 115 of file mp_qpbandb.c.

◆ numintfound

int numintfound

Definition at line 117 of file mp_qpbandb.c.

◆ bestint

double bestint

Definition at line 118 of file mp_qpbandb.c.

◆ solution

double solution[NVAR]

Definition at line 120 of file mp_qpbandb.c.

◆ actnode

struct BBNode* actnode

Definition at line 124 of file mp_qpbandb.c.

◆ freenode

struct BBNode* freenode

Definition at line 126 of file mp_qpbandb.c.

◆ maxpool

int maxpool

Definition at line 132 of file mp_qpbandb.c.

◆ workpool

int workpool

Definition at line 133 of file mp_qpbandb.c.

◆ work_node

struct BBNode* work_node[maxmaxpool]

Definition at line 134 of file mp_qpbandb.c.

◆ parallel

int parallel

Definition at line 136 of file mp_qpbandb.c.

◆ stime

double stime

Definition at line 138 of file mp_qpbandb.c.