# ALADYM  Age length based dynamic model - version 12.3
# Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018
# COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy 
# In case of use of the model, the Authors should be cited.
# If you have any comments or suggestions please contact the following e-mail address: facchini@coispa.it
# ALADYM is believed to be reliable. However, we disclaim any implied warranty or representation about its accuracy, 
# completeness or appropriateness for any particular purpose.






#selectivity_params <<- ""

#naturalmortalityM_file <<- "" 
#naturalmortalityF_file <<- ""

#associated_fleetsegment <- as.vector(cfg[rownames(cfg)==paste("casestudy.S", ALADYM_spe, ".associatedFleetsegment", sep=""), ])   
#associated_fleetsegment <- associated_fleetsegment[!is.na(associated_fleetsegment) & associated_fleetsegment!=""]
#associated_fleetsegment_indices <- which(associated_fleetsegment %in% BMT_FLEETSEGMENTS)
#
#FLEETSEGMENTS_names <- BMT_FLEETSEGMENTS[associated_fleetsegment_indices]  

if (!IN_BEMTOOL) {
source(paste(ALADYM_home, "/gui/menubarFun.run_simulation.r", sep="") )
source(paste(ALADYM_home, "/gui/menubarFun.run_forecast.r", sep="") )
}  else {
source(paste(ALADYM_home, "/gui/menubarFun.run_simulation_bmt.r", sep="") )
source(paste(ALADYM_home, "/gui/menubarFun.run_forecast_bmt.r", sep="") )
}
source(paste(ALADYM_home, "/gui/menubarFun.skip_simulation.r", sep="") )
source(paste(ALADYM_home, "/gui/menubarFun.load_simulation.r", sep="") )


source(paste(ALADYM_home,"/gui/biological/biologicalFun/select_file_BIO.r", sep="")) 
#if (!IN_BEMTOOL) { 
source(paste(ALADYM_home,"/gui/biological/biologicalFun/setBiologicalParams.r", sep=""))
#} else {
#source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/bmt_setBiologicalParams.r", sep=""))
#}
source(paste(ALADYM_home,"/gui/biological/biologicalFun/setBiologicalParams_fromEnv.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/discardFun/add.discards.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discardFun/discards.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discardFun/discards.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discardFun/discards.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discardFun/reload_discard_table.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/discardFun/loadDiscardsfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/discardFun/saveDiscardstoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/add.discards_extvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/reload_discard_extvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/add.discards_extvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/discards_extvector_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard_extvectorFun/reload_discard_extvector_M.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/discard_extvectorFun/loadDiscards_extvectorfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/discard_extvectorFun/saveDiscards_extvectortoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/add.lan_obligation.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/lan_obligation.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/lan_obligation.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/lan_obligation.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/reload_lan_obligation_table.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/load_lan_obligationfromFile.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/discard.lan_obligation/export_lan_obligationtoFile.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/add.escape_survival_extvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/reload_escape_survival_extvectorF.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/add.escape_survival_extvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/escape_survival_extvector_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/reload_escape_survival_extvectorM.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/saveEscapeSurvivabilityByAgetoFile.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/escape_survival_extvector/loadEscapeSurvivabilityByAgefromFile.r", sep=""))



source(paste(ALADYM_home, "/gui/mortality/monthlySurvivability/add.monthly.survivability.r", sep=""))

source(paste(ALADYM_home, "/gui/mortality/monthlySurvivability/monthly.survivability.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/monthlySurvivability/monthly.survivability.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/monthlySurvivability/monthly.survivability.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/monthlySurvivability/reload_monthlySurvivability.r", sep=""))

#source(paste(ALADYM_home, "/gui/fishery/discardFun/save_file_discards_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/discardFun/select_file_discard.r", sep=""))
                                                           
source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/add.DAYS.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/DAYS.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/DAYS.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/DAYS.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/reload_DAYS_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/save_file_DAYS_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.daysFun/select_file_DAYS.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/add.FISHINGEFFORT.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/FISHINGEFFORT.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/FISHINGEFFORT.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/FISHINGEFFORT.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/reload_FISHINGEFFORT_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/save_file_FISHINGEFFORT_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/select_file_FISHINGEFFORT.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/loadFishingCoefficientfromFile.r", sep="")) 
source(paste(ALADYM_home, "/gui/fishery/effort.fishingeffortFun/exportFishingCoefficienttoFile.r", sep=""))     

