Skip to content

Commit

Permalink
long names in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
laatabix committed Jun 3, 2020
1 parent 17dae83 commit 545d3ae
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 73 deletions.
2 changes: 2 additions & 0 deletions Rscripts/post_processing/leader_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ library(reshape2)
# la liste des noms et des codes INSEE des communes dans le même ordre
coms <- c('rochefort','stlaurent','stnazaire','porbarq')
insees <- c('17299','17353','17375','17484')
# noms des communes à afficher sur les graphes
noms_communes <- c("Nicolas","Amélie","Cécilia","Benoit")

# les répertoires des fichiers à utiliser
# le répertoire leader_data-X.xxxxxx, à récupérer de workspace/LittoSIM-GEN/includes/XXXXXX/, côté agence du risque
Expand Down
4 changes: 2 additions & 2 deletions includes/config/littosim.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# - estuary_coast
# - cliff_coast
# Only one line should be activated. Comment (by #) the other lines
#STUDY_AREA_FILE;../includes/overflow_coast_v/study_area.conf
STUDY_AREA_FILE;../includes/overflow_coast_v/study_area.conf
#STUDY_AREA_FILE;../includes/overflow_coast_h/study_area.conf
STUDY_AREA_FILE;../includes/estuary_coast/study_area.conf
#STUDY_AREA_FILE;../includes/estuary_coast/study_area.conf
#STUDY_AREA_FILE;../includes/cliff_coast/study_area.conf

##########################################################################################
Expand Down
14 changes: 7 additions & 7 deletions models/LittoSIM-GEN_Leader.gaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ global{
}
ask districts {
create District_Name2 {
display_name <- myself.district_name;
display_name <- myself.district_long_name;
location <- (Grille2[myself.dist_id, 0]).location - {0,1.5};
}
if (string(data_action at act at 'active') at (dist_id-1)) = '1'{
Expand Down Expand Up @@ -447,7 +447,7 @@ global{
action create_financial_plan {
loop i from: 0 to: number_of_districts - 1 {
F_Plan_Grid[i+1,0].col <- #deepskyblue;
F_Plan_Grid[i+1,0].text <- districts[i].district_name + " :";
F_Plan_Grid[i+1,0].text <- districts[i].district_long_name;
}
F_Plan_Grid[0,1].text <- world.get_message("MSG_POPULATION") + " :";
F_Plan_Grid[0,2].text <- world.get_message("MSG_BUDGETS") + " :";
Expand Down Expand Up @@ -2394,19 +2394,19 @@ experiment LittoSIM_GEN_Leader {
chart world.get_message('MSG_POPULATION') type: series size: {0.33,0.48} position: {0.0,0.01} x_range:[0,16]
x_label: MSG_ROUND x_tick_line_visible: false{
loop i from: 0 to: number_of_districts - 1 {
data districts[i].district_name value: districts_populations[i] color: dist_colors[i] marker_shape: marker_circle;
data districts[i].district_long_name value: districts_populations[i] color: dist_colors[i] marker_shape: marker_circle;
}
}

chart world.get_message('MSG_BUDGETS') type: series size: {0.33,0.48} position: {0.34,0.01} x_range:[0,16]
x_label: MSG_ROUND x_tick_line_visible: false{
loop i from: 0 to: number_of_districts - 1 {
data districts[i].district_name value: districts_budgets[i] color: dist_colors[i] marker_shape: marker_circle;
data districts[i].district_long_name value: districts_budgets[i] color: dist_colors[i] marker_shape: marker_circle;
}
}

chart LDR_TOTAL type: histogram size: {0.33,0.48} position: {0.67,0.01} style:stack
x_serie_labels: districts collect each.district_name series_label_position: xaxis x_tick_line_visible: false {
x_serie_labels: districts collect each.district_long_name series_label_position: xaxis x_tick_line_visible: false {
data MSG_TAXES value: districts collect each.received_tax collect sum(each) color: color_lbls[0];
data LDR_GIVEN value: districts collect each.given_money collect sum(each) color: color_lbls[1];
data LDR_TAKEN value: districts collect each.taken_money collect sum(each) color: color_lbls[2];
Expand All @@ -2416,14 +2416,14 @@ experiment LittoSIM_GEN_Leader {
}

chart world.get_message('MSG_COST_ACTIONS') + " ("+ LDR_TOTAL +")" type: histogram size: {0.48,0.48} position: {0.01,0.51}
x_serie_labels: districts collect (each.district_name) style:stack {
x_serie_labels: districts collect (each.district_long_name) style:stack {
data MSG_BUILDER value: districts collect (each.build_cost) color: color_lbls[2];
data MSG_SOFT_DEF value: districts collect (each.soft_cost) color: color_lbls[1];
data MSG_WITHDRAWAL value: districts collect (each.withdraw_cost) color: color_lbls[0];
data MSG_OTHER value: districts collect (each.other_cost) color: color_lbls[3];
}
chart "% " + world.get_message('MSG_COST_ACTIONS') + " (2 " + LDR_LAST + " " + LDR_MSG_ROUNDS + ")" type: histogram size: {0.48,0.48} position: {0.51,0.51}
x_serie_labels: districts collect (each.district_name) style:stack {
x_serie_labels: districts collect (each.district_long_name) style:stack {
data MSG_BUILDER value: districts collect (each.builder_score * 100) color: color_lbls[2];
data MSG_SOFT_DEF value: districts collect (each.soft_def_score * 100) color: color_lbls[1];
data MSG_WITHDRAWAL value: districts collect (each.withdrawal_score * 100) color: color_lbls[0];
Expand Down
Loading

0 comments on commit 545d3ae

Please sign in to comment.