diff options
author | Shashank | 2017-05-29 12:40:26 +0530 |
---|---|---|
committer | Shashank | 2017-05-29 12:40:26 +0530 |
commit | 0345245e860375a32c9a437c4a9d9cae807134e9 (patch) | |
tree | ad51ecbfa7bcd3cc5f09834f1bb8c08feaa526a4 /modules/optimization/includes | |
download | scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.gz scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.tar.bz2 scilab_for_xcos_on_cloud-0345245e860375a32c9a437c4a9d9cae807134e9.zip |
CMSCOPE changed
Diffstat (limited to 'modules/optimization/includes')
-rwxr-xr-x | modules/optimization/includes/dynlib_optimization.h | 28 | ||||
-rwxr-xr-x | modules/optimization/includes/gw_optimization.h | 30 | ||||
-rwxr-xr-x | modules/optimization/includes/spd.h | 56 |
3 files changed, 114 insertions, 0 deletions
diff --git a/modules/optimization/includes/dynlib_optimization.h b/modules/optimization/includes/dynlib_optimization.h new file mode 100755 index 000000000..16692390f --- /dev/null +++ b/modules/optimization/includes/dynlib_optimization.h @@ -0,0 +1,28 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) DIGITEO - 2009 - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt +* +*/ + +/*--------------------------------------------------------------------------*/ +#ifndef __DYNLIB_OPTIMIZATION_H__ +#define __DYNLIB_OPTIMIZATION_H__ + +#ifdef _MSC_VER +#ifdef OPTIMIZATION_EXPORTS +#define OPTIMIZATION_IMPEXP __declspec(dllexport) +#else +#define OPTIMIZATION_IMPEXP __declspec(dllimport) +#endif +#else +#define OPTIMIZATION_IMPEXP +#endif + +#endif /* __DYNLIB_OPTIMIZATION_H__ */ +/*--------------------------------------------------------------------------*/ diff --git a/modules/optimization/includes/gw_optimization.h b/modules/optimization/includes/gw_optimization.h new file mode 100755 index 000000000..ff91c2f69 --- /dev/null +++ b/modules/optimization/includes/gw_optimization.h @@ -0,0 +1,30 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2006 - INRIA - Allan CORNET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +/*--------------------------------------------------------------------------*/ +#ifndef __GW_OPTIM__ +#define __GW_OPTIM__ +/*--------------------------------------------------------------------------*/ +#include "dynlib_optimization.h" +/*--------------------------------------------------------------------------*/ +OPTIMIZATION_IMPEXP int gw_optimization(void); +/*--------------------------------------------------------------------------*/ +OPTIMIZATION_IMPEXP int sci_optim(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_semidef(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_fsolve(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_sqrsolve(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_qld(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_qp_solve(char *fname, unsigned long fname_len); +OPTIMIZATION_IMPEXP int sci_readmps(char *fname, unsigned long fname_len); +/*--------------------------------------------------------------------------*/ +#endif /* __GW_OPTIM__ */ +/*--------------------------------------------------------------------------*/ + diff --git a/modules/optimization/includes/spd.h b/modules/optimization/includes/spd.h new file mode 100755 index 000000000..ee4b5a28e --- /dev/null +++ b/modules/optimization/includes/spd.h @@ -0,0 +1,56 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) INRIA + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt + * + */ +#ifndef __SPD_H__ +#define __SPD_H__ + +#include "machine.h" +#include "dynlib_optimization.h" +#include "core_math.h" + +#define SQR(x) ((x)*(x)) + +#define NB 32 /* block size for dgels */ +#define MINABSTOL 1e-8 +#define MAXITERS 100 +#define TOLC 1e-5 /* tolerance used for dual infeasibility */ +#define SIGTOL 1e-5 /* tolerance used for detecting zero steps +* dF or dZ */ +#define MINRCOND 1e-8 /* minimum rcond to declare F_i dependent */ + + +OPTIMIZATION_IMPEXP int sp(int m, int L, double *F, int *blck_szs, double *c, + double *x, double *Z, double *ul, double nu, double abstol, + double reltol, double tv, int *iters, double *work, + int lwork, int *iwork, int *info); + +OPTIMIZATION_IMPEXP int C2F(spf)( + int *m, /* no of variables */ + int *L, /* no of blocks in F */ + double *F, /* F_i's in packed storage */ + int *blck_szs, /* L-vector, dimensions of diagonal blocks */ + double *c, /* m-vector */ + double *x, /* m-vector */ + double *Z, /* block diagonal matrix in packed storage */ + double *ul, /* ul[0] = pr. obj, ul[1] = du. obj */ + double *nu, /* >= 1.0 */ + double *abstol, /* absolute accuracy */ + double *reltol, /* relative accuracy */ + double *tv, /* target value */ + int *iters, /* on entry: the maximum number of iterations, + * on exit: the number of iterations taken */ + double *work, /* work array */ + int *lwork, /* size of work */ + int *iwork, /* work array of m integers */ + int *info /* status on termination */ +); + +#endif /* __SPD_H__ */ |