source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/add.GT.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/GT.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/GT.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/GT.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/reload_GT_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/save_file_GT_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.gtFun/select_file_GT.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/add.VESSELS.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/reload_VESSELS_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/save_file_VESSELS_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/select_file_VESSELS.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/VESSELS.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/VESSELS.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/effort.vesselsFun/VESSELS.create_model.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/fisheryFun/add_fleetsegment.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fisheryFun/remove_fleetsegment.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fisheryFun/reload_fleetsegment_info.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fisheryFun/loadEffortDatafromFile.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fisheryFun/saveEffortDatatoFile.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/fisheryFun/fact_calc.gui.r", sep="") )  
source(paste(ALADYM_home, "/gui/fishery/fisheryFun/P_production_calc.gui.r", sep="") )  

source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/add.FishingMvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/add.FishingMvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/FishingMvector_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/reload_fishingmortalityF.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/reload_fishingmortalityM.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/fishingmortalityFun/loadFfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/fishingmortalityFun/saveFtoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/catchAtAge/add.catchAtAge_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/add.catchAtAge_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/catchAtAge_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/reload_catchAtAgeF.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/catchAtAge/reload_catchAtAgeM.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/catchAtAge/loadcatchAtAgefromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/catchAtAge/savecatchAtAgetoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/add.FishingMvector_M_overall.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/add.FishingMvector_F_overall.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_M_overall.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_F_overall.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_M_overall.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_F_overall.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_M_overall.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/FishingMvector_F_overall.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/reload_fishingmortalityF_overall.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/fishingmortality_overall/reload_fishingmortalityM_overall.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/fishingmortality_overall/loadF_overallfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/fishingmortality_overall/saveF_overalltoFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/fishingmortality_overall/split_F_button.r", sep="") )

#source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/save_file_FishingMvector_M.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/save_file_FishingMvector_F.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/select_file_FishingMvectorM.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/fishingmortalityFun/select_file_FishingMvectorF.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/pproductionFun/add.pproductions.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/pproductions.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/pproductions.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/pproductions.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/reload_pproduction_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/pproductionFun/save_file_pproduction_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/pproductionFun/select_file_Pproduction.r", sep=""))  
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/loadP_productionfromFile.r", sep=""))  
source(paste(ALADYM_home, "/gui/fishery/pproductionFun/exportP_ProductiontoFile.r", sep="")) 

source(paste(ALADYM_home, "/gui/fishery/productionFun/add.productions.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/productionFun/productions.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/productionFun/productions.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/productionFun/productions.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/productionFun/reload_production_table.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/productionFun/loadProductionfromFile.r", sep="")) 
source(paste(ALADYM_home, "/gui/fishery/productionFun/exportProductiontoFile.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/add.monthlyDiscard.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/monthlyDiscard.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/monthlyDiscard.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/monthlyDiscard.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/reload_monthlyDiscard_table.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/loadmonthlyDiscardfromFile.r", sep="")) 
source(paste(ALADYM_home, "/gui/fishery/monthlyDiscardFun/exportmonthlyDiscardtoFile.r", sep=""))

source(paste(ALADYM_home, "/gui/fishery/selectivityFun/add.selectivities.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivityFun/reload_selectivity.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/selectivityFun/save_file_selectivity_vector.r", sep=""))
#source(paste(ALADYM_home, "/gui/fishery/selectivityFun/select_file_Selectivity_vector.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivityFun/selectivities.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivityFun/selectivities.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivityFun/selectivities.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivityFun/loadSelectivityfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/selectivityFun/saveSelectivitytoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/add.SelectivityLength_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/add.SelectivityLength_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/SelectivityLength_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/reload_SelectivityLengthF.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_length/reload_SelectivityLengthM.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/selectivity_extvect_length/loadSelectivityLengthfromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/selectivity_extvect_length/saveSelectivityLengthtoFile.r", sep="") )

