Hi everyone, I am writing to you in hoping that someone would be able to help me. I am new in proc optmodel so i had really take time to learn the basic in proc optmodel language before starting to solve my problem. So, I am trying to solve a quadratic problem ( in 9.4 sas version ) with a minimizing function that is based of a likelihood maximum formulation. In that way I have two tables :tableau 1 that contains my real X (188 rows and 8836 columns) and Marges that contains my real Y (188 rows, 188 columns). What I want is that estimates X and Y that respond to this function like for each row (i) of the two tables (that means for X and Y ) we have min f = [(X(to estimate) - X( real in "tableau"))**2/X(real)] + [(Y(to estimate) - Y(real in "Marges"))**2 / Y(real)] following to the constraint that the sum of X - Y = 0 ( for each rows of the two tables ). In my code the programm runs until the reading data step, there is no syntax error and it gives me the right format of my data but when i run the code with resolving part I have the note : "out of memory" and it stopped. I've already changed my size of sas with (memsize 0) but when i re-run it is always in "out of memory". Actually, my problem is that i really don't know if the problem is really the memory or if it's my syntax code wich that is not good. So if you see the code below : do you think that the problem is that my code is not correct ? Thanks for advance for the answer and hope that the question is clear (forgive about my english) proc optmodel;
/* I Tableau des M reels */
/*************************************************************/
/* declaration de paramètre */
set zone1 = 1..8836;
set <num> C1;
number trafic1{C1, zone1};
/* Lecture de la table */
read data Tableau1 into
C1 = [_N_]
{r in zone1} < trafic1[_N_, r]=col("Z"||r) >;
print trafic1;
/* II Tableau des contraintes réels ==> Y réels */
/*********************************************************************/
set Cont1 = 1..188;
set <num> N1;
number Marge1{N1, Cont1};
/* Lecture de la table */
read data Marges into
N1 = [_N_]
{m in Cont1} < Marge1[_N_, m]=col("O"||m) >;
print Marge1;
/* V Resolution */
/*********************************************************************/
/* V-1) Déclaration de variables */
var x{i in C1, d in zone1} >= 0 ;
var y{j in N1, o in cont1} >= 0 ;
/* V-2) La fonction objective : minimisation de la variance */
minimize f = sum{i in C1, d in zone1} ((X[i, d] - trafic1[i, d])**2/trafic1[i, d]) +
sum{j in N1 , o in cont1} (( Y[j, o]- Marge1[j, o])**2/Marge1[j, o]);
/* V-3) subject to the following constraints */
Con Bornes {i in C1, d in zone1, j in N1, o in cont1} :(X[i, d] - Y[j, o]) = 0;
solve;
print {i in C1, d in zone1: X[i, d] > 0} X ;
quit;
... View more