Solution Report

Similar documents
f(x) x S (optimal solution) f(x ) (optimal value) f(x) (1) 3 GLPK glpsol -m -d -m glpsol -h -m -d -o -y --simplex ( ) --interior --min --max --check -

鉄鋼協会プレゼン

: (EQS) /EQUATIONS V1 = 30*V F1 + E1; V2 = 25*V *F1 + E2; V3 = 16*V *F1 + E3; V4 = 10*V F2 + E4; V5 = 19*V99

CM1-GTX

28

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

( ) () () ( ) () () () ()

第13回:交差項を含む回帰・弾力性の推定

1

min. z = 602.5x x 2 + 2

80 X 1, X 2,, X n ( λ ) λ P(X = x) = f (x; λ) = λx e λ, x = 0, 1, 2, x! l(λ) = n f (x i ; λ) = i=1 i=1 n λ x i e λ i=1 x i! = λ n i=1 x i e nλ n i=1 x

Isogai, T., Building a dynamic correlation network for fat-tailed financial asset returns, Applied Network Science (7):-24, 206,

フリーセルプロの使い方

untitled

( ) ? () 1.1 ( 3 ) j x j 10 j 1 10 j = 1,..., 10 x 1 + x x 10 =

L A TEX ver L A TEX LATEX 1.1 L A TEX L A TEX tex 1.1 1) latex mkdir latex 2) latex sample1 sample2 mkdir latex/sample1 mkdir latex/sampl

ˆ CGE ž ž ˆ 2 CGE 2 1 ˆ n = 1,, n n ˆ k f = 1,, k ˆ ˆ ˆ 3

X Window System X X &

ProVisionaire Control V3.0セットアップガイド

tutorial_lc.dvi


s t 1, 2,..., 10 s t a, b,..., k t s 1, 2,..., 10 1 a, b,..., k 1 s t ts 1 0 ( 2.25) ½ ¾ ½¼ x 1j = 1 x 2c = 1 x 3e = 1

日本内科学会雑誌第101巻第12号

ProVAL Recent Projects, ProVAL Online 3 Recent Projects ProVAL Online Show Online Content on the Start Page Page 13

1 Stata SEM LightStone 4 SEM 4.. Alan C. Acock, Discovering Structural Equation Modeling Using Stata, Revised Edition, Stata Press 3.

ZEMAX Nagata DLL Volume-CAD c Copyright by RIKEN All Rights Reserved : : ( )

¥¤¥ó¥¿¡¼¥Í¥Ã¥È·×¬¤È¥Ç¡¼¥¿²òÀÏ Âè2²ó

p *2 DSGEDynamic Stochastic General Equilibrium New Keynesian *2 2

2.2 Sage I 11 factor Sage Sage exit quit 1 sage : exit 2 Exiting Sage ( CPU time 0m0.06s, Wall time 2m8.71 s). 2.2 Sage Python Sage 1. Sage.sage 2. sa

= /

1

(B2) 序章 FICO Xpressの基礎

A Feasibility Study of Direct-Mapping-Type Parallel Processing Method to Solve Linear Equations in Load Flow Calculations Hiroaki Inayoshi, Non-member

AR(1) y t = φy t 1 + ɛ t, ɛ t N(0, σ 2 ) 1. Mean of y t given y t 1, y t 2, E(y t y t 1, y t 2, ) = φy t 1 2. Variance of y t given y t 1, y t

Int Int 29 print Int fmt tostring 2 2 [19] ML ML [19] ML Emacs Standard ML M M ::= x c λx.m M M let x = M in M end (M) x c λx.

23_33.indd