source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/add.SelectivityAge_M.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/add.SelectivityAge_F.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/SelectivityAge_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/reload_SelectivityAgeF.r", sep=""))
source(paste(ALADYM_home, "/gui/fishery/selectivity_extvect_age/reload_SelectivityAgeM.r", sep=""))
source(paste(ALADYM_home,"/gui/fishery/selectivity_extvect_age/loadSelectivityAgefromFile.r", sep="") )
source(paste(ALADYM_home,"/gui/fishery/selectivity_extvect_age/saveSelectivityAgetoFile.r", sep="") )


source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/add.DAYS_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/DAYS_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/DAYS_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/DAYS_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/reload_DAYS_fore_table.r", sep=""))  
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/save_file_DAYS_vector_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/daysFun_fore/select_file_DAYS_fore.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/add.discards_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/discards_fore.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/discards_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/discards_fore.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/reload_discard_fore.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/fleetTabs.discardFun/save_file_discards_vector_fore.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/fleetTabs.discardFun/select_file_discard_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/saveDiscardstoFile_fore.r", sep="") )
source(paste(ALADYM_home,"/gui/forecast/discardFun_fore/loadDiscardsfromFile_fore.r", sep="") )

source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/add.discards_extvector_F_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_F_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_F_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_F_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/reload_discard_extvector_F_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/add.discards_extvector_M_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_M_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_M_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/discards_extvector_M_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/reload_discard_extvector_M_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/loadDiscards_extvectorfromFile_fore.r", sep="") )
source(paste(ALADYM_home, "/gui/forecast/discard_extvectorFun_fore/saveDiscards_extvectortoFile_fore.r", sep="") )

source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/add.lan_obligation_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/lan_obligation_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/lan_obligation_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/lan_obligation_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/reload_lan_obligation_fore_table.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/load_lan_obligationfromFile_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/discard.lan_obligation_fore/export_lan_obligationtoFile_fore.r", sep=""))

source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/add.escape_survival_extvector_F_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_F_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_F_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_F_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/reload_escape_survival_extvector_F_fore_table.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/add.escape_survival_extvector_M_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_M_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_M_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/escape_survival_extvector_M_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/reload_escape_survival_extvector_M_fore_table.r", sep=""))

source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/saveEscapeSurvivabilityByAgetoFile_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/escape_survival_extvector_fore/loadEscapeSurvivabilityByAgefromFile_fore.r", sep=""))


source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/add.FISHINGEFFORT_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/FISHINGEFFORT_fore.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/FISHINGEFFORT_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/FISHINGEFFORT_fore.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/reload_FISHINGEFFORT_fore_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/save_file_FISHINGEFFORT_vector_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/select_file_FISHINGEFFORT_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/loadFishingCoefficientfromFile_fore.r", sep=""))     
source(paste(ALADYM_home,"/gui/forecast/fishingeffortFun_fore/exportFishingCoefficienttoFile_fore.r", sep=""))      

source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/add.GT_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/GT_fore.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/GT_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/GT_fore.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/reload_GT_fore_table.r", sep=""))  
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/save_file_GT_vector_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/gtFun_fore/select_file_GT_fore.r", sep=""))   

source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/add.selectivities_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/reload_selectivity_fore.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/save_file_selectivity_vector_fore.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/select_file_Selectivity_vector_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/selectivities_fore.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/selectivities_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/selectivities_fore.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/saveSelectivitytoFile_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivityFun_fore/loadSelectivityfromFile_fore.r", sep=""))

source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/add.SelectivityAge_M_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/add.SelectivityAge_F_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_M_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_F_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_M_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_F_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_M_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/SelectivityAge_F_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/reload_SelectivityAgeF_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_age_fore/reload_SelectivityAgeM_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_extvect_age_fore/loadSelectivityAgefromFile_fore.r", sep="") )
source(paste(ALADYM_home,"/gui/forecast/selectivity_extvect_age_fore/saveSelectivityAgetoFile_fore.r", sep="") )

source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/add.SelectivityLength_M_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/add.SelectivityLength_F_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_M_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_F_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_M_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_F_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_M_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/SelectivityLength_F_fore.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/reload_SelectivityLengthF_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/selectivity_extvect_length_fore/reload_SelectivityLengthM_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_extvect_length_fore/loadSelectivityLengthfromFile_fore.r", sep="") )
source(paste(ALADYM_home,"/gui/forecast/selectivity_extvect_length_fore/saveSelectivityLengthtoFile_fore.r", sep="") )

