Kaydet (Commit) 091a3919 authored tarafından Pedro Giffuni's avatar Pedro Giffuni

i124091 - Drop check for nonlinearity

It appears the check for non-linearity is causing failures for cases that 
can be solved by CoinMP and other solvers. We don't really have a 
non-linear solver but it doesn't make sense to check for linearity here.

Thanks to Ted Ralphs for pointing the exact code causing the failure.
üst 73f626dc
......@@ -369,12 +369,6 @@ void SAL_CALL SolverComponent::solve() throw(uno::RuntimeException)
double fInitial = aCellsIter->second.front();
double fCoeff = aCellsIter->second.back(); // last appended: coefficient for this variable
double fTwo = lcl_GetValue( mxDoc, aCellsIter->first );
bool bLinear = rtl::math::approxEqual( fTwo, fInitial + 2.0 * fCoeff ) ||
rtl::math::approxEqual( fInitial, fTwo - 2.0 * fCoeff );
// second comparison is needed in case fTwo is zero
if ( !bLinear )
maStatus = lcl_GetResourceString( RID_ERROR_NONLINEAR );
}
lcl_SetValue( mxDoc, *aVarIter, 0.0 ); // set back to zero for examining next variable
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment