I am currently enjoying learning GAMS in preparation for a job interview. I am currently "playing" with a refinery model, called Marco, which I found here: https://www.gams.com/latest/gamslib_ml/ ... marco.html
What I want to do is to expand the model in order to allow for a new plant operation (a gasoil desulphurization unit). Basically starting from this table:
Code: Select all
Table a(cr,c,p) 'input output coefficients'
a-dist n-reform cc-dist cc-gas-oil hydro
mid-c.crude -1.0
mid-c.sr-gas .236
mid-c.sr-naphtha .223 -1.0
mid-c.sr-dist .087 -1.0
mid-c.sr-gas-oil .111 -1.0
mid-c.sr-res .315
mid-c.rf-gas .807
mid-c.fuel-gas .029 .129 .30 .31
mid-c.cc-gas .59 .59
mid-c.cc-gas-oil .21 .22
w-tex.crude -1.0
w-tex.sr-gas .180
w-tex.sr-naphtha .196 -1.0
w-tex.sr-dist .073 -1.0
w-tex.sr-gas-oil .091 -1.0
w-tex.sr-res .443 -1.0
w-tex.rf-gas .836
w-tex.fuel-gas .017 .099 .36 .38
w-tex.cc-gas .58 .60
w-tex.cc-gas-oil .15 .15
w-tex.hydro-res .97;
Code: Select all
bp(cf,ci) 'blending possibility '
/ (premium, regular).(butane, sr-gas, rf-gas, cc-gas, sr-naphtha)
distillate. (sr-dist, sr-naphtha, sr-gas-oil, cc-gas-oil)
fuel-oil. (sr-gas-oil, sr-res, cc-gas-oil, hydro-res )
fuel-gas. (fuel-gas )
hds-feed. (sr-gas-oil, sr-dist) /
Code: Select all
Table a(cr,c,p) 'input output coefficients'
a-dist n-reform cc-dist cc-gas-oil hydro go-hds
mid-c.crude -1.0
mid-c.sr-gas .236
mid-c.sr-naphtha .223 -1.0
mid-c.sr-dist .087 -1.0
mid-c.sr-gas-oil .111 -1.0
mid-c.sr-res .315
mid-c.hds-feed -1.0
mid-c.desulph-gasoil 1.0
mid-c.rf-gas .807
mid-c.fuel-gas .029 .129 .30 .31
mid-c.cc-gas .59 .59
mid-c.cc-gas-oil .21 .22
w-tex.crude -1.0
w-tex.sr-gas .180
w-tex.sr-naphtha .196 -1.0
w-tex.sr-dist .073 -1.0
w-tex.sr-gas-oil .091 -1.0
w-tex.sr-res .443 -1.0
w-tex.rf-gas .836
w-tex.fuel-gas .017 .099 .36 .38
w-tex.cc-gas .58 .60
w-tex.cc-gas-oil .15 .15
w-tex.hydro-res .97;