source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/add.VESSELS_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/reload_VESSELS_fore_table.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/save_file_VESSELS_vector_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/select_file_VESSELS_fore.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/VESSELS_fore.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/VESSELS_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/forecast/vesselsFun_fore/VESSELS_fore.create_model.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/fleetTabsFun/reload_fleetsegment_fore_info.r", sep=""))    
source(paste(ALADYM_home,"/gui/forecast/fleetTabsFun/loadEffortDatafromFile_fore.r", sep=""))   
source(paste(ALADYM_home,"/gui/forecast/fleetTabsFun/saveEffortDatatoFile_fore.r", sep="")) 

source(paste(ALADYM_home,"/gui/forecast/recrFromVector_fore/load_recruitment_fromVector_fore_file.r", sep="")) 


# load script to control graphical objects in the GUI
source(paste(ALADYM_home,"/gui/guicontrols/funSet.r", sep=""))

source(paste(ALADYM_home,"/gui/guicontrols/generalControls/change_startend_year.r", sep=""))

source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFt0_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFt0_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFLinf_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFLinf_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFK_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_VBFK_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_maturityogive_L75L25_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_maturityogive_L75L25_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_maturityogive_L50_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_maturityogive_L50_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_lifespanM.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/biologicalControls/change_lifespanF.r", sep=""))

source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_calibration_input.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_noise_AB.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_recruits_AB.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_tr.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/deactivate_SR_unused_params.r", sep=""))          
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_CI_input.r", sep=""))     

source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/change_fishingM_F.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/change_fishingM_M.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_Discard_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_FishingEffort_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/lockFisheryValues.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/lockFisheryValues_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_Pproduction_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_FishingM_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_Survivability_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_escape_Survivability_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/fisheryControls/deactivate_activate_Selectivity_input_table.r", sep=""))

source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/change_M_F.r", sep=""))  
source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/change_M_M.r", sep=""))  
source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/deactivate_F.r", sep=""))  
source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/deactivate_M_unused_params_F.r", sep=""))  
source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/deactivate_M_unused_params_M.r", sep=""))  
source(paste(ALADYM_home,"/gui/guicontrols/mortalityControls/deactivate_Z.r", sep=""))  

source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/change_chkFMSY.r", sep="")) 
source(paste(ALADYM_home,"/gui/guicontrols/recruitmentControls/change_noise_AB_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_SR_unused_params_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_Discard_unused_params_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_FishingEffort_unused_params_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_escape_Survivability_unused_params_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_Survivability_unused_params_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_costant_relatinship_recr_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_scalar_costant_vector_recruitment_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/change_CI_input_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_activate_Selectivity_input_table_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_growth_uncertainty.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_M_unused_params.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_maturity_uncertainty.r", sep=""))
source(paste(ALADYM_home,"/gui/guicontrols/forecastControls/deactivate_selectivity_uncertainty.r", sep=""))

source(paste(ALADYM_home, "/gui/mortality/mFun/select_file_MvectorM.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/select_file_MvectorF.r", sep=""))
# source(paste(ALADYM_home, "/gui/mortality/mFun/select_file_Mvector.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/save_file_Mvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/save_file_Mvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_M.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/Mvector_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/add.Mvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/mFun/add.Mvector_F.r", sep=""))

source(paste(ALADYM_home, "/gui/mortality/mFun/setEmptyM.r", sep=""))

source(paste(ALADYM_home, "/gui/mortality/zFun/add.Zvector_F.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/add.Zvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/reload_ZvectorF_table.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/reload_ZvectorM_table.r", sep=""))
#source(paste(ALADYM_home, "/gui/mortality/zFun/save_file_Zvector_F.r", sep=""))
#source(paste(ALADYM_home, "/gui/mortality/zFun/save_file_Zvector_M.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/save_file_Zvector.r", sep=""))
#source(paste(ALADYM_home, "/gui/mortality/zFun/select_file_ZvectorF.r", sep=""))
#source(paste(ALADYM_home, "/gui/mortality/zFun/select_file_ZvectorM.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/select_file_Zvector.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_F.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_F.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_F.create_model.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_M.add_columns.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_M.cell_edited.r", sep=""))
source(paste(ALADYM_home, "/gui/mortality/zFun/Zvector_M.create_model.r", sep=""))

