17.10.2013 Views

gdxrrw: Exchanging Data Between GAMS and R

gdxrrw: Exchanging Data Between GAMS and R

gdxrrw: Exchanging Data Between GAMS and R

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Background: Why & What Basic Usage Example Applications Conclusion<br />

Usage detail<br />

Generating a GDX file<br />

Sets<br />

i ’ c a n n i n g p l a n t s ’ / s e a t t l e , san−d i e g o , monterey /<br />

j ’ markets ’ / new−y o r k , c h i c a g o , topeka , p h o e n i x /<br />

i i ( i ) ’ a c t i v e p l a n t s ’ / s e a t t l e , san−d i e g o /<br />

j j ( j ) ’ a c t i v e markets ’ / new−y o r k , c h i c a g o , topeka /<br />

i j ( i , j ) ’ open r o u t e s ’ ;<br />

i j ( i , j ) = y e s ;<br />

Parameters<br />

a ( i ) ’ c a p a c i t y o f p l a n t i i n c a s e s ’ /<br />

s e a t t l e 350<br />

san−d i e g o 600<br />

monterey 400<br />

/<br />

b ( j ) ’ dem<strong>and</strong> a t market j i n c a s e s ’ /<br />

new−y o r k 325<br />

c h i c a g o 300<br />

topeka 275<br />

p h o e n i x 375<br />

/ ;<br />

Table d ( i , j ) ’ d i s t a n c e i n 1K m i l e s ’<br />

new−y o r k c h i c a g o topeka p h o e n i x<br />

s e a t t l e 2 . 4 0 4 1 . 7 3 3 1 . 4 5 5 1 . 1 1 2<br />

san−d i e g o 2 . 4 2 9 1 . 7 2 9 1 . 2 7 4 0 . 2 9 8<br />

monterey 2 . 5 7 0 1 . 8 5 6 1 . 4 3 5 0 . 5 9 4 ;<br />

S c a l a r f ’ f r e i g h t : $/ c a s e /1K m i l e s ’ /90/ ;<br />

e x e c u t e u n l o a d ’ t r a n s ’ ;<br />

S. Dirkse et al. (<strong>GAMS</strong> Development) <strong>gdxrrw</strong> Phoenix, 15 Oct 2012 10 / 42

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!