Commit 1d926025 authored by ferhat's avatar ferhat
Browse files

- sparse_dll option works fine with feedback variables

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2851 ac1d8469-bf42-47a9-8791-bf33cf982152
parent f5920bbc
...@@ -58,7 +58,7 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_ ...@@ -58,7 +58,7 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
global oo_ M_; global oo_ M_ T9025 T1149 T11905;
cvg=0; cvg=0;
iter=0; iter=0;
Per_u_=0; Per_u_=0;
...@@ -73,8 +73,33 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_ ...@@ -73,8 +73,33 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_
reduced = 0; reduced = 0;
while ~(cvg==1 | iter>maxit_), while ~(cvg==1 | iter>maxit_),
[r, y, g1, g2, g3, b]=feval(fname, y, x, params, periods, 0, y_kmin, Blck_size); [r, y, g1, g2, g3, b]=feval(fname, y, x, params, periods, 0, y_kmin, Blck_size);
% for i=1:periods;
% disp([sprintf('%5.14f ',[T9025(i) T1149(i) T11905(i)])]);
% end;
% return;
residual = r(:,y_kmin+1:y_kmin+1+y_kmax_l);
%num2str(residual,' %1.6f')
%jac_ = g1(1:(y_kmin)*Blck_size, 1:(y_kmin+1+y_kmax_l)*Blck_size);
%jac_
g1a=g1(:, y_kmin*Blck_size+1:(periods+y_kmin)*Blck_size); g1a=g1(:, y_kmin*Blck_size+1:(periods+y_kmin)*Blck_size);
b = b -g1(:, 1:y_kmin_l*Blck_size)*reshape(y(1+y_kmin-y_kmin_l:y_kmin,y_index)',1,y_kmin_l*Blck_size)'-g1(:, (periods+y_kmin_l)*Blck_size+1:(periods+y_kmin_l+y_kmax_l)*Blck_size)*reshape(y(periods+y_kmin+1:periods+y_kmin+y_kmax_l,y_index)',1,y_kmax_l*Blck_size)'; term1 = g1(:, 1:y_kmin_l*Blck_size)*reshape(y(1+y_kmin-y_kmin_l:y_kmin,y_index)',1,y_kmin_l*Blck_size)';
term2 = g1(:, (periods+y_kmin_l)*Blck_size+1:(periods+y_kmin_l+y_kmax_l)*Blck_size)*reshape(y(periods+y_kmin+1:periods+y_kmin+y_kmax_l,y_index)',1,y_kmax_l*Blck_size)';
b = b - term1 - term2;
% fid = fopen(['result' num2str(iter)],'w');
% fg1a = full(g1a);
% fprintf(fid,'%d\n',size(fg1a,1));
% fprintf(fid,'%d\n',size(fg1a,2));
% fprintf(fid,'%5.14f\n',fg1a);
% fprintf(fid,'%d\n',size(b,1));
% fprintf(fid,'%5.14f\n',b);
% fclose(fid);
% return;
%ipconfigb_ = b(1:(1+y_kmin)*Blck_size);
%b_
[max_res, max_indx]=max(max(abs(r'))); [max_res, max_indx]=max(max(abs(r')));
if(~isreal(r)) if(~isreal(r))
max_res = (-max_res^2)^0.5; max_res = (-max_res^2)^0.5;
...@@ -151,6 +176,14 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_ ...@@ -151,6 +176,14 @@ function y = solve_two_boundaries(fname, y, x, params, y_index, nze, periods, y_
dx = g1a\b- ya; dx = g1a\b- ya;
ya = ya + lambda*dx; ya = ya + lambda*dx;
y(1+y_kmin:periods+y_kmin,y_index)=reshape(ya',length(y_index),periods)'; y(1+y_kmin:periods+y_kmin,y_index)=reshape(ya',length(y_index),periods)';
% v = '';
% for i=1:(size(y_index,2))
% v = [v ' %1.6f'];
% end;
% v = [v '\n'];
% v
% sprintf(v,y(:,y_index)')
% return;
elseif(simulation_method==2), elseif(simulation_method==2),
flag1=1; flag1=1;
while(flag1>0) while(flag1>0)
......
This diff is collapsed.
...@@ -32,7 +32,11 @@ ...@@ -32,7 +32,11 @@
#ifdef LINBCG #ifdef LINBCG
# include "linbcg.hh" # include "linbcg.hh"
#endif #endif
#include "mex.h" #ifndef DEBUG_EX
#include "mex.h"
#else
#include "mex_interface.hh"
#endif
//#define DEBUGC //#define DEBUGC
......
...@@ -23,7 +23,6 @@ Mem_Mngr::Mem_Mngr() ...@@ -23,7 +23,6 @@ Mem_Mngr::Mem_Mngr()
{ {
swp_f=false; swp_f=false;
swp_f_b=0; swp_f_b=0;
//verbose=false;
} }
void void
Mem_Mngr::Print_heap() Mem_Mngr::Print_heap()
...@@ -44,6 +43,7 @@ Mem_Mngr::init_Mem() ...@@ -44,6 +43,7 @@ Mem_Mngr::init_Mem()
NZE_Mem=NULL; NZE_Mem=NULL;
NZE_Mem_add=NULL; NZE_Mem_add=NULL;
CHUNK_heap_pos=0; CHUNK_heap_pos=0;
NZE_Mem_Allocated.clear();
} }
void Mem_Mngr::fixe_file_name(string filename_arg) void Mem_Mngr::fixe_file_name(string filename_arg)
...@@ -60,7 +60,7 @@ Mem_Mngr::init_CHUNK_BLCK_SIZE(int u_count) ...@@ -60,7 +60,7 @@ Mem_Mngr::init_CHUNK_BLCK_SIZE(int u_count)
NonZeroElem* NonZeroElem*
Mem_Mngr::mxMalloc_NZE() Mem_Mngr::mxMalloc_NZE()
{ {
int i; long int i;
if (!Chunk_Stack.empty()) /*An unused block of memory available inside the heap*/ if (!Chunk_Stack.empty()) /*An unused block of memory available inside the heap*/
{ {
NonZeroElem* p1 = Chunk_Stack.back(); NonZeroElem* p1 = Chunk_Stack.back();
...@@ -69,32 +69,27 @@ Mem_Mngr::mxMalloc_NZE() ...@@ -69,32 +69,27 @@ Mem_Mngr::mxMalloc_NZE()
} }
else if (CHUNK_heap_pos<CHUNK_SIZE) /*there is enough allocated memory space available we keep it at the top of the heap*/ else if (CHUNK_heap_pos<CHUNK_SIZE) /*there is enough allocated memory space available we keep it at the top of the heap*/
{ {
int i=CHUNK_heap_pos++; i=CHUNK_heap_pos++;
return(NZE_Mem_add[i]); return(NZE_Mem_add[i]);
} }
else /*We have to allocate extra memory space*/ else /*We have to allocate extra memory space*/
{ {
//mexPrintf("CHUNK_SIZE=%d CHUNK_BLCK_SIZE=%d Nb_CHUNK=%d\n",CHUNK_SIZE,CHUNK_BLCK_SIZE,Nb_CHUNK);
CHUNK_SIZE+=CHUNK_BLCK_SIZE; CHUNK_SIZE+=CHUNK_BLCK_SIZE;
/*mexPrintf("Allocate %f Ko\n",double(CHUNK_BLCK_SIZE)*double(sizeof(NonZeroElem))/double(1024));
mexEvalString("drawnow;");*/
Nb_CHUNK++; Nb_CHUNK++;
#ifdef MEM_ALLOC_CHK NZE_Mem=(NonZeroElem*)mxMalloc(CHUNK_BLCK_SIZE*sizeof(NonZeroElem)); /*The block of memory allocated*/
mexPrintf("CHUNK_BLCK_SIZE=%d\n",CHUNK_BLCK_SIZE); NZE_Mem_Allocated.push_back(NZE_Mem);
#endif
NZE_Mem=(NonZeroElem*)mxMalloc(CHUNK_BLCK_SIZE*sizeof(NonZeroElem));
//mexPrintf("in mxMalloc NZE_Mem=%x CHUNK_heap_pos=%d CHUNK_BLCK_SIZE=%d Nb_CHUNK=%d\n",NZE_Mem, CHUNK_heap_pos, CHUNK_BLCK_SIZE, Nb_CHUNK);
if(!NZE_Mem) if(!NZE_Mem)
{ {
mexPrintf("Not enough memory available\n"); mexPrintf("Not enough memory available\n");
mexEvalString("drawnow;"); mexEvalString("drawnow;");
} }
#ifdef MEM_ALLOC_CHK NZE_Mem_add=(NonZeroElem**)mxRealloc(NZE_Mem_add, CHUNK_SIZE*sizeof(NonZeroElem*)); /*We have to redefine the size of pointer on the memory*/
mexPrintf("CHUNK_SIZE=%d\n",CHUNK_SIZE); if(!NZE_Mem_add)
#endif {
NZE_Mem_add=(NonZeroElem**)mxRealloc(NZE_Mem_add, CHUNK_SIZE*sizeof(NonZeroElem*)); mexPrintf("Not enough memory available\n");
#ifdef MEM_ALLOC_CHK mexEvalString("drawnow;");
mexPrintf("ok\n"); }
#endif
for (i=CHUNK_heap_pos;i<CHUNK_SIZE;i++) for (i=CHUNK_heap_pos;i<CHUNK_SIZE;i++)
{ {
NZE_Mem_add[i]=(NonZeroElem*)(NZE_Mem+(i-CHUNK_heap_pos)); NZE_Mem_add[i]=(NonZeroElem*)(NZE_Mem+(i-CHUNK_heap_pos));
...@@ -109,36 +104,13 @@ void ...@@ -109,36 +104,13 @@ void
Mem_Mngr::mxFree_NZE(void* pos) Mem_Mngr::mxFree_NZE(void* pos)
{ {
int i, gap; int i, gap;
/*if(verbose)
{
mexPrintf("pos=%x Nb_CHUNK=%d CHUNK_BLCK_SIZE=%d\n",pos,Nb_CHUNK, CHUNK_BLCK_SIZE);
mexEvalString("drawnow;");
}
*/
for (i=0;i<Nb_CHUNK;i++) for (i=0;i<Nb_CHUNK;i++)
{ {
/*if(verbose)
{
mexPrintf("i=%d\n",i);
mexEvalString("drawnow;");
mexPrintf("NZE_Mem_add[i*CHUNK_BLCK_SIZE]=%d\n",NZE_Mem_add[i*CHUNK_BLCK_SIZE]);
mexEvalString("drawnow;");
}*/
gap=((uint64_t)(pos)-(uint64_t)(NZE_Mem_add[i*CHUNK_BLCK_SIZE]))/sizeof(NonZeroElem); gap=((uint64_t)(pos)-(uint64_t)(NZE_Mem_add[i*CHUNK_BLCK_SIZE]))/sizeof(NonZeroElem);
if ((gap<CHUNK_BLCK_SIZE) && (gap>=0)) if ((gap<CHUNK_BLCK_SIZE) && (gap>=0))
break; break;
} }
/*if(verbose)
{
mexPrintf("push_back()\n");
mexEvalString("drawnow;");
}*/
Chunk_Stack.push_back((NonZeroElem*)pos); Chunk_Stack.push_back((NonZeroElem*)pos);
/*if(verbose)
{
mexPrintf("End\n");
mexEvalString("drawnow;");
}*/
} }
...@@ -151,9 +123,6 @@ Mem_Mngr::write_swp_f(int *save_op_all,long int *nop_all) ...@@ -151,9 +123,6 @@ Mem_Mngr::write_swp_f(int *save_op_all,long int *nop_all)
if (!SaveCode_swp.is_open()) if (!SaveCode_swp.is_open())
{ {
mexPrintf("open the swp file for writing\n"); mexPrintf("open the swp file for writing\n");
#ifdef PRINT_OUT
mexPrintf("file opened\n");
#endif
SaveCode_swp.open((filename + ".swp").c_str(), std::ios::out | std::ios::binary); SaveCode_swp.open((filename + ".swp").c_str(), std::ios::out | std::ios::binary);
if (!SaveCode_swp.is_open()) if (!SaveCode_swp.is_open())
{ {
...@@ -161,9 +130,6 @@ Mem_Mngr::write_swp_f(int *save_op_all,long int *nop_all) ...@@ -161,9 +130,6 @@ Mem_Mngr::write_swp_f(int *save_op_all,long int *nop_all)
mexEvalString("st=fclose('all');clear all;"); mexEvalString("st=fclose('all');clear all;");
mexErrMsgTxt("Exit from Dynare"); mexErrMsgTxt("Exit from Dynare");
} }
#ifdef PRINT_OUT
mexPrintf("done\n");
#endif
} }
SaveCode_swp.write(reinterpret_cast<char *>(nop_all), sizeof(*nop_all)); SaveCode_swp.write(reinterpret_cast<char *>(nop_all), sizeof(*nop_all));
SaveCode_swp.write(reinterpret_cast<char *>(save_op_all), (*nop_all)*sizeof(int)); SaveCode_swp.write(reinterpret_cast<char *>(save_op_all), (*nop_all)*sizeof(int));
...@@ -177,9 +143,6 @@ Mem_Mngr::read_swp_f(int **save_op_all,long int *nop_all) ...@@ -177,9 +143,6 @@ Mem_Mngr::read_swp_f(int **save_op_all,long int *nop_all)
swp_f=true; swp_f=true;
if (!SaveCode_swp.is_open()) if (!SaveCode_swp.is_open())
{ {
#ifdef PRINT_OUT
mexPrintf("file opened\n");
#endif
mexPrintf("open the file %s\n",(filename + ".swp").c_str()); mexPrintf("open the file %s\n",(filename + ".swp").c_str());
SaveCode_swp.open((filename + ".swp").c_str(), std::ios::in | std::ios::binary); SaveCode_swp.open((filename + ".swp").c_str(), std::ios::in | std::ios::binary);
j=SaveCode_swp.is_open(); j=SaveCode_swp.is_open();
...@@ -191,9 +154,6 @@ Mem_Mngr::read_swp_f(int **save_op_all,long int *nop_all) ...@@ -191,9 +154,6 @@ Mem_Mngr::read_swp_f(int **save_op_all,long int *nop_all)
mexEvalString("st=fclose('all');clear all;"); mexEvalString("st=fclose('all');clear all;");
mexErrMsgTxt("Exit from Dynare"); mexErrMsgTxt("Exit from Dynare");
} }
#ifdef PRINT_OUT
mexPrintf("done\n");
#endif
SaveCode_swp.seekg(0); SaveCode_swp.seekg(0);
} }
...@@ -277,15 +237,11 @@ Mem_Mngr::chk_avail_mem(int **save_op_all,long int *nop_all,long int *nopa_all,i ...@@ -277,15 +237,11 @@ Mem_Mngr::chk_avail_mem(int **save_op_all,long int *nop_all,long int *nopa_all,i
void void
Mem_Mngr::Free_All() Mem_Mngr::Free_All()
{ {
int i; while(NZE_Mem_Allocated.size())
/*mexPrintf("Nb_CHUNK=%d\n",Nb_CHUNK); {
mexEvalString("drawnow;");*/ mxFree(NZE_Mem_Allocated.back());
for (i=0;i<Nb_CHUNK;i++) NZE_Mem_Allocated.pop_back();
{ }
/*mexPrintf("NZE_Mem_add[%d]=%x\n",i*CHUNK_BLCK_SIZE,NZE_Mem_add[i*CHUNK_BLCK_SIZE]);
mexEvalString("drawnow;");*/
mxFree(NZE_Mem_add[i*CHUNK_BLCK_SIZE]);
}
mxFree(NZE_Mem_add); mxFree(NZE_Mem_add);
init_Mem(); init_Mem();
} }
...@@ -20,9 +20,14 @@ ...@@ -20,9 +20,14 @@
#ifndef MEM_MNGR_HH_INCLUDED #ifndef MEM_MNGR_HH_INCLUDED
#define MEM_MNGR_HH_INCLUDED #define MEM_MNGR_HH_INCLUDED
//#include <stack>
#include <vector> #include <vector>
#include <fstream> #include <fstream>
#include "mex.h" #ifndef DEBUG_EX
#include "mex.h"
#else
#include "mex_interface.hh"
#endif
using namespace std; using namespace std;
struct NonZeroElem struct NonZeroElem
...@@ -59,6 +64,7 @@ private: ...@@ -59,6 +64,7 @@ private:
int CHUNK_heap_pos/*, CHUNK_heap_max_size*/; int CHUNK_heap_pos/*, CHUNK_heap_max_size*/;
NonZeroElem** NZE_Mem_add; NonZeroElem** NZE_Mem_add;
NonZeroElem* NZE_Mem; NonZeroElem* NZE_Mem;
vector<NonZeroElem*> NZE_Mem_Allocated;
int swp_f_b; int swp_f_b;
fstream SaveCode_swp; fstream SaveCode_swp;
string filename; string filename;
......
This diff is collapsed.
...@@ -41,7 +41,7 @@ using namespace std; ...@@ -41,7 +41,7 @@ using namespace std;
struct t_save_op_s struct t_save_op_s
{ {
short int lag, operat; short int lag, operat;
int first, second; long int first, second;
}; };
const int IFLD =0; const int IFLD =0;
...@@ -52,24 +52,10 @@ const int IFLDZ =4; ...@@ -52,24 +52,10 @@ const int IFLDZ =4;
const int IFMUL =5; const int IFMUL =5;
const int IFSTP =6; const int IFSTP =6;
const int IFADD =7; const int IFADD =7;
const double eps=1e-7; const double eps=1e-10;
const double very_big=1e24; const double very_big=1e24;
const int alt_symbolic_count_max=1; const int alt_symbolic_count_max=1;
struct t_table_y
{
int index, nb;
int *u_index, *y_index;
};
struct t_table_u
{
t_table_u* pNext;
unsigned char type;
int index;
int op1, op2;
};
class SparseMatrix class SparseMatrix
{ {
...@@ -107,6 +93,8 @@ class SparseMatrix ...@@ -107,6 +93,8 @@ class SparseMatrix
void Delete_u(int pos); void Delete_u(int pos);
void Clear_u(); void Clear_u();
void Print_u(); void Print_u();
void CheckIt(int y_size, int y_kmin, int y_kmax, int Size, int periods, int iter);
void Check_the_Solution(int periods, int y_kmin, int y_kmax, int Size, double *u, int* pivot, int* b);
int complete(int beg_t, int Size, int periods, int *b); int complete(int beg_t, int Size, int periods, int *b);
double bksub( int tbreak, int last_period, int Size, double slowc_l double bksub( int tbreak, int last_period, int Size, double slowc_l
#ifdef PROFILER #ifdef PROFILER
...@@ -118,19 +106,11 @@ class SparseMatrix ...@@ -118,19 +106,11 @@ class SparseMatrix
void run_it(int nop_all,int *op_all); void run_it(int nop_all,int *op_all);
void run_u_period1(int periods); void run_u_period1(int periods);
void close_swp_file(); void close_swp_file();
void read_file_table_u(t_table_u **table_u, t_table_u **F_table_u, t_table_u **i_table_u, t_table_u **F_i_table_u, int *nb_table_u, bool i_to_do, bool shifting, int *nb_add_u_count, int y_kmin, int y_kmax, int u_size);
void read_file_table_y(t_table_y **table_y, t_table_y **i_table_y, int *nb_table_y, bool i_to_do, bool shifting, int y_kmin, int y_kmax, int u_size, int y_size);
void close_SaveCode();
stack<double> Stack; stack<double> Stack;
int nb_prologue_table_u, nb_first_table_u, nb_middle_table_u, nb_last_table_u; int nb_prologue_table_u, nb_first_table_u, nb_middle_table_u, nb_last_table_u;
int nb_prologue_table_y, nb_first_table_y, nb_middle_table_y, nb_last_table_y; int nb_prologue_table_y, nb_first_table_y, nb_middle_table_y, nb_last_table_y;
int middle_count_loop; int middle_count_loop;
char type; char type;
t_table_u *prologue_table_u, *first_table_u, *first_i_table_u, *middle_table_u, *middle_i_table_u, *last_table_u;
t_table_y *prologue_table_y, *first_table_y, *middle_table_y, *middle_i_table_y, *last_table_y;
t_table_u *F_prologue_table_u, *F_first_table_u, *F_first_i_table_u, *F_middle_table_u, *F_middle_i_table_u, *F_last_table_u;
fstream SaveCode; fstream SaveCode;
string filename; string filename;
int max_u, min_u; int max_u, min_u;
...@@ -142,7 +122,7 @@ class SparseMatrix ...@@ -142,7 +122,7 @@ class SparseMatrix
NonZeroElem **FNZE_R, **FNZE_C; NonZeroElem **FNZE_R, **FNZE_C;
int nb_endo, u_count_init; int nb_endo, u_count_init;
int *pivot, *pivotk; int *pivot, *pivotk, *pivot_save;
double *pivotv, *pivotva; double *pivotv, *pivotva;
int *b; int *b;
bool *line_done; bool *line_done;
...@@ -154,7 +134,7 @@ class SparseMatrix ...@@ -154,7 +134,7 @@ class SparseMatrix
int u_count_alloc, u_count_alloc_save; int u_count_alloc, u_count_alloc_save;
double markowitz_c_s; double markowitz_c_s;
double res1a; double res1a;
long int nop_all, /*nopa_all,*/ nop1, nop2; long int nop_all, nop1, nop2;
map<pair<pair<int, int> ,int>, int> IM_i; map<pair<pair<int, int> ,int>, int> IM_i;
protected: protected:
double *u, *y, *ya; double *u, *y, *ya;
...@@ -166,7 +146,8 @@ protected: ...@@ -166,7 +146,8 @@ protected:
int u_count, tbreak_g; int u_count, tbreak_g;
int iter; int iter;
double *direction; double *direction;
int start_compare;
int restart;
}; };
......
...@@ -178,10 +178,7 @@ main( int argc, const char* argv[] ) ...@@ -178,10 +178,7 @@ main( int argc, const char* argv[] )
mxFree(ya); mxFree(ya);
if(direction) if(direction)
mxFree(direction); mxFree(direction);
free(params); free(params);
} }
#else #else
......
...@@ -20,87 +20,20 @@ ...@@ -20,87 +20,20 @@
#ifndef SIMULATE_HH_INCLUDED #ifndef SIMULATE_HH_INCLUDED
#define SIMULATE_HH_INCLUDED #define SIMULATE_HH_INCLUDED
/*#include <stack>
#include <set>
#include <vector>
#include <cmath>
#include <iostream>
#include <fstream>*/
//#include <ctime>
//#include <string>
/*#include <map>
#include <algorithm>
#include "CodeInterpreter.hh"
#include "SymbolTableTypes.hh"*/
#include "Interpreter.hh" #include "Interpreter.hh"
//#include "Mem_Mngr.hh" #ifndef DEBUG_EX
/*#include "LinBCG.hh"*/ #include "mex.h"
#include "mex.h" #else
/*#include "ExprNode.hh"*/ #include "mex_interface.hh"
#endif
//#define pow pow1
/*typedef struct Variable_l
{
int* Index;
};
typedef struct tBlock
{
int Size, Sized, Type, Max_Lead, Max_Lag, Simulation_Type, Nb_Lead_Lag_Endo;
int *Variable, *dVariable, *Equation;
int *variable_dyn_index, *variable_dyn_leadlag;
IM_compact *IM_lead_lag;
};
typedef struct tModel_Block
{
int Size;
tBlock * List;
};
#define MARKOVITZ
#define PRINT_OUT_p
//#define RECORD_ALL
//#define DEBUGC
//#define PRINT_OUT
//#define PRINT_OUT_y1
//#define PRINT_u
//#define PRINT_OUT_b
//#define PRINT_OUT_y
//#define DEBUG
//#define EXTENDED
//#define FLOAT
//#define WRITE_u
//#define MEMORY_LEAKS
//#define N_MX_ALLOC
//#define MEM_ALLOC_CHK
#define NEW_ALLOC
//#define PROFILER
//#ifdef EXTENDED
//typedef long double double;
//#else
//typedef double double;
//#endif
*/
using namespace std; using namespace std;
/*std::multimap<std::pair<int,int>, int> var_in_equ_and_lag_i, equ_in_var_and_lag_i; int nb_row_x, nb_row_xd, u_size, y_size, x_size, y_kmin, y_kmax, y_decal;
int *pivota=NULL, *save_op_all=NULL;
#ifdef RECORD_ALL
bool record_all=false;
#endif
long int nopa_all;
*/
int /*Per_y_, Per_u_, it_, */nb_row_x, nb_row_xd, u_size, y_size, x_size, y_kmin, y_kmax, y_decal;
int periods, maxit_; int periods, maxit_;
double *params, markowitz_c, slowc, slowc_save; double *params, markowitz_c, slowc, slowc_save;
double *u, *y, *x, *r, *g1, *g2, *ya; double *u, *y, *x, *r, *g1, *g2, *ya;
......
...@@ -5,9 +5,9 @@ ...@@ -5,9 +5,9 @@
using namespace std; using namespace std;
int int