source(paste(ALADYM_home,"/gui/recruitment/monthlyOffspringsFun/monthlyOffsprings.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/monthlyOffspringsFun/add.monthlyOffsprings.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/monthlyOffspringsFun/monthlyOffsprings.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/monthlyOffspringsFun/monthlyOffsprings.cell_edited.r", sep=""))     
source(paste(ALADYM_home,"/gui/recruitment/monthlyOffspringsFun/reload_monthlyOffsprings.r", sep=""))  

source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/save_file_recruitment_vector.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/recruitments.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/recruitments.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/recruitments.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/add.recruitments.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/select_file_StockRecr_vector.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/stockrecrFun/reload_recruitment_table.r", sep=""))

source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/extErrorRecruitment.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/extErrorRecruitment.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/extErrorRecruitment.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/add.extErrorRecruitment.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/reload_extErrorRecruitment.r", sep=""))
source(paste(ALADYM_home,"/gui/recruitment/extErrorRecruitment/load_extErrorRecruitment_file.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/extErrorRecruitment_fore.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/extErrorRecruitment_fore.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/extErrorRecruitment_fore.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/add.extErrorRecruitment_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/reload_extErrorRecruitment_fore.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/extErrorRecruitment_fore/load_extErrorRecruitment_fore_file.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/select_file_recruitment_fore_from_vector.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/add.recruitments_fore_from_vector.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/recruitments_fore_from_vector.add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/recruitments_fore_from_vector.cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/recruitments_fore_from_vector.create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/reload_recruitment_fore_from_vector_table.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/save_file_recruitment_fore_from_vector.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore/select_file_recruitment_fore_from_vector.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/add_selectivity_uncert_distribution_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/load_selectivity_uncert_distribution_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/reload_selectivity_uncert_distribution_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/selectivity_uncert_distribution_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/selectivity_uncert_distribution_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_distribution_from_file/selectivity_uncert_distribution_from_file_create_model.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/add_selectivity_uncert_vector_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/load_selectivity_uncert_vector_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/reload_selectivity_uncert_vector_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/selectivity_uncert_vector_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/selectivity_uncert_vector_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/selectivity_uncert_vector_from_file/selectivity_uncert_vector_from_file_create_model.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/add.recruitments_fore_from_vector_UN.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/recruitments_fore_from_vector.add_columns_UN.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/recruitments_fore_from_vector.cell_edited_UN.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/recruitments_fore_from_vector.create_model_UN.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/reload_recruitment_fore_from_vector_table_UN.r", sep=""))
#source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/save_file_recruitment_fore_from_vector_UN.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/recruitment_fromVector_fore_UN/load_recruitment_fromVector_fore_file_UN.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/add_growth_uncert_Linf_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/growth_uncert_Linf_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/growth_uncert_Linf_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/growth_uncert_Linf_from_file_create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/reload_growth_uncert_Linf_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_Linf_from_file/load_growth_uncert_Linf_from_file.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/add_growth_uncert_k_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/growth_uncert_k_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/growth_uncert_k_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/growth_uncert_k_from_file_create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/reload_growth_uncert_k_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/growth_uncert_k_from_file/load_growth_uncert_k_from_file.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/add_maturity_uncert_males_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/maturity_uncert_males_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/maturity_uncert_males_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/maturity_uncert_males_from_file_create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/reload_maturity_uncert_males_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_males_from_file/load_maturity_uncert_males_from_file.r", sep=""))

source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/add_maturity_uncert_females_from_file.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/maturity_uncert_females_from_file_add_columns.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/maturity_uncert_females_from_file_cell_edited.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/maturity_uncert_females_from_file_create_model.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/reload_maturity_uncert_females_from_file_table.r", sep=""))
source(paste(ALADYM_home,"/gui/forecast/maturity_uncert_females_from_file/load_maturity_uncert_females_from_file.r", sep=""))


