Salam,
ok its great i got it:)
Thanks Ali.
On Tue, Mar 20, 2012 at 7:51 AM, Alireza Bahari wrote:
Hi
I use Gams 23.7 and it has no error!!!
1- your are not allowed to use “-” in Gams and you can use “_” instead of “-”.
2- The Alias statement and parameter declaration were incorrect in your cod.
On Tue, Mar 20, 2012 at 1:59 PM, sara sohail wrote:
Thank you so much for your help your amendment has reduced my errors from 100 to 2 only.
but please firstly tell what did u added to make it better secondly the two errors remaining are saying:
unrecognizable item- skip to find anew statement
second is
identifier expected
and last one is
closing quote missing
please how u eliminate such errors?
Thanking again
Sara
On Tue, Mar 20, 2012 at 2:14 PM, Alireza Bahari wrote:
I hope this help you:
$Title Generic Small Open Economy Model – “SOEM”
$STitle Version 1 with:
-
2 goods, 2 activities, 2 households;
-
no market power in the world markets;
-
no firms amongst institutions.
-
SETS ===========================================================
SETS
AC the global set including all items
- Since there are no Firms in this exercise, they are excluded from the sets
/
AGR_A agricultural activity
NAGR_A non-agricultural activity
AGR_C agricultural commodity
NAGR_C non-agricultural commodity
LAB labour
CAP capital
U_HHD urban household
R_HHD rural household
GOV government
ROW rest of world
S_I savings-investment
YTAX income tax
STAX sales tax
TAR import tariff
TOTAL total account in SAM
/
- Generating the specific sets and subsets’
ACNT(AC) all elements in AC except total
A(AC) activities / AGR_A, NAGR_A /
C(AC) commodities / AGR_C, NAGR_C /
CE(C) exported commodities /AGR_C/
CNE(C) non - exported commodities / NAGR_C /
CM (C) imported commodities / NAGR_C /
CNM (C) non - imported commodities /AGR_C/
F(AC) factors / LAB, CAP /
I(AC) institutions / U_HHD, R_HHD, GOV, ROW /
H(I) households / U_HHD, R_HHD /
;
-
To exclude TOTAL from ACNT:
ACNT(AC) = YES ;
ACNT(‘TOTAL’) = NO;
-
Aliassets to be used when we want to distinguish between two versions, e.g.
-
when summing y(F,F) over columns, we can writeSUM(F y(F,FAL))
;
Alias ( AC , ACAL);
Alias ( C , CAL) ;
Alias (F , FAL) ;
Alias (I , IAL) ;
Alias (ACNT , ACNTAL ) ;
-
‘PARAMETER’ ======================================================
Parameter
ad(A) shift in the production fnfor activity a
alpha(F,A) elasticity of factor f in the production fnfor activity a
aq(C) shiftparameter in CES aggregationfor commodity c
ax(C) shiftparameter in CES transformationfor commodity c
beta(C,H) share of households total spending on commodity c
CPI consumer price index
;
On Tue, Mar 20, 2012 at 10:02 AM, sara sohail wrote:
Dear All,
I am a beginner in GAMS the following code i run and got error, i know i have some basic mistakes here can anyone help?please
i cannot copy errors. Alos can someone help me in copying errors so that i could share with you people or if needed i ll write them manually.
Thanks alot for your help;)
$Title Generic Small Open Economy Model – “SOEM”
$STitle Version 1 with:
-
2 goods, 2 activities, 2 households;
-
no market power in the world markets;
-
no firms amongst institutions.
-
SETS ===========================================================
SETS
AC the global set including all items
- Since there are no Firms in this exercise, they are excluded from the sets
/
AGR - A agricultural activity
NAGR - A non-agricultural activity
AGR - C agricultural commodity
NAGR - C non-agricultural commodity
LAB labour
CAP capital
U - HHD urban household
R - HHD rural household
GOV government
ROW rest of world
S - I savings-investment
YTAX income tax
STAX sales tax
TAR import tariff
TOTAL total account in SAM
/
-
Generating the specific sets and subsets’
ACNT(AC) all elements in AC except total
A(AC) activities / AGR-A, NAGR-A /
C(AC) commodities / AGR-C, NAGR-C /
CE(C) exported commodities /AGR-C/
CNE(C) non - exported commodities / NAGR-C /
CM (C) imported commodities / NAGR-C /
CNM (C) non - imported commodities /AGR-C/
F(AC) factors / LAB, CAP /
I(AC) institutions / U-HHD, R-HHD, GOV, ROW /
H(I) households / U-HHD, R-HHD /
;
-
To exclude TOTAL from ACNT:
ACNT(AC) = YES ;
ACNT(‘TOTAL’) = ‘NO’;
-
Aliassets to be used when we want to distinguish between two versions, e.g.
-
when summing y(F,F) over columns, we can writeSUM(F y(F,FAL))
;
’ Alias ’ ( AC , ACAL);
’ Alias ’ ( C , CAL) ;
’ Alias ’ (F , FAL) ;
’ Alias ’ (I , IAL) ;
’ Alias ’ (ACNT , ACNTAL ) ;
-
‘PARAMETER’ ======================================================
‘Parameter’
;
ad(A) shift in the production fnfor activity a
alpha(F,A) elasticity of factor f in the production fnfor activity a
aq(C) shiftparameter in CES aggregationfor commodity c
ax(C) shiftparameter in CES transformationfor commodity c
beta(C,H) share of households total spending on commodity c
CPI consumer price index
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.