API Reference

NLP_to_MPSGE_Example.ModelDataType
ModelData

Holds the initial data for the economic model.

Fields

  • initial_exports::Float64: Initial exports value.
  • initial_imports::Float64: Initial imports value.
  • initial_production::Float64: Initial production value.
  • initial_consumption::Float64: Initial consumption value.
  • domestic_demand::Float64: Domestic demand value.
  • domestic_supply::Float64: Domestic supply value.
  • initial_consumer_price_index::Float64: Initial consumer price index.
  • initial_world_import_price::Float64: Initial world import price.
  • initial_world_export_price::Float64: Initial world export price.
  • initial_domestic_price::Float64: Initial domestic price.

Default Values

  • initial_exports = 25.0
  • initial_imports = 25.0
  • initial_production = 100.0
  • initial_consumption = 100.0
  • domestic_demand = 75.0
  • domestic_supply = 75.0
  • initial_consumer_price_index = 1.0
  • initial_world_import_price = 1.0
  • initial_world_export_price = 1.0
  • initial_domestic_price = 1.0
source
NLP_to_MPSGE_Example.ModelParametersType
ModelParameters

Holds the parameters for the models.

Fields

  • elas_substitution::Float64: Elasticity of substitution.
  • elas_transformation::Float64: Elasticity of transformation.
  • balance_of_payments::Float64: Balance of payments.
  • price_world_export::Float64: World export price.
  • price_world_import::Float64: World import price.
  • tax_import::Float64: Import tax.
  • subsidy_export::Float64: Export subsidy.
  • tax_domestic::Float64: Domestic tax.

Default Values

  • elas_substitution = 0.2
  • elas_transformation = 0.2
  • balance_of_payments = 0.0
  • price_world_export = 1.0
  • price_world_import = 1.0
  • tax_import = 0.0
  • subsidy_export = 0.0
  • tax_domestic = 0.0
source
NLP_to_MPSGE_Example.MCP_modelMethod
MCP_model(data::ModelData; subexpressions = false)

Creates a Mixed Complementarity Problem (MCP) model based on the provided ModelData. If subexpressions is set to true, intermediate variables for revenues and costs are created for better clarity in the model formulation.

This model is included as an example of the explict MCP equation generated by MPSGE. It was initially created to test a bug. This model will solve for most parameter values if subexpressions=false, but may fail to solve for some parameter values if subexpressions=true.

The report will not work with this model.

source
NLP_to_MPSGE_Example.MPSGE_modelMethod
MPSGE_model(data::ModelData)

Creates an MPSGEModel based on the provided ModelData. The numeraire is PQ, the consumer price index, which is fixed to 1.

Parameters

  • sigma: Elasticity of substitution
  • omega: Elasticity of transformation
  • BBAR: Balance of payments
  • PWE: World export price
  • PWM: World import price
  • TM: Import tax rate
  • TE: Export subsidy rate
  • TD: Domestic tax rate

Sectors

  • X: Production sector
  • Q: Consumption sector

Commodities

  • PFX: Nominal exchange rate
  • PX: Producer price index
  • PQ: Consumer price index
  • PDD: Domestic price excluding taxes

Consumers

  • Y: Representative Agent
source
NLP_to_MPSGE_Example.NLP_modelMethod
NLP_model(data::ModelData)

Creates a JuMP model representing the NLP economic model based on the provided ModelData.

The numeraire is PQ, the consumer price index, which is fixed to 1.

Parameters

  • sigma: Elasticity of substitution
  • omega: Elasticity of transformation
  • BBAR: Balance of payments
  • PWE: World export price
  • PWM: World import price
  • TM: Import tax rate
  • TE: Export subsidy rate
  • TD: Domestic tax rate

Variables

  • DD: Domestic Demand
  • DS: Domestic Supply
  • M: Imports
  • E: Exports
  • X: Compound good (production)
  • Y: PNB
  • PX: Producer price index
  • PQ: Consumer price index
  • PED: Export price including subsidy
  • PMD: Import price including duties
  • PDT: Domestic Price including taxes
  • PDD: Domestic Price excluding taxes
  • PFX: Nominal exchange rate
  • Q: Consumption of the compound good
  • GR: Government Revenue
source
NLP_to_MPSGE_Example.reportMethod
report(M::JuMP.Model)
report(M::MPSGEModel)

Generates a report DataFrame summarizing key variables from the provided model M.

Columns

  • sigma: Elasticity of substitution
  • omega: Elasticity of transformation
  • BBAR: Balance of payments
  • PWM: World import price
  • PWE: World export price
  • TX: Export subsidy
  • TM: Import tax
  • TD: Domestic tax
  • PED: Export price including subsidy
  • PMD: Import price including duties
  • Q: Consumption of the compound good
  • PD: Domestic price excluding taxes
  • TCR: Real exchange rate
  • TCRE: Real exchange rate for exports
  • TCRM: Real exchange rate for imports
  • TCERQ: Real effective echange rate for consumption
  • TCERX: Real effective exchange rate for production
  • TCN: Nominal exchange rate
  • E: Exports
  • DD: Domestic demand
  • M: Imports
source