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) ];
232 assert(success !=
NULL);
253 for( k = 0; k < N; ++k )
257 for( k = 0; k < N; ++k )
263 for( i = k+1; i < N; ++i )
265 if( ABS(LU[
ENTRY(pivot[i],k) ]) > ABS( LU[
ENTRY(pivot[p],k) ]) )
269 if( ABS(LU[
ENTRY(pivot[p],k) ]) < 1e-08 )
285 for( i = k+1; i < N; ++i )
290 m = LU[
ENTRY(pivot[i],k) ] / LU[
ENTRY(pivot[k],k) ];
292 for( j = k+1; j < N; ++j )
293 LU[
ENTRY(pivot[i],j) ] -= m * LU[
ENTRY(pivot[k],j) ];
295 LU[
ENTRY(pivot[i],k) ] = m;
302 for( k = 1; k < N; ++k )
308 for( j = 0; j < k; ++j )
310 s -= LU[
ENTRY(pivot[k],j) ] * y[j];
316 x[N-1] = y[N-1] / LU[
ENTRY(pivot[N-1],N-1) ];
317 for( k = N-2; k >= 0; --k )
323 for( j = k+1; j < N; ++j )
325 s -= LU[
ENTRY(pivot[k],j) ] * x[j];
327 x[k] = s / LU[
ENTRY(pivot[k],k) ];
SCIP_Bool SCIPisIpoptAvailableIpopt(void)
void * SCIPgetNlpiOracleIpopt(SCIP_NLPIPROBLEM *nlpiproblem)
void SCIPsetModifiedDefaultSettingsIpopt(SCIP_NLPI *nlpi, const char *optionsstring)
enum SCIP_Retcode SCIP_RETCODE
#define BMSallocMemoryArray(ptr, num)
const char * SCIPgetSolverNameIpopt(void)
#define BMSfreeMemoryArray(ptr)
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