Skip to content

timjchandler/tax-or-trade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tax or Trade

The java model may be run via the Python Notebook run.ipynb found in the analysis directory. For comparisons between tax and trade models, combine.ipynb may be run.

The javadoc for the model may be found here

Alternatively the model can be run directly from the command line.

run.ipynb

This notebook contains five runnable cells.

Cell 1

Here the relevant libraries are imported and the variables are set.
The variables may be set as follows:

Description Suggested value/range
runs The number of times to run the model [1, 1000]
runLength The number of ticks in each run [260, 1040]
seed The initial seed (each run increments by 1) Any integer
tax The goal tax rate in euros per tonne of CO2 [15, 200]
trade The yearly reduction in the carbon cap in percent [1, 5]
preset The initial distribution of power plants {fifty, seventy, ninety}

Where the preset values refer to the portion of power plants running on fossil fuels in the initial distribution.

Cell 2

The model is run through the command line. The first two rebuild the model from its source and may be commented out if no changes have been made.
Note: To build the model Maven is required, instructions on installing it may be found here

Cell 3

Here the data from the model is plotted as area plots for both tax and trade. For each, a plot of electricity production and CO2 emissions are generated.

Cell 4

Here a comparison is plotted between the overall electricity and CO2 production of each model.

Cell 5

The .csv files generated by the model are removed.

combine.ipynb

This notebook runs tax rates of 30, 60 and 120 euros per tonne and trade cap reductions of 1, 2.5 and 5% per year. Each is run 100 times for 780 ticks. The results are then plotted for comparison and pairwise t-tests are computed.

Cell 1

Here libraries are imported and the preset power plant distribution may be set.

Cell 2

The model my be rebuilt here, by default this is commented out.

Cell 3

The model is run.

Cell 4

Comparisons are plotted.

Cell 5-7

Pairwise t-tests are computed and their results shown.

Cell 8

The temporary files are removed.

Running from the command line

The model located in the analysis directory may be run with the following call:

java -jar model.jar A B C D E F

Where the letters A-F refer to the following arguments:

Description Suggested value/range
A The number of times to run the model [1, 1000]
B The number of ticks in each run [260, 1040]
C The initial seed (each run increments by 1) Any integer
D The goal tax rate in euros per tonne of CO2 [15, 200]
E The yearly reduction in the carbon cap in percent [1, 5] (float)
F The initial distribution of power plants {fifty, seventy, ninety}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published