# source(paste(ALADYM_home,"/gui/utilities/get_selectivity_param_name.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/check_input.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/get_table.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/add_gear.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/add_gear_from_config.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/update_gear_fore.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/update_gear.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/clear_FisheryGUI.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/clear_ForecastGUI.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/showError.r", sep="") )  
source(paste(ALADYM_home,"/gui/utilities/showMessage.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/showMessageOK.r", sep="") )                                  
source(paste(ALADYM_home,"/gui/utilities/check_single_value.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/activate_main_w.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/deactivate_main_w.r", sep="") )      
source(paste(ALADYM_home,"/gui/utilities/setFleetsegmentStatusQuo.r", sep="") ) 
source(paste(ALADYM_home,"/gui/utilities/splitF_bymeansCATCHatAGE.r", sep="") )   
source(paste(ALADYM_home,"/gui/utilities/splitF_bymeansPRODUCTION.r", sep="") )  
source(paste(ALADYM_home,"/gui/utilities/split_F.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/check_aldForecast.r", sep="") )  

# source(paste(ALADYM_home,"/gui/utilities/loadDiscardsfromFile.r", sep="") )
#source(paste(ALADYM_home,"/gui/utilities/loadDiscardsfromFile_fore.r", sep="") )
# source(paste(ALADYM_home,"/gui/utilities/saveDiscardstoFile.r", sep="") )
#source(paste(ALADYM_home,"/gui/utilities/saveDiscardstoFile_fore.r", sep="") )

# load aladym objects
source(paste(ALADYM_home, "/gui/objects/aldPopulation.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldSimulation.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldSimulation.setSimulationfromGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldFleetsegment.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldFleetsegment.setFleetsegmentfromGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldFleetsegment.updateFleetsegment_forefromGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldFleetsegment.loadFleetsegmentintoGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldFleetsegment.loadFleetsegment_foreintoGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldForecast.setForecastfromGUI.r", sep=""))
source(paste(ALADYM_home, "/gui/objects/aldForecast.r", sep=""))

# load utility functions
if (IN_BEMTOOL) {
source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/add_BMT_fleetsegments.r", sep="") )
source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/update_BMT_fleetsegments_fore.int.r", sep="") )   
source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/update_BMT_fleetsegments_fore.r", sep="") )  
# source(paste(ALADYM_home,"/gui/utilities/bmt_add_gear.r", sep="") )   ------------------------------------------------------ potrebbe servire
#source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/fact_calc.gui.r",sep="") )
#source(paste(ALADYM_home,"/gui/utilities/interconn.bmt/P_production_calc.gui.r",sep="") )
}


source(paste(ALADYM_home, "/src/get_effort_data.r", sep=""))
source(paste(ALADYM_home, "/src/get_effort_data_fore.r", sep=""))

source(paste(ALADYM_home, "/src/get_fishing_coefficient.r", sep=""))    
source(paste(ALADYM_home, "/src/get_fishing_coefficient_fore.r", sep=""))    

source(paste(ALADYM_home, "/src/get_production_data.r", sep=""))
source(paste(ALADYM_home, "/src/get_production_data_by_year.r", sep=""))
source(paste(ALADYM_home, "/src/get_discard_data.r", sep=""))
source(paste(ALADYM_home, "/src/saveObservedvsSimulatedPlot_landing.r", sep="")) 
source(paste(ALADYM_home, "/src/saveObservedvsSimulatedPlot_discard.r", sep=""))   
source(paste(ALADYM_home, "/src/saveKobePlot.r", sep=""))   

source(paste(ALADYM_home, "/src/utilities/meanWequals.r", sep=""))
source(paste(ALADYM_home, "/src/utilities/modulo.r", sep=""))     
source(paste(ALADYM_home, "/src/utilities/quantiles.r", sep="")) 
source(paste(ALADYM_home, "/src/utilities/sumWequals.r", sep=""))

#source(paste(ALADYM_home,"/gui/fishery/fisheryFun/fact_calc.gui.r",sep="") )
#source(paste(ALADYM_home,"/gui/fishery/fisheryFun/P_production_calc.gui.r",sep="") )


 