Download Functional description of MINTO, a Mixed INTeger Optimizer Version
Transcript
col_ind = (int *) calloc (info_form.form_ccnt, sizeof (int));
col_coeff = (double *) calloc (info_form.form_ccnt, sizeof (double));
*vcnt = 0;
*nzcnt = 0;
while (get_column (&col_nz, &col_class, col_ind, col_coeff, &col_obj, &col_lb, &col_ub)) {
if (*nzcnt + col_nz > ldim) {
continue;
}
vfirst[*vcnt]
= *nzcnt;
vclass[*vcnt]
= col_class;
vobj[*vcnt]
= col_obj;
varlb[*vcnt]
= col_lb;
varub[(*vcnt)++] = col_ub;
for (j = 0; j < col_nz; j++) {
vind[*nzcnt]
= col_ind[j];
vcoef[(*nzcnt)++] = col_coeff[j];
}
if (*vcnt == sdim) {
break;
}
}
vfirst[*vcnt] = *nzcnt;
free (col_ind);
free (col_coef);
return (*vcnt > 0 ? SUCCESS : FAILURE);
}
unsigned
get_column (col_nz, col_class, col_ind, col_coeff, col_obj, col_lb, col_ub)
int *col_nz;
int *col_class;
int *col_ind;
double *col_coeff;
double *col_obj;
double *col_lb;
double *col_ub;
{
/*
* This function tries to generate a column. It returns 1 if it
* successful and 0 otherwise
*/
34