Commit 30c29bb434499d3e2964fb03acb4d78a86adbf22
1 parent
1dd7a8b3
Exists in
Standardized
more readme
Showing
4 changed files
with
18 additions
and
4 deletions
Show diff stats
MODFIRE-Prototype/README.md
| @@ -267,3 +267,17 @@ In Single Criteria optimization the following file is written to the Results fol | @@ -267,3 +267,17 @@ In Single Criteria optimization the following file is written to the Results fol | ||
| 267 | 267 | ||
| 268 | outputPairsSingle.csv:- MU/Presc pairs for the solution found | 268 | outputPairsSingle.csv:- MU/Presc pairs for the solution found |
| 269 | 269 | ||
| 270 | +# Step 5: Visualizing the example. | ||
| 271 | + | ||
| 272 | + | ||
| 273 | +Run seeMap.py to see the Vale de Sousa Forest and it's sub-divisions | ||
| 274 | + | ||
| 275 | +Run plotPareto.py to plot a 2d Pareto frontier using the Results/parento.csv file (Only works if there are only 2 criteria in the pareto.csv file) | ||
| 276 | + | ||
| 277 | +Run seeResults.py to observe the contents of the solutions in the outputPairsMulti.csv file | ||
| 278 | + | ||
| 279 | +Run the makeSolFile.py and then the Maps/maps.py file to paint the solution in the outputPairsSingle.csv onto files in the Maps/MapOutput folder | ||
| 280 | + | ||
| 281 | +Run the makeSolFileMulti.py and then the Maps/maps.py file to pick a solution from the outputPairsSingleMult.csv file and paint the solution onto files in the Maps/MapOutput folder | ||
| 282 | + | ||
| 283 | + |
MODFIRE-Prototype/makeSolFile.py
| @@ -2,9 +2,9 @@ import csv, re, sqlite3 | @@ -2,9 +2,9 @@ import csv, re, sqlite3 | ||
| 2 | 2 | ||
| 3 | fy= open("Maps/MapInputFile.txt", "w+") | 3 | fy= open("Maps/MapInputFile.txt", "w+") |
| 4 | 4 | ||
| 5 | -con = sqlite3.connect("res/database_modfire.db") | 5 | +con = sqlite3.connect("database_modfire.db") |
| 6 | cur = con.cursor() | 6 | cur = con.cursor() |
| 7 | -Filemame = "Results/outputPairs.csv" | 7 | +Filemame = "Results/outputPairsSingle.csv" |
| 8 | f=open(Filemame,"r") | 8 | f=open(Filemame,"r") |
| 9 | lines=f.readlines() | 9 | lines=f.readlines() |
| 10 | result=[] | 10 | result=[] |
MODFIRE-Prototype/makeSolFileMult.py
| @@ -2,7 +2,7 @@ import csv, re, sqlite3 | @@ -2,7 +2,7 @@ import csv, re, sqlite3 | ||
| 2 | 2 | ||
| 3 | fy= open("Maps/MapInputFile.txt", "w+") | 3 | fy= open("Maps/MapInputFile.txt", "w+") |
| 4 | 4 | ||
| 5 | -con = sqlite3.connect("res/database_modfire.db") | 5 | +con = sqlite3.connect("database_modfire.db") |
| 6 | cur = con.cursor() | 6 | cur = con.cursor() |
| 7 | 7 | ||
| 8 | Filemame = "Results/outputPairsMulti.csv" | 8 | Filemame = "Results/outputPairsMulti.csv" |
MODFIRE-Prototype/seeResult.py
| 1 | import csv, re, sqlite3 | 1 | import csv, re, sqlite3 |
| 2 | 2 | ||
| 3 | -con = sqlite3.connect("res/database_modfire.db") | 3 | +con = sqlite3.connect("database_modfire.db") |
| 4 | cur = con.cursor() | 4 | cur = con.cursor() |
| 5 | Filemame = "Results/outputPairsMulti.csv" | 5 | Filemame = "Results/outputPairsMulti.csv" |
| 6 | f=open(Filemame,"r") | 6 | f=open(Filemame,"r") |