ECCS. ECCS,. ( 2. Mac Do-file Editor. Mac Do-file Editor Windows Do-file Editor Top Do-file e

Compatibility list: vTESTstudio/CANoe

磁性物理学 - 遷移金属化合物磁性のスピンゆらぎ理論


DocuWide 2051/2051MF 補足説明書

²¾ÁÛ¾õ¶·É¾²ÁË¡¤Î¤¿¤á¤Î¥Ñ¥Ã¥±¡¼¥¸DCchoice ¡Ê»ÃÄêÈÇ¡Ë

Stata 11 Stata ts (ARMA) ARCH/GARCH whitepaper mwp 3 mwp-083 arch ARCH 11 mwp-051 arch postestimation 27 mwp-056 arima ARMA 35 mwp-003 arima postestim

講義のーと : データ解析のための統計モデリング. 第2回

206“ƒŁ\”ƒ-fl_“H„¤‰ZŁñ

2004 Copyright by Tatsuo Minohara Programming with Mac OS X in Lambda 21 - page 2

MacOSXLambdaJava.aw

k2 ( :35 ) ( k2) (GLM) web web 1 :

Copyrght 7 Mzuho-DL Fnancal Technology Co., Ltd. All rghts reserved.

GNU Emacs GNU Emacs

untitled

+小澤悦夫.indd

B1 Ver ( ), SPICE.,,,,. * : student : jikken. [ ] ( TarouOsaka). (, ) 1 SPICE ( SPICE. *1 OrCAD

30

211 ‚æ2fiúŒÚ

Exercise in Mathematics IIB IIB (Seiji HIRABA) 0.1, =,,,. n R n, B(a; δ) = B δ (a) or U δ (a) = U(a;, δ) δ-. R n,,,, ;,,, ;,,. (S, O),,,,,,,, 1 C I 2

PDW-75MD

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

.. est table TwoSLS1 TwoSLS2 GMM het,b(%9.5f) se Variable TwoSLS1 TwoSLS2 GMM_het hi_empunion totchr

日本内科学会雑誌第98巻第3号

help gem gem gem my help


SR-X526R1 サーバ収容スイッチ ご利用にあたって

4.9 Hausman Test Time Fixed Effects Model vs Time Random Effects Model Two-way Fixed Effects Model

経済原論

講義のーと : データ解析のための統計モデリング. 第3回

kubostat2018d p.2 :? bod size x and fertilization f change seed number? : a statistical model for this example? i response variable seed number : { i

Emacs ML let start ::= exp (1) exp ::= (2) fn id exp (3) ::= (4) (5) ::= id (6) const (7) (exp) (8) let val id = exp in

untitled

aisatu.pdf

Sigma

Sigma

Q&A目次.PDF

2


A Higher Weissenberg Number Analysis of Die-swell Flow of Viscoelastic Fluids Using a Decoupled Finite Element Method Iwata, Shuichi * 1/Aragaki, Tsut


DL1620/DL1640/DL1640L ディジタルオシロスコープ ユーザーズマニュアル

101NEO資料

program.dvi

R による統計解析入門

チュートリアル:ノンパラメトリックベイズ

Jorgenson F, L : L: Inada lim F =, lim F L = k L lim F =, lim F L = 2 L F >, F L > 3 F <, F LL < 4 λ >, λf, L = F λ, λl 5 Y = Const a L a < α < CES? C

CDMA ALOHA方式における最適アクセス制御方式の研究

2 1/2 1/4 x 1 x 2 x 1, x 2 9 3x 1 + 2x 2 9 (1.1) 1/3 RDA 1 15 x /4 RDA 1 6 x /6 1 x 1 3 x 2 15 x (1.2) (1.3) (1.4) 1 2 (1.5) x 1

Trapezoidal Rule θ = 1/ x n x n 1 t = 1 [f(t n 1, x n 1 ) + f(t n, x n )] (6) 1. dx dt = f(t, x), x(t 0) = x 0 (7) t [t 0, t 1 ] f t [t 0, t 1 ], x x

untitled

( ) P, P P, P (negation, NOT) P ( ) P, Q, P Q, P Q 3, P Q (logical product, AND) P Q ( ) P, Q, P Q, P Q, P Q (logical sum, OR) P Q ( ) P, Q, P Q, ( P

π, R { 2, 0, 3} , ( R),. R, [ 1, 1] = {x R 1 x 1} 1 0 1, [ 1, 1],, 1 0 1,, ( 1, 1) = {x R 1 < x < 1} [ 1, 1] 1 1, ( 1, 1), 1, 1, R A 1

.I.v e pmd

JFE.dvi

講義のーと : データ解析のための統計モデリング. 第5回

Rによる計量分析:データ解析と可視化 - 第3回 Rの基礎とデータ操作・管理

1 I EViews View Proc Freeze

数学論文の書き方 - 第1回:入門編

SR-X324T1/316T1 サーバ収容スイッチ ご利用にあたって

VM-53PA1取扱説明書

1-20*****B

表1-4.ai

Transcription:

CGE 3 GAMS * Date: 2018/07/24, Version 1.1 1 2 2 GAMSIDE 3 2.1 GAMS................................. 3 2.2 GAMSIDE................................ 3 2.3 GAMSIDE............................. 7 3 GAMS 11 3.1 GAMS...................................... 11 3.1.1................... 11 3.1.2 GAMS........................ 12 3.1.3 GAMS.......................... 12 3.1.4..................................... 13 3.1.5 GAMS........................ 14 3.2................................ 14 3.3 GAMS.................................... 15 3.4.................................... 15 3.4.1................................ 15 3.4.2 display................................... 16 3.4.3 $........................ 17 3.4.4 alias.......................... 17 3.4.5............................ 17 3.4.6................................... 19 3.4.7..................................... 20 3.4.8..................................... 20 3.4.9.............................. 21 3.4.10........................ 22 3.4.11 solve.................................... 22 * : http://shirotakeda.org/ja/research-ja/cge-howto.html Website: http://shirotakeda.org/ja/ 1

1. 3.4.12................................... 23 3.5..................................... 23 3.5.1 Solution Report................................. 24 3.5.2.............................. 25 3.5.3 MCP Marginal................... 25 4 GAMS 26 5 26 6 26 1 ˆ 3 CGE GAMS (General Algebraic Modelling System) GAMS CGE GAMS ˆ GAMS ˆ GAMS User's Guide ž GAMS GAMS corporation ž HTML : https://www.gams.com/latest/docs/ug_main.html ˆ Bruce McCarl ž GAMS ž McCarl ž gdxxrw.exe ž PDF : https://www.gams.com/fileadmin/community/contrib/doc/mccarlgamsuserguide. pdf ž HTML : https://www.gams.com/mccarlguide/gams_user_guide_2005.htm 2

2. GAMSIDE 2 GAMSIDE GAMS Windows GAMS GAMS GAMSIDE 1 GAMSIDE GAMS Windows GAMS 2.1 GAMS GAMS https://www.gams.com/download/ Windows 32bit 64bit 64bit Windows 64bit 2.2 GAMSIDE GAMSIDE GAMSIDE GAMSIDE GAMSIDE 1 GAMSIDE UNIX Mac GAMS Windows GAMS GAMSIDE Emacs Emacs GAMS mode for Emacs GAMSIDE 3

2. GAMSIDE C:YUserYstYDocumentsYgamsdirYprojdirYgamsproj.gpr GAMS C:YUserYstYDocumentsYgamsdirYprojdir GAMSIDE GAMS Project New Project g:ydropboxygams_practice practice New Project g:ydropboxygams_practice practice 4

2. GAMSIDE.gpr GAMSIDE GAMSIDE ide_howto.gms GAMSIDE File Open File Options MS 11pt MS 5

2. GAMSIDE File Options Colors Comment Italic Set associated text Bold 6

2. GAMSIDE 2.3 GAMSIDE GAMSIDE 1) GAMS 2) GAMSIDE GAMSIDE Bruce McCarl ˆ https://www.gams.com/fileadmin/community/contrib/doc/mccarlgamsuserguide.pdf ˆ https://www.gams.com/mccarlguide/gams_user_guide_2005.htm ide_howto.gms GAMS F9 Process Window GAMS 7

2. GAMSIDE *** Error 140 in G:DropboxYGAMS_practiceYide_howto.gms Unkown symbol Error 140 140 Unknown symbol GAMS diplay i, j; j j unknown symbol j diplay i, j alias j F9 unknown symbol GAMS paramter paramter unknown symbol parameter paramter paramter 8

2. GAMSIDE GAMSIDE GAMS unrecognizable item ; gms gms gamma gamma(i) = 1 ; GAMS ; ; ; 1 Error at line 24 Compilation error Execution error division by zero 24 0 gms gms 24 GAMSIDE 18:14 18 14 24 9

2. GAMSIDE 24 gamma(i) = gamma(i) / sigma; sigma sigma 0 division by zero sigma 0 10 Status: Normal completion GAMS ide_howto.gms ide_howto.lst LST 10

Display sigma LST sigma LST GAMSIDE GAMS ˆ ˆ GMS ˆ 3 GAMS 3.1 GAMS GAMS 3.1.1 ˆ GAMS gms ž ˆ 11

ž GAMS ž sample.gms sample.lst lst LST 3.1.2 GAMS ˆ declaration ˆ ž price Price PRICE GAMS ž GAMS ˆ ; ž GAMS ž ˆ ž * * ž $ontext $offtext 3.1.3 GAMS ˆ ž j = {1,, n} f = {labor, capital, land} j f GAMS set ˆ ž GAMS parameter ž 2 CES ž ˆ 2 12

ž GAMS variable ž ˆ ž GAMS equation ˆ ž ž 3.1.4 GAMS variable 4 x ˆ level value ž x x ž x.l x display x.l; x 10 x.l = 10; ˆ lower value upper value ž lower bound upper bound ž x.lo x.up x 0 x.lo = 0 ž GAM -inf GAMS +inf ˆ Marginal marginal value ž marginal ž 13

GAMS LP NLP MCP MIP 1: GAMS linear programming non-linear programming Mixed complementarity problem 3.1.5 GAMS GAMS solver Solver GAMS 15 1 GAMS MCP MCP mixed complementarity problem MCP MCP MCP 4 3.2 non-linear programming [ ] σ σ 1 max u = γ i (d i ) σ 1 σ {d 1,,d n} s.t. i i p i d i = m u d i i p i i m γ i σ 1 CGE GAMS CGE 3 L = [ i γ i (d i ) σ 1 σ ] σ [ σ 1 λ i p i d i m 3 CGE CGE ] 14

1 L = σ 1 γ j (d j ) σ 1 σ γ i (d i ) 1 σ λpi = 0 {d i } i=1,,n (1) d i j [ ] L λ = p i d i m = 0 {λ} (2) i {d i } n (1) 1 (2) n + 1 GAMS 3.3 GAMS utility_max.gms GAMS GAM- SIDE GAMS 3.4 $title $ontext Time-stamp: <2013-10-14 17:48:30 st> First-written: <2013/10/11> $offtext $title LST $ontext $offtext 3.4.1 * * set i Index of goods / agr Agricultural goods man Manufacturing goods ser Services /; 15

set i set set set i Index of goods / agr Agricultural goods man Manufacturing goods ser Services /; / i agr man ser Index of goods i Agricultural goods set i / agr, man, ser /; set GAMS User Manual 3.4.2 display display i; i display display GAMSIDE i agr man ser 16

3.4.3 $ $title $ set Dollar Control Option $ dollar control option GAMS compilation time execution time GAMS $ 3.4.4 alias * i j alias(i,j); display j; alias i j alias static set static set dynamic set 3.4.5 $ontext 17

$offtext parameter p(i) m ; Goods price Income p(i) m 2 parameter parameter parameter p(i) m Goods price Income ; p(i) m Goods price Income p(i) m p i i agr man ser p("agr") p("man") p("ser") 3 p p("agr")=1 p(i) parameter p(i), m; p("agr") = 1; p("man") = 2; p("ser") = 3; m = 100; display p, m; p m display p i i p Parameter p(i) Goods price / agr 1 man 2 ser 3 / m Income / 100 / 18

; / $ontext $offtext parameter gamma(i) Weight parameter sigma Elasticity of substitution ; * gamma gamma(i) = 1; gamma(i) = gamma(i)/sum(j, gamma(j)); display gamma; sigma = 0.5; display sigma; gamma sigma gamma(i) = 1; gamma(i) = gamma(i)/sum(j, gamma(j)); gamma(i) 1/3 2 GAMS = 3.4.6 $ontext variables $offtext variables d(i) Demand lambda Lagrange multiplier ; variables variable ˆ variables parameter ˆ variables d(i) lambda 19

3.4.7 * * $ontext equations e_ + $offtext equations e_d(i) 1st order condition for d(i) e_lambda 1st order condition for lambda ; equation equations equations variables ˆ (1) e_d(i) ˆ lambda (2) e_lambda 3.4.8 * * e_d(i).. (sum(j, gamma(j)*(d(j))**((sigma-1)/sigma)))**(1/(sigma-1)) * gamma(i) * (d(i))**(-1/sigma) - lambda * p(i) =e= 0; e_lambda.. - (sum(i, p(i)*d(i)) - m) =e= 0;.. ; 2 ; = =e= =g= =l= 4 (1) (2) 4 3.4.5 GAMS = 20

3.4.9 * * $ontext. e_d.d e_d d $offtext model utility_max Utility maximization / e_d.d, e_lambda.lambda /; model model / /; MCP. / e_d.d, e_lambda.lambda / e_d e_lambda 2 2 e_d d e_lambda lambda 4 1) 2) MCP NLP MCP 4 21

