comment: This is an IPAT-S script. IPAT-S is an open-source scripting language for developing sustainability scenarios. It can be run using the free IPAT-S software, available from: http://ipat-s.kb-creative.net/ For more information, please contact the author of IPAT-S, Eric Kemp-Benedict (eric@kb-creative.net) :comment comment: This IPAT-S script demonstrates the implementation of an I-O problem using an IPAT-S LP block. Two scenarios are presented, "Business-as-Usual" (BaU) and "Greening Industry." The only difference between them is that under "Greening Industry" there is more demand per dollar for agricultural goods from industry than in BaU. For example, more industrial feedstocks might be provided from agriculture than from mining & manufacturing. :comment baseyear 2000 scenario years 2010 2020 dimension scenario 'BaU', 'Greening Industry' # In IPAT-S, there is no notion of an "order" to array indices. So when # there is an array like the I-O "A" array, it is necessary to define # two copies of the indices. Later in the script these are identified # using the "ident" variable. ditto 'Agriculture', 'Industry', 'Services', 'Labor': dimension supplySector '' dimension demandSector '' # Exogenous variables var a{supplySector, demandSector, scenario} ratio laborProductivity{demandSector, scenario} ratio DemandGrowth{supplySector, scenario} # Endogenous variables summvar TFD{supplySector, scenario} summvar Employment{demandSector, scenario} summvar IntermedOutput{demandSector, scenario}, \ IntermedDemand{supplySector, scenario}, \ Output{supplySector, scenario} ## ## Technical coefficients ## # Agriculture ditto demandSector = 'Agriculture', scenario = 'BaU': a{'', supplySector = 'Agriculture'} = <0.05> a{'', supplySector = 'Industry'} = <0.15> a{'', supplySector = 'Services'} = <0.30> a{'', supplySector = 'Labor'} = <0.35> ditto demandSector = 'Agriculture', scenario = 'Greening Industry': a{'', supplySector = 'Agriculture'} = <0.05> a{'', supplySector = 'Industry'} = <0.15> a{'', supplySector = 'Services'} = <0.30> a{'', supplySector = 'Labor'} = <0.35> # Industry ditto demandSector = 'Industry', scenario = 'BaU': a{'', supplySector = 'Agriculture'} = <0.02> a{'', supplySector = 'Industry'} = <0.60> a{'', supplySector = 'Services'} = <0.15> a{'', supplySector = 'Labor'} = <0.07> ditto demandSector = 'Industry', scenario = 'Greening Industry': a{'', supplySector = 'Agriculture'} = <0.02, 0.05, 0.10> a{'', supplySector = 'Industry'} = <0.60, 0.57, 0.52> a{'', supplySector = 'Services'} = <0.15> a{'', supplySector = 'Labor'} = <0.07> # Services ditto demandSector = 'Services', scenario = 'BaU': a{'', supplySector = 'Agriculture'} = <0.05> a{'', supplySector = 'Industry'} = <0.10> a{'', supplySector = 'Services'} = <0.15> a{'', supplySector = 'Labor'} = <0.50> ditto demandSector = 'Services', scenario = 'Greening Industry': a{'', supplySector = 'Agriculture'} = <0.05> a{'', supplySector = 'Industry'} = <0.10> a{'', supplySector = 'Services'} = <0.15> a{'', supplySector = 'Labor'} = <0.50> ## ## Demand vector ## ditto supplySector = 'Agriculture': TFD.0{''} = 150 DemandGrowth{'', scenario = 'BaU'} = growth(<1.0%>) DemandGrowth{'', scenario = 'Greening Industry'} = growth(<1.0%>) ditto supplySector = 'Industry': TFD.0{''} = 2045 DemandGrowth{'', scenario = 'BaU'} = growth(<1.5%>) DemandGrowth{'', scenario = 'Greening Industry'} = growth(<1.5%>) ditto supplySector = 'Services': TFD.0{''} = 2100 DemandGrowth{'', scenario = 'BaU'} = growth(<2.0%>) DemandGrowth{'', scenario = 'Greening Industry'} = growth(<2.0%>) # There is no final demand for 'Labor' :: >> DemandGrowth -> TFD ## ## Identify supply & demand sectors ## var ident{supplySector, demandSector} ditto 'Agriculture': ident{demandSector = '', supplySector = ''} = 1 ditto 'Industry': ident{demandSector = '', supplySector = ''} = 1 ditto 'Services': ident{demandSector = '', supplySector = ''} = 1 ditto 'Labor': ident{demandSector = '', supplySector = ''} = 1 ## ## Implement IO as an LP ## var dummy LP: solve for Output, IntermedOutput, IntermedDemand, dummy min dummy # Not really needed Output - IntermedDemand = TFD Output - ident * IntermedOutput = 0{supplySector, scenario} IntermedDemand - a * IntermedOutput = 0{supplySector, scenario} :LP ## ## Employment ## ditto demandSector = 'Agriculture': Employment.0{''} = 500 laborProductivity{'', scenario = 'BaU'} = growth(<0.5%>) laborProductivity{'', scenario = 'Greening Industry'} = growth(<0.5%>) ditto demandSector = 'Industry': Employment.0{''} = 3000 laborProductivity{'', scenario = 'BaU'} = growth(<1.5%>) laborProductivity{'', scenario = 'Greening Industry'} = growth(<1.5%>) ditto demandSector = 'Services': Employment.0{''} = 5000 laborProductivity{'', scenario = 'BaU'} = growth(<0.75%>) laborProductivity{'', scenario = 'Greening Industry'} = growth(<0.75%>) :: a{supplySector = 'Labor'} * IntermedOutput >> \ 1/laborProductivity -> Employment ## ## Report results ## summvar totEmpl{scenario} summarize Employment as totEmpl report TFD as "Total Final Demand" report Employment as "Employment" report 100 * (totEmpl{scenario='Greening Industry'}/totEmpl{scenario='BaU'} - 1) \ as "Relative Employment Gain/Loss(%)" report 100 * Output/Output.0 as "Output Index"