Purpose
Returns the
objective function coefficients for the columns in a given range.
Synopsis
int XPRS_CC XPRSgetobj(XPRSprob prob, double obj[], int first, int last);
Arguments
prob
|
The current problem.
|
obj
|
Double array of length last-first+1 where the objective function coefficients are to be placed.
|
first
|
First column in the range.
|
last
|
Last column in the range.
|
Example
The following example retrieves the objective function coefficients of the current
problem:
int cols;
double *obj;
...
XPRSgetintattrib(prob,XPRS_COLS,&cols);
obj = (double *) malloc(sizeof(double)*cols);
XPRSgetobj(prob, obj, 0, cols-1);
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.