3.4.10 * * d.lo(i) = 0; lambda.lo = 0; * * d.l(i) = 10; lambda.l = 10; 3.1.4.lo d lambda 0 2 3.1 d lambda 10 10 3.4.11 solve * * option mcp = path; solve utility_max using mcp; solve MCP NLP LP solve MCP solve utility_max using mcp; solve using mcp; option mcp = path; Solver MCP PATH 22

Solver Solver Solver 3.4.12 5 Parameter results ; results(i,"price") = p(i); results("/","income") = m; results(i,"demand") = d.l(i); results("/","lambda") = lambda.l; results(i,"exp") = p(i)*d.l(i); results("sum","exp") = sum(i, results(i,"exp")); results("/","utility") = (sum(i, gamma(i)*(d.l(i))**((sigma-1)/sigma)))**(sigma/(sigma-1)); display results; results d(i) lambda results.l d.l(i) lambda.l 3.5 3.3 MCP Solution Report REPORT SUMMARY 5 CGE 23

3.5.1 Solution Report Solution Report SOLVE SUMMARY ˆ MODEL ˆ TYPE MCP ˆ SOLVER solver MCP solver PATH SOVER STATUS MODEL STATUS STATUS 1 S O L V E S U M M A R Y MODEL utility_max TYPE MCP SOLVER PATH FROM LINE 115 **** SOLVER STATUS 1 Normal Completion **** MODEL STATUS 1 Optimal SOVER STATUS MODEL STATUS 1 S O L V E S U M M A R Y 24

