[Coin-ipopt] Fortran version: lower/upper bounds

Ned Nedialkov nedialk at mcmaster.ca
Fri Jun 29 14:02:37 EDT 2007



Dear All,

I am reading the description for setting lower and upper bounds on  
variables in the Fortran version with C interface.

I am puzzled by the description of bnds_l and bnds_u:

    nlb:    number of lower bounds on variables
    ilb:    indices for lower bounds (array length nlb)
    bnds_l: values of lower bounds (array length nlb)
               i.e. variable x[ilb[i]] has lower bound bnds_l[i] for  
i=1,..,nlb
    nub:    number of upper bounds on variables
    iub:    indices for upper bounds (array length nub)
    bnds_u: values of upper bounds (array length nub)
               i.e. variable x[iub[i]] has upper bound bnds_u[i] for  
i=1,..,nub

in

extern Ipopt DLLEXPORT Ipopt_Create(fint n, fint m, fint nlb,
				    fint *ilb, real *bnds_l, fint nub,
				    fint *iub, real *bnds_u, pEval_F Eval_F,
				    pEval_C Eval_C, pEval_G Eval_G,
				    pEval_A Eval_A, pEval_H Eval_H);


Should the above description read

    bnds_l: values of lower bounds (array length nlb)
               i.e. variable x[ilb[i]] has lower bound bnds_l[i] for  
i= 0,..,nlb-1

and

     bnds_u: values of upper bounds (array length nub)
               i.e. variable x[iub[i]] has upper bound bnds_u[i] for  
i=0,..,nub-1

That is, the indexing is from 0 to nlb-1 and nub-1, respectively.

Many thanks,
Ned Nedialkov




More information about the Coin-ipopt mailing list