87 const char* optionsstring
109 #define ENTRY(i,j) (N * (j) + (i)) 122 int pivot[3] = {0, 1, 2};
129 assert(success != NULL);
138 for( k = 0; k < N; ++k )
144 for( i = k+1; i < N; ++i )
146 if( ABS(LU[
ENTRY(pivot[i],k) ]) > ABS( LU[
ENTRY(pivot[p],k) ]) )
150 if( ABS(LU[
ENTRY(pivot[p],k) ]) < 1e-08 )
166 for( i = k+1; i < N; ++i )
171 m = LU[
ENTRY(pivot[i],k) ] / LU[
ENTRY(pivot[k],k) ];
173 for( j = k+1; j < N; ++j )
174 LU[
ENTRY(pivot[i],j) ] -= m * LU[
ENTRY(pivot[k],j) ];
176 LU[
ENTRY(pivot[i],k) ] = m;
183 for( k = 1; k < N; ++k )
189 for( j = 0; j < k; ++j )
191 s -= LU[
ENTRY(pivot[k],j) ] * y[j];
197 x[N-1] = y[N-1] / LU[
ENTRY(pivot[N-1],N-1) ];
198 for( k = N-2; k >= 0; --k )
204 for( j = k+1; j < N; ++j )
206 s -= LU[
ENTRY(pivot[k],j) ] * x[j];
208 x[k] = s / LU[
ENTRY(pivot[k],k) ];
234 assert(success != NULL);
255 for( k = 0; k < N; ++k )
259 for( k = 0; k < N; ++k )
265 for( i = k+1; i < N; ++i )
267 if( ABS(LU[
ENTRY(pivot[i],k) ]) > ABS( LU[
ENTRY(pivot[p],k) ]) )
271 if( ABS(LU[
ENTRY(pivot[p],k) ]) < 1e-08 )
287 for( i = k+1; i < N; ++i )
292 m = LU[
ENTRY(pivot[i],k) ] / LU[
ENTRY(pivot[k],k) ];
294 for( j = k+1; j < N; ++j )
295 LU[
ENTRY(pivot[i],j) ] -= m * LU[
ENTRY(pivot[k],j) ];
297 LU[
ENTRY(pivot[i],k) ] = m;
304 for( k = 1; k < N; ++k )
310 for( j = 0; j < k; ++j )
312 s -= LU[
ENTRY(pivot[k],j) ] * y[j];
318 x[N-1] = y[N-1] / LU[
ENTRY(pivot[N-1],N-1) ];
319 for( k = N-2; k >= 0; --k )
325 for( j = k+1; j < N; ++j )
327 s -= LU[
ENTRY(pivot[k],j) ] * x[j];
329 x[k] = s / LU[
ENTRY(pivot[k],k) ];
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
#define BMSfreeMemoryArrayNull(ptr)
void SCIPsetModifiedDefaultSettingsIpopt(SCIP_NLPI *nlpi, const char *optionsstring)
enum SCIP_Retcode SCIP_RETCODE
#define BMSallocMemoryArray(ptr, num)
const char * SCIPgetSolverNameIpopt(void)
SCIP_RETCODE LapackDsyev(SCIP_Bool computeeigenvectors, int N, SCIP_Real *a, SCIP_Real *w)
#define BMSduplicateMemoryArray(ptr, source, num)
static SCIP_RETCODE SCIPsolveLinearProb3(SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
#define BMScopyMemoryArray(ptr, source, num)
SCIP_RETCODE SCIPcreateNlpSolverIpopt(BMS_BLKMEM *blkmem, SCIP_NLPI **nlpi)
SCIP_RETCODE SCIPsolveLinearProb(int N, SCIP_Real *A, SCIP_Real *b, SCIP_Real *x, SCIP_Bool *success)
void * SCIPgetIpoptApplicationPointerIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
public methods for message output
const char * SCIPgetSolverDescIpopt(void)
struct BMS_BlkMem BMS_BLKMEM
#define SCIP_ALLOC_TERMINATE(retcode, x, TERM)