Hello guys!
First of all, I am really new to this GAMS tool and I am using it as an input in my MNL model in python, so it clearly is not my field – I apologize in advance because my doubts will probably be very simple.
So, I am currently trying to perform a non-linear programming problem that looks like this:
My current code is the following:
$sTitle Set Definitions
Set
i 'SKU in analysis'
j 'Complementary SKU';
$sTitle Model Parameters
Parameter
d(j) stockout probability of each SKU
$ondelim
$include C:\Users\ricardo.cabral\Documents\Project\data.csv
$offdelim;
Parameter
s(i) demand rate for each SKU
$ondelim
$include C:\Users\ricardo.cabral\Documents\Project\demand_rate.csv
$offdelim;
$sTitle Model Definition
Variable
a(i,j) 'the substitution rates between i and j'
l(i) 'the intrinsic demand rate for that SKU'
er 'the error of the equation';
Positive Variable a(i,j),l(i);
Free variable z, er;
Equation
cons1
cons2
obj;
cons1.. s(i) = er + l(i) + sum((i,j) $ i ne j, a(i,j)*l(j)*d(j));
cons2.. sum((i,j), a(i,j) = le= 1;
'obj.. z =e= cons1**2 ;
I am not even at the running the model phase… I get lots of errors, specially at the cons1 line…
Can someone help me please? Been stuck for a couple days