[Coin-discuss] Bug in OsiXprSolverInterface::getRowActivity()

Matthew Saltzman mjs at ces.clemson.edu
Tue Oct 7 13:07:56 EDT 2003


On Wed, 1 Oct 2003, Jesper Hansen wrote:

> There doesn't seem to be a rowact_ initialized when doing the
> CoinFillN(rowact_, nrows, 0.0) below:

Yep, looks that way.  Fix committed.  Thanks!

>
> const double * OsiXprSolverInterface::getRowActivity() const
> {
>   if( rowact_ == NULL ) {
>     activateMe();
>
>     if ( isDataLoaded() ) {
>       int nrows = getNumRows();
>       const double *rhs = getRightHandSide();
>       if( nrows > 0 ) {
> 	int status;
>
> 	getipv(N_PSTAT, &status);
>
> 	if ( status == 7 ) {
> 	  int i;
>
> 	  rowact_ = new double[nrows];
> 	  solution(NULL, rowact_, NULL, NULL);
>
> 	  for ( i = 0;  i < nrows;  i++ )
> 	    rowact_[i] = rhs[i] - rowact_[i];
> 	} else {
> 	  CoinFillN(rowact_, nrows, 0.0);
> 	}
>       }
>     }
>   }
>   return rowact_;
> }
>
> 'Jesper
>
> ---
> Jesper Hansen                   mailto:jesper at carmenconsulting.com
> Carmen Consulting, Købmagergade 53 3., DK-1150 Kbh K, Denmark
> Telephone: +45 33 17 91 92                 Mobile: +45 61 33 29 69
> http://www.carmenconsulting.com
>
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at www-124.ibm.com
> http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss
>

-- 
		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs



More information about the Coin-discuss mailing list