MODEL utility_max TYPE MCP SOLVER PATH FROM LINE 115 **** SOLVER STATUS 2 Iteration Interrupt **** MODEL STATUS 6 Intermediate Infeasible utility_max.gms 3.5.2 SolVAR VAR d Demand LOWER LEVEL UPPER MARGINAL agr. 24.118 +INF 2.4569E-7 man. 17.054 +INF -1.246E-7 ser. 13.925 +INF -2.042E-8 LOWER LEVEL UPPER MARGINAL VAR lambda. 0.175 +INF. lambda Lagrange multiplier 3.1 GAMS lower value upper value level value marginal marginal value 4 LST LOWER LEVEL UPPER MARGINAL d("agr") 0 0 +INF 24.118 marginal 2.4569E-7=2.4569/10 7 3.5.3 MCP Marginal Marginal MCP marginal d(i) 3.4.9 e_d(i) e_d(i) e_d(i).. (sum(j, gamma(j)*(d(j))**((sigma-1)/sigma)))**(1/(sigma-1)) 25

4. GAMS * gamma(i) * (d(i))**(-1/sigma) - lambda * p(i) =e= 0; d(i) marginal 10 (sum(j, gamma(j)*(d(j))**((sigma-1)/sigma)))**(1/(sigma-1)) * gamma(i) * (d(i))**(-1/sigma) - lambda * p(i) = 10 d("agr") marginal e_d("agr") e_d("agr") e_d("agr") d("agr") marginal marginal 4 GAMS 5 1 min {h 1,,h n} e = i p i h i s.t. [ i γ i (h i ) σ 1 σ ] σ σ 1 = u GAMS γ i σ 3.3 u 3.3 6 ˆ 2018-07-20: ˆ 2017-03-15: 26