From 85c9733b32402f153abf2fc541ccd86887c68035 Mon Sep 17 00:00:00 2001 From: Daniel Vartanian Date: Tue, 5 Aug 2025 02:00:01 -0300 Subject: [PATCH 1/3] Add support for `.nls` extension in NetLogo --- lib/linguist/languages.yml | 1 + samples/NetLogo/show-values.nls | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 samples/NetLogo/show-values.nls diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 3da1999710..6cf413cb74 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -4855,6 +4855,7 @@ NetLogo: color: "#ff6375" extensions: - ".nlogo" + - ".nls" tm_scope: source.lisp ace_mode: lisp codemirror_mode: commonlisp diff --git a/samples/NetLogo/show-values.nls b/samples/NetLogo/show-values.nls new file mode 100644 index 0000000000..41f7a845ff --- /dev/null +++ b/samples/NetLogo/show-values.nls @@ -0,0 +1,26 @@ +to show-values + ifelse mouse-inside? [ + ask patch mouse-xcor mouse-ycor [ + let radius-mean round mean [pcolor] of patches in-radius 3 + let color-shade radius-mean - (precision radius-mean -1) + + ifelse (color-shade < 0) [ + set plabel-color black + ] [ + set plabel-color white + ] + + carefully [ + set plabel precision value 2 + ] [ + set plabel value + ] + ] + + ask other patches who-are-not patch mouse-xcor mouse-ycor [ + set plabel "" + ] + ] [ + ask patches [set plabel ""] + ] +end From 18f2d968573815d7a6a0566172ef6f924f5bdcb0 Mon Sep 17 00:00:00 2001 From: Daniel Vartanian Date: Tue, 5 Aug 2025 19:51:48 -0300 Subject: [PATCH 2/3] Add `.nls` heuristics and map the extension to TeX and INI file types --- lib/linguist/heuristics.yml | 30 +++++ lib/linguist/languages.yml | 2 + samples/INI/ena.nls | 168 +++++++++++++++++++++++++ samples/INI/settings.nls | 37 ++++++ samples/NetLogo/setup-procedures.nls | 179 +++++++++++++++++++++++++++ samples/TeX/main.nls | 17 +++ samples/TeX/myThesis.nls | 23 ++++ 7 files changed, 456 insertions(+) create mode 100644 samples/INI/ena.nls create mode 100644 samples/INI/settings.nls create mode 100644 samples/NetLogo/setup-procedures.nls create mode 100644 samples/TeX/main.nls create mode 100644 samples/TeX/myThesis.nls diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 9af3c1a4bf..412d914d2c 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -560,6 +560,36 @@ disambiguations: - language: NL pattern: '^(b|g)[0-9]+ ' - language: NewLisp +- extensions: ['.nls'] + rules: + - language: NetLogo + pattern: + - '^\s*;' + - '^\s*to\s+[\w-]+' + - '^\s*to-report\s+[\w-]+' + - '^\s*__includes\s+\[' + - '^\s*extensions\s+\[' + - '^\s*globals\s+\[' + - '^\s*breed\s+\[' + - '^\s*turtles-own\s+\[' + - '^\s*patches-own\s+\[' + - '^\s*links-own\s+\[' + - '^\s*undirected-link-breed\s+\[' + - '^\s*directed-link-breed\s+\[' + - '^\s*ask\s+[\w-]+\s+\[' + - language: TeX + pattern: + - '^\s*%' + - '^\s*\\begin' + - '^\s*\\nomgroup' + - '^\s*\\item' + - '^\s*\\end' + - language: INI + pattern: + - '^\s*[\w-]+\s*=' + - '^\s*STRINGTABLE' + - '^\s*LOCALE_' + - '^\s*LGRPID_' - extensions: ['.nr'] rules: - language: Roff diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 6cf413cb74..4e9f6bb17a 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -3133,6 +3133,7 @@ INI: - ".dof" - ".frm" - ".lektorproject" + - ".nls" - ".prefs" - ".pro" - ".properties" @@ -7577,6 +7578,7 @@ TeX: - ".mkii" - ".mkiv" - ".mkvi" + - ".nls" - ".sty" - ".toc" language_id: 369 diff --git a/samples/INI/ena.nls b/samples/INI/ena.nls new file mode 100644 index 0000000000..5f436bdac2 --- /dev/null +++ b/samples/INI/ena.nls @@ -0,0 +1,168 @@ +/* + * Locale definitions for English (Australia) + * + * Copyright 2002 Alexandre Julliard for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_AUS +{ + LOCALE_FONTSIGNATURE L"\x002f\x8000\x3808\x0000\x0000\x0000\x0000\x0000\x0001\x0000\x0000\x4000\x00ff\x003f\x0000\xffff" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "1" + LOCALE_ICOUNTRY "61" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "0" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "0" + LOCALE_IDEFAULTANSICODEPAGE "1252" + LOCALE_IDEFAULTCODEPAGE "850" + LOCALE_IDEFAULTCOUNTRY "61" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0c09" + LOCALE_IDEFAULTMACCODEPAGE "10000" + LOCALE_IDEFAULTUNIXCODEPAGE "28591" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0c09" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "1" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "0" + LOCALE_INEGSIGNPOSN "3" + LOCALE_INEGSYMPRECEDES "1" + LOCALE_INEUTRAL "0" + LOCALE_IOPTIONALCALENDAR "0" + LOCALE_IPAPERSIZE "9" + LOCALE_IPOSSEPBYSPACE "0" + LOCALE_IPOSSIGNPOSN "3" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" + LOCALE_ITIME "0" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "0" + LOCALE_S1159 "AM" + LOCALE_S2359 "PM" + LOCALE_SABBREVCTRYNAME "AUS" + LOCALE_SABBREVDAYNAME1 "Mon" + LOCALE_SABBREVDAYNAME2 "Tue" + LOCALE_SABBREVDAYNAME3 "Wed" + LOCALE_SABBREVDAYNAME4 "Thu" + LOCALE_SABBREVDAYNAME5 "Fri" + LOCALE_SABBREVDAYNAME6 "Sat" + LOCALE_SABBREVDAYNAME7 "Sun" + LOCALE_SABBREVLANGNAME "ENA" + LOCALE_SABBREVMONTHNAME1 "Jan" + LOCALE_SABBREVMONTHNAME2 "Feb" + LOCALE_SABBREVMONTHNAME3 "Mar" + LOCALE_SABBREVMONTHNAME4 "Apr" + LOCALE_SABBREVMONTHNAME5 "May" + LOCALE_SABBREVMONTHNAME6 "Jun" + LOCALE_SABBREVMONTHNAME7 "Jul" + LOCALE_SABBREVMONTHNAME8 "Aug" + LOCALE_SABBREVMONTHNAME9 "Sep" + LOCALE_SABBREVMONTHNAME10 "Oct" + LOCALE_SABBREVMONTHNAME11 "Nov" + LOCALE_SABBREVMONTHNAME12 "Dec" + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "Australia" + LOCALE_SCURRENCY "$" + LOCALE_SDATE "/" + LOCALE_SDAYNAME1 "Monday" + LOCALE_SDAYNAME2 "Tuesday" + LOCALE_SDAYNAME3 "Wednesday" + LOCALE_SDAYNAME4 "Thursday" + LOCALE_SDAYNAME5 "Friday" + LOCALE_SDAYNAME6 "Saturday" + LOCALE_SDAYNAME7 "Sunday" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "Australia" + LOCALE_SENGCURRNAME "Australian Dollar" + LOCALE_SENGLANGUAGE "English" + LOCALE_SGROUPING "3;0" + LOCALE_SINTLSYMBOL "AUD" + LOCALE_SISO3166CTRYNAME "AU" + LOCALE_SISO639LANGNAME "en" + LOCALE_SLANGUAGE "English (Australia)" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dddd, d MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;0" + LOCALE_SMONTHNAME1 "January" + LOCALE_SMONTHNAME2 "February" + LOCALE_SMONTHNAME3 "March" + LOCALE_SMONTHNAME4 "April" + LOCALE_SMONTHNAME5 "May" + LOCALE_SMONTHNAME6 "June" + LOCALE_SMONTHNAME7 "July" + LOCALE_SMONTHNAME8 "August" + LOCALE_SMONTHNAME9 "September" + LOCALE_SMONTHNAME10 "October" + LOCALE_SMONTHNAME11 "November" + LOCALE_SMONTHNAME12 "December" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "en-AU" + LOCALE_SNATIVECTRYNAME "Australia" + LOCALE_SNATIVECURRNAME "Australian Dollar" + LOCALE_SNATIVEDIGITS "0123456789" + LOCALE_SNATIVEDISPLAYNAME "English (Australia)" + LOCALE_SNATIVELANGNAME "English" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SOPENTYPELANGUAGETAG "ENG " + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Latn;" + LOCALE_SSHORTDATE "d/MM/yyyy" + LOCALE_SSHORTESTDAYNAME1 "Mo" + LOCALE_SSHORTESTDAYNAME2 "Tu" + LOCALE_SSHORTESTDAYNAME3 "We" + LOCALE_SSHORTESTDAYNAME4 "Th" + LOCALE_SSHORTESTDAYNAME5 "Fr" + LOCALE_SSHORTESTDAYNAME6 "Sa" + LOCALE_SSHORTESTDAYNAME7 "Su" + LOCALE_SSHORTTIME "h:mm tt" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME ":" + LOCALE_STIMEFORMAT "h:mm:ss tt" + LOCALE_SYEARMONTH "MMMM yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/samples/INI/settings.nls b/samples/INI/settings.nls new file mode 100644 index 0000000000..1e4de913d5 --- /dev/null +++ b/samples/INI/settings.nls @@ -0,0 +1,37 @@ +MODPATH=${0%/*} + +#installer options +#Below you can see the decoding of the names of the points, +#or trust the numerical values of the points. + +#STEP1=Select volume steps +#STEP2=Increase media volumes +#STEP3=Improving microphones sensitivity +#STEP4=Select audio format (16..float) +#STEP5=Select sampling rates (96..384000) +#STEP6=Turn off sound interference +#STEP7=Patching device_features files +#STEP8=Other patches in mixer_paths files +#STEP9=Tweaks for build.prop files +#STEP10=Improve bluetooth +#STEP11=Switch audio output (DIRECT -> DIRECT_PCM) +#STEP12=Install custom preset for iir +#STEP13=Ignore all audio effects +#STEP14=Install experimental tweaks for tinymix +#STEP15=Configure Dolby Atmos + +VOLSTEPS=skip +VOLMEDIA=skip +VOLMIC=skip +BITNES=skip +SAMPLERATE=skip +STEP6=false +STEP7=false +STEP8=false +STEP9=false +STEP10=false +STEP11=false +STEP12=false +STEP13=false +STEP14=false +STEP15=false diff --git a/samples/NetLogo/setup-procedures.nls b/samples/NetLogo/setup-procedures.nls new file mode 100644 index 0000000000..ba3d76d43f --- /dev/null +++ b/samples/NetLogo/setup-procedures.nls @@ -0,0 +1,179 @@ +;################################################################ +;read a text file to define the landscape in term of the altitude differences. +;this is to use the same landscape multiple times +;to change the landscape just comment "read-landscape" function in the "Go" procedure and uncomment the "create_landscape" procedure +to read-landscape + file-open "landscape.txt" + let i 0 + while [i <= max-pxcor] [ + let j 0 + while [j <= max-pycor] [ + let x-tmp file-read + let y-tmp file-read + ask patch x-tmp y-tmp + [ + let ff file-read + set A ff + ] + set j j + 1 + ] + set i i + 1 + ] + file-close +end +;############################################################################################# +to load_fixed_landscape + read-landscape + ask patches[ + ;Define initial values + set Infra_flood 0 ;presence or absence of infrastructure + set Infra_supply 0 ;presence or absence of infrastructure + + set c_F 1 ;Condition of sewer infrastructure + set c_S 1 ;Condition of water supply infrastructure + + set infra_F_age 1 ;age + set infra_S_age 1 ;age + set protestas_here_F 0 ;wheather a protest happen at a particula location and time + set protestas_here_S 0 ;wheather a protest happen at a particula location and time + set exposure_F [0 0 0 0 0 0 0 0 0 0] ;list of exposure and risk to calculate accumulated exposure + set exposure_S [0 0 0 0 0 0 0 0 0 0] + set total_exposure_S 0 ;accumulated burden + set total_exposure_F 0 ;accumulated burden + set V sum exposure_F + sum exposure_S ;; sum of exposure to cALCULATE "TOTAL EXPOSURE" + set neighborhood_here? FALSE ;;presence or absence of neighborhood here + + set C1 0.01 ;Indirect Benefit + set C2 0.001 ;Social pressure + set C3 infra_F_age ;Age SS + set C4 0.1 ;Lack of coverage SS + + set C5 0.01 ;Indirect Benefit + set C6 0.001 ;Social pressure + set C7 infra_S_age ;Age PWS + set C8 0.1 ;lack of coverage PWS + + set invest_here_F 0.01 ;investments of the water authority + set invest_here_S 0.01 + set pcolor 65 +] + +end +;###################################################################### +;###################################################################### +to create-Landscape +;;; random-seed semilla-aleatoria + + if landscape-type = "closed-watershed"[ + ask patches with [(pxcor = 50 and pycor = 50)][set A 5000] ;;define central point with max value. + + repeat 600 [diffuse A 1] ;; slightly smooth out the landscape by difusing variables A. + ] + + if landscape-type = "many-hills"[ + ask n-of 2 patches [set A (4500 + random 500)] ;;define central point with max value. + repeat 200 [diffuse A 1] + ] + + + let max_alt max [A] of patches ;;define maximum altitute + let min_alt min [A] of patches ;;define minimum altitute + ask patches [ + if landscape-type = "closed-watershed" [ + set A (max_alt - A) / max_alt + ] + + if landscape-type = "many-hills" [ + set A A / max_alt + ] + + if landscape-type = "gradient"[ + set A (max-pxcor - pxcor) / max-pxcor ;;define topographic risk as a gradient with respect to pxcor + ] + + ;Define initial values + set Infra_flood 0 ;presence or absence of infrastructure + set Infra_supply 0 ;presence or absence of infrastructure + + set c_F 1 ;Condition of sewer infrastructure + set c_S 1 ;Condition of water supply infrastructure + + set infra_F_age 1 ;age + set infra_S_age 1 ;age + set protestas_here_F 0 ;wheather a protest happen at a particula location and time + set protestas_here_S 0 ;wheather a protest happen at a particula location and time + set exposure_F [0 0 0 0 0 0 0 0 0 0] ;list of exposure and risk to calculate accumulated exposure + set exposure_S [0 0 0 0 0 0 0 0 0 0] + set total_exposure_S 0 ;accumulated burden + set total_exposure_F 0 ;accumulated burden + set V sum exposure_F + sum exposure_S ;; sum of exposure to cALCULATE "TOTAL EXPOSURE" + set neighborhood_here? FALSE ;;presence or absence of neighborhood here + + set C1 0.01 ;Indirect Benefit + set C2 0.001 ;Social pressure + set C3 infra_F_age ;Age SS + set C4 0.1 ;Lack of coverage SS + + set C5 0.01 ;Indirect Benefit + set C6 0.001 ;Social pressure + set C7 infra_S_age ;Age PWS + set C8 0.1 ;lack of coverage PWS + + set invest_here_F 0.01 ;investments of the water authority + set invest_here_S 0.01 + set pcolor 65 + + ] + +end + +;############################################################################################# +to Create-neighborhoods-Infra +;random-seed 3000 + ask patches [ + if A < random-float 1 [ + set neighborhood_here? TRUE + set protestas_here_F 0.1 + set protestas_here_S 0.1 + set exposure_F [0 0 0 0 0 0 0 0 0 0] + set exposure_S [0 0 0 0 0 0 0 0 0 0] + if A < 0.25 * random-float 1 [ + set Infra_flood 1 ;; 1 if infra for "drainage" is here; 0 otherwise + if Initial-Condition-Infrastructure ="Old"[set infra_F_age (1 - A) * 100] + if Initial-Condition-Infrastructure ="New"[set infra_F_age (1 - A) * 10] + set c_F exp(- infra_F_age / 100) + ] + if A < 0.25 * random-float 1 [ + set Infra_supply 1 + if Initial-Condition-Infrastructure ="Old"[set infra_S_age (1 - A) * 100] ;; 1 if infra for "water supply" is here; 0 otherwise + if Initial-Condition-Infrastructure ="New"[set infra_S_age (1 - A) * 10] + set c_S exp(- infra_S_age / 100) + ] + + ] + ] +end + +;############################################################################################# +to read_weights_from_csv + ; let tot_S csv:from-file "c:/Users/abaezaca/Documents/MEGADAPT/ABM_V2/sampling_scenarios_Weights.csv" + ;let tot_S csv:from-file "c:/Users/abaezaca/Dropbox (ASU)/MEGADAPT/ABM_V2/sampling_scenarios_Weights_all.csv" + let tot_S csv:from-file "sampling_scenarios_var_W.csv" ;c:/Users/abaezaca/Dropbox (ASU)/MEGADAPT/abm2/ + ;let tot_S csv:from-file "c:/Users/abaezaca/Documents/MEGADAPT/ABM_V2/sampling_scenarios_Weights_var_D.csv" + let weigh_list but-first (item scenario_number (but-first tot_S)) + + + set w1 item 0 weigh_list + set w2 item 1 weigh_list + set w3 item 2 weigh_list + + set w4 item 3 weigh_list + set w5 item 4 weigh_list + set w6 item 5 weigh_list + + set w7 item 6 weigh_list + set w8 item 7 weigh_list + file-close + +end + diff --git a/samples/TeX/main.nls b/samples/TeX/main.nls new file mode 100644 index 0000000000..2e4e6e3a1b --- /dev/null +++ b/samples/TeX/main.nls @@ -0,0 +1,17 @@ + +\begin{thenomenclature} +\nomgroup{A} + \item [{\colorbox{1a9850}{\qquad}}]\begingroup Color \texttt{\#0097e6}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{2a7ae2}{\qquad} }]\begingroup Color \texttt{\#7158e2}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{53a9ab}{\qquad}}]\begingroup Color \texttt{\#007500}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{6a3d9a}{\qquad}}]\begingroup Color \texttt{\#ED4C67}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{f8766d}{\qquad} }]\begingroup Color \texttt{\#EA7500}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{ffa725}{\qquad}}]\begingroup Color \texttt{\#1289A7}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{md}{\qquad}}]\begingroup Color \texttt{\#EA2027}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{purple}{\qquad}}]\begingroup Color \texttt{\#bf0040}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{titlepurpleb}{\qquad}}]\begingroup Color \texttt{\#833471}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{titlepurplec}{\qquad}}]\begingroup Color \texttt{\#006266}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{titlepurple}{\qquad }}]\begingroup Color \texttt{\#5758BB}\nomeqref {0.0.0}\nompageref{I} + \item [{\colorbox{文字底色}{\qquad}}]\begingroup Color \texttt{\#F8FF00}\nomeqref {0.0.0}\nompageref{I} + +\end{thenomenclature} diff --git a/samples/TeX/myThesis.nls b/samples/TeX/myThesis.nls new file mode 100644 index 0000000000..6e96dc918c --- /dev/null +++ b/samples/TeX/myThesis.nls @@ -0,0 +1,23 @@ +\begin{thenomenclature} + + \nomgroup{A} + + \item [{$\alpha$}]\begingroup 攻角(AoA)\nomeqref {4.1} + \nompageref{11} + \item [{$\alpha^{\star}$}]\begingroup $X=0.5$时的攻角\nomeqref {4.1} + \nompageref{11} + \item [{$\dot{\alpha}$}]\begingroup 攻角变化率\nomeqref {4.1} + \nompageref{11} + \item [{$\tau _{1},\tau _{2}$}]\begingroup 流动分离方程的时间常数\nomeqref {4.1} + \nompageref{11} + \item [{$a_{1}$}]\begingroup 流动分离方程的系数\nomeqref {4.1} + \nompageref{11} + \item [{$C_{L0}$}]\begingroup $\alpha=0^{\circ}$时当升力\nomeqref {4.1} + \nompageref{11} + \item [{$C_{L\alpha}$}]\begingroup 升力线斜率\nomeqref {4.1} + \nompageref{11} + \item [{$t$}]\begingroup 时间\nomeqref {4.1}\nompageref{11} + \item [{$X$}]\begingroup 相对弦长的非稳态流动分离点\nomeqref {4.1} + \nompageref{11} + +\end{thenomenclature} From be5f680f462f2ff59aec331a5c98574ce0070f88 Mon Sep 17 00:00:00 2001 From: Daniel Vartanian Date: Wed, 21 Jan 2026 01:31:23 -0300 Subject: [PATCH 3/3] Update `.nls` heuristics and samples --- lib/linguist/heuristics.yml | 46 +- samples/INI/ben.nls | 164 +++++ samples/INI/en-us.nls | 73 ++ samples/INI/j9bcv.nls | 440 ++++++++++++ samples/NetLogo/0_init.nls | 204 ++++++ samples/NetLogo/config-reader.nls | 265 +++++++ samples/NetLogo/nodes.nls | 85 +++ samples/NetLogo/output.nls | 212 ++++++ samples/NetLogo/parameters.nls | 1072 +++++++++++++++++++++++++++++ samples/NetLogo/police.nls | 310 +++++++++ samples/NetLogo/roads.nls | 35 + samples/NetLogo/setup-map.nls | 105 +++ samples/TeX/Hauptdatei.nls | 38 + samples/TeX/edengths.nls | 314 +++++++++ samples/TeX/tcc-ifbaiano.nls | 13 + 15 files changed, 3351 insertions(+), 25 deletions(-) create mode 100644 samples/INI/ben.nls create mode 100644 samples/INI/en-us.nls create mode 100644 samples/INI/j9bcv.nls create mode 100644 samples/NetLogo/0_init.nls create mode 100644 samples/NetLogo/config-reader.nls create mode 100644 samples/NetLogo/nodes.nls create mode 100644 samples/NetLogo/output.nls create mode 100644 samples/NetLogo/parameters.nls create mode 100644 samples/NetLogo/police.nls create mode 100644 samples/NetLogo/roads.nls create mode 100644 samples/NetLogo/setup-map.nls create mode 100644 samples/TeX/Hauptdatei.nls create mode 100644 samples/TeX/edengths.nls create mode 100644 samples/TeX/tcc-ifbaiano.nls diff --git a/lib/linguist/heuristics.yml b/lib/linguist/heuristics.yml index 8db0ae9b41..37516e0270 100644 --- a/lib/linguist/heuristics.yml +++ b/lib/linguist/heuristics.yml @@ -614,33 +614,29 @@ disambiguations: - extensions: ['.nls'] rules: - language: NetLogo - pattern: - - '^\s*;' - - '^\s*to\s+[\w-]+' - - '^\s*to-report\s+[\w-]+' - - '^\s*__includes\s+\[' - - '^\s*extensions\s+\[' - - '^\s*globals\s+\[' - - '^\s*breed\s+\[' - - '^\s*turtles-own\s+\[' - - '^\s*patches-own\s+\[' - - '^\s*links-own\s+\[' - - '^\s*undirected-link-breed\s+\[' - - '^\s*directed-link-breed\s+\[' - - '^\s*ask\s+[\w-]+\s+\[' + pattern: >- + (?x) ^ \s* + ( to(-report)? \s+ \w[\w-]* + | (extension|global|__include)s \s* \[ + | (turtles|patches|links)-own \s* \[ + | ((un)?directed-link-)?breed \s* \[ + ) - language: TeX - pattern: - - '^\s*%' - - '^\s*\\begin' - - '^\s*\\nomgroup' - - '^\s*\\item' - - '^\s*\\end' + pattern: >- + (?x) ^ \s* + ( \\begin \{ + | \\end \{ + | \\nomgroup \{ + | \\item + ) - language: INI - pattern: - - '^\s*[\w-]+\s*=' - - '^\s*STRINGTABLE' - - '^\s*LOCALE_' - - '^\s*LGRPID_' + pattern: >- + (?x) ^ \s* + ( [\w#-]+\s*= + | STRINGTABLE + | LOCALE_ + | LGRPID_ + ) - extensions: ['.nr'] rules: - language: Roff diff --git a/samples/INI/ben.nls b/samples/INI/ben.nls new file mode 100644 index 0000000000..d848937c2f --- /dev/null +++ b/samples/INI/ben.nls @@ -0,0 +1,164 @@ +/* + * Locale definitions for Bangla + * + * Copyright 2017 Nikolay Sivov for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma code_page(65001) /* UTF-8 */ + +STRINGTABLE LANGUAGE LANG_BANGLA, SUBLANG_BANGLA_INDIA +{ + LOCALE_FONTSIGNATURE L"\x0000\x0001\x0000\x0000\x0000\x0000\x0000\x8000\x0000\x0000\x0000\x0000\x0000\x0000\x0000\x0000" + LOCALE_ICALENDARTYPE "1" + LOCALE_ICENTURY "0" + LOCALE_ICOUNTRY "91" + LOCALE_ICURRDIGITS "2" + LOCALE_ICURRENCY "2" + LOCALE_IDATE "1" + LOCALE_IDAYLZERO "1" + LOCALE_IDEFAULTANSICODEPAGE "0" + LOCALE_IDEFAULTCODEPAGE "1" + LOCALE_IDEFAULTCOUNTRY "91" + LOCALE_IDEFAULTEBCDICCODEPAGE "500" + LOCALE_IDEFAULTLANGUAGE "0445" + LOCALE_IDEFAULTMACCODEPAGE "2" + LOCALE_IDEFAULTUNIXCODEPAGE "" + LOCALE_IDIGITS "2" + LOCALE_IDIGITSUBSTITUTION "1" + LOCALE_IFIRSTDAYOFWEEK "0" + LOCALE_IFIRSTWEEKOFYEAR "0" + LOCALE_IINTLCURRDIGITS "2" + LOCALE_ILANGUAGE "0445" + LOCALE_ILDATE "1" + LOCALE_ILZERO "1" + LOCALE_IMEASURE "0" + LOCALE_IMONLZERO "1" + LOCALE_INEGCURR "12" + LOCALE_INEGNUMBER "1" + LOCALE_INEGSEPBYSPACE "1" + LOCALE_INEGSIGNPOSN "4" + LOCALE_IPOSSYMPRECEDES "1" + LOCALE_IREADINGLAYOUT "0" + LOCALE_ITIME "1" + LOCALE_ITIMEMARKPOSN "0" + LOCALE_ITLZERO "1" + LOCALE_S1159 "AM" + LOCALE_S2359 "PM" + LOCALE_SABBREVCTRYNAME "IND" + LOCALE_SABBREVDAYNAME1 "সোম." + LOCALE_SABBREVDAYNAME2 "মঙ্গল." + LOCALE_SABBREVDAYNAME3 "বুধ." + LOCALE_SABBREVDAYNAME4 "বৃহস্পতি." + LOCALE_SABBREVDAYNAME5 "শুক্র." + LOCALE_SABBREVDAYNAME6 "শনি." + LOCALE_SABBREVDAYNAME7 "রবি." + LOCALE_SABBREVLANGNAME "BNG" + LOCALE_SABBREVMONTHNAME1 "জানু." + LOCALE_SABBREVMONTHNAME2 "ফেব্রু." + LOCALE_SABBREVMONTHNAME3 "মার্চ" + LOCALE_SABBREVMONTHNAME4 "এপ্রিল" + LOCALE_SABBREVMONTHNAME5 "মে" + LOCALE_SABBREVMONTHNAME6 "জুন" + LOCALE_SABBREVMONTHNAME7 "জুলাই" + LOCALE_SABBREVMONTHNAME8 "আগ." + LOCALE_SABBREVMONTHNAME9 "সেপ্টে." + LOCALE_SABBREVMONTHNAME10 "অক্টো." + LOCALE_SABBREVMONTHNAME11 "নভে." + LOCALE_SABBREVMONTHNAME12 "ডিসে." + LOCALE_SABBREVMONTHNAME13 "" + LOCALE_SCOUNTRY "India" + LOCALE_SCURRENCY "₹" + LOCALE_SDATE "-" + LOCALE_SDAYNAME1 "সোমবার" + LOCALE_SDAYNAME2 "মঙ্গলবার" + LOCALE_SDAYNAME3 "বুধবার" + LOCALE_SDAYNAME4 "বৃহস্পতিবার" + LOCALE_SDAYNAME5 "শুক্রবার" + LOCALE_SDAYNAME6 "শনিবার" + LOCALE_SDAYNAME7 "রবিবার" + LOCALE_SDECIMAL "." + LOCALE_SENGCOUNTRY "India" + LOCALE_SENGCURRNAME "Indian Rupee" + LOCALE_SENGLANGUAGE "Bangla" + LOCALE_SGROUPING "3;2;0" + LOCALE_SINTLSYMBOL "INR" + LOCALE_SISO3166CTRYNAME "IN" + LOCALE_SISO639LANGNAME "bn" + LOCALE_SLANGUAGE "Bangla (India)" + LOCALE_SLIST "," + LOCALE_SLONGDATE "dd MMMM yyyy" + LOCALE_SMONDECIMALSEP "." + LOCALE_SMONGROUPING "3;2;0" + LOCALE_SMONTHNAME1 "জানুয়ারী" + LOCALE_SMONTHNAME2 "ফেব্রুয়ারী" + LOCALE_SMONTHNAME3 "মার্চ" + LOCALE_SMONTHNAME4 "এপ্রিল" + LOCALE_SMONTHNAME5 "মে" + LOCALE_SMONTHNAME6 "জুন" + LOCALE_SMONTHNAME7 "জুলাই" + LOCALE_SMONTHNAME8 "আগস্ট" + LOCALE_SMONTHNAME9 "সেপ্টেম্বর" + LOCALE_SMONTHNAME10 "অক্টোবর" + LOCALE_SMONTHNAME11 "নভেম্বর" + LOCALE_SMONTHNAME12 "ডিসেম্বর" + LOCALE_SMONTHNAME13 "" + LOCALE_SMONTHOUSANDSEP "," + LOCALE_SNAME "bn-IN" + LOCALE_SNAN "NaN" + LOCALE_SNATIVECTRYNAME "ভারত" + LOCALE_SNATIVECURRNAME "টাকা" + LOCALE_SNATIVEDIGITS "০১২৩৪৫৬৭৮৯" + LOCALE_SNATIVEDISPLAYNAME "বাংলা (ভারত)" + LOCALE_SNATIVELANGNAME "বাংলা" + LOCALE_SNEGATIVESIGN "-" + LOCALE_SOPENTYPELANGUAGETAG "BEN " + LOCALE_SPOSITIVESIGN "" + LOCALE_SSCRIPTS "Beng;" + LOCALE_SPARENT "bn" + LOCALE_SSHORTDATE "dd-MM-yy" + LOCALE_SSHORTESTDAYNAME1 "স" + LOCALE_SSHORTESTDAYNAME2 "ম" + LOCALE_SSHORTESTDAYNAME3 "বু" + LOCALE_SSHORTESTDAYNAME4 "বৃ" + LOCALE_SSHORTESTDAYNAME5 "শু" + LOCALE_SSHORTESTDAYNAME6 "শ" + LOCALE_SSHORTESTDAYNAME7 "র" + LOCALE_SSHORTTIME "HH.mm" + LOCALE_SSORTNAME "Default" + LOCALE_STHOUSAND "," + LOCALE_STIME "." + LOCALE_STIMEFORMAT "HH.mm.ss" + LOCALE_SYEARMONTH "MMMM, yyyy" + + LGRPID_WESTERN_EUROPE+LGRPID_RES_BASE "Western Europe and United States" + LGRPID_CENTRAL_EUROPE+LGRPID_RES_BASE "Central Europe" + LGRPID_BALTIC+LGRPID_RES_BASE "Baltic" + LGRPID_GREEK+LGRPID_RES_BASE "Greek" + LGRPID_CYRILLIC+LGRPID_RES_BASE "Cyrillic" + LGRPID_TURKISH+LGRPID_RES_BASE "Turkic" + LGRPID_JAPANESE+LGRPID_RES_BASE "Japanese" + LGRPID_KOREAN+LGRPID_RES_BASE "Korean" + LGRPID_TRADITIONAL_CHINESE+LGRPID_RES_BASE "Traditional Chinese" + LGRPID_SIMPLIFIED_CHINESE+LGRPID_RES_BASE "Simplified Chinese" + LGRPID_THAI+LGRPID_RES_BASE "Thai" + LGRPID_HEBREW+LGRPID_RES_BASE "Hebrew" + LGRPID_ARABIC+LGRPID_RES_BASE "Arabic" + LGRPID_VIETNAMESE+LGRPID_RES_BASE "Vietnamese" + LGRPID_INDIC+LGRPID_RES_BASE "Indic" + LGRPID_GEORGIAN+LGRPID_RES_BASE "Georgian" + LGRPID_ARMENIAN+LGRPID_RES_BASE "Armenian" +} diff --git a/samples/INI/en-us.nls b/samples/INI/en-us.nls new file mode 100644 index 0000000000..44164ce3cb --- /dev/null +++ b/samples/INI/en-us.nls @@ -0,0 +1,73 @@ +[ID] +; Идентификатор какой это язык +Lang=en-US +DisplayName=English (United States) +Author=Параметры +Version=1.0 + +[Application] +Title=SimpleEdit +NewDocument=New +StatusBarTemplate={path}{modified} ({size} bytes) +AboutDescription=(c) Параметры 2025\n\nA simple text editor made with Python. Inspired by a Windows Notepad from Windows 95 +Close=Close + +[Menu.File] +Label=File +New=New +Open=Open... +Save=Save +SaveAs=Save As... +Exit=Exit + +[Menu.Edit] +Label=Edit +Undo=Undo +Redo=Redo +Cut=Cut +Copy=Copy +Paste=Paste +Delete=Delete +SelectAll=Select All +InsertTime=Insert Time and Date + +[Menu.View] +Label=View +ShowToolbar=Show Toolbar +ShowStatusbar=Show Status Bar +WordWrap=Word Wrap + +[Menu.Search] +Label=Search +Find=Find +FindNext=Find Next +Replace=Replace + +[Menu.Help] +Label=Help +Help=Help +About=About + +[Dialog] +UnsavedTitle=Unsaved changes +UnsavedMessage=You have unsaved changes. Do you want to save them? +ReplaceTitle=Replace Text +FindLabel=Find: +ReplaceLabel=Replace with: +ReplaceButton=Replace + +[Error] +General=Error +FileOpenError=Could not open file:\n{error} +FileSaveError=Could not save file:\n{error} +HelpNotFound=Help file not found. Please make sure 'help.rtf' exists +SearchEnd=Reached end. Continue from beginning? +SearchRestart=Reached the end of the document. Continue from the beginning? + +[ContextMenu] +Undo=Undo +Cut=Cut +Copy=Copy +Paste=Paste +Delete=Delete +SelectAll=Select All \ No newline at end of file diff --git a/samples/INI/j9bcv.nls b/samples/INI/j9bcv.nls new file mode 100644 index 0000000000..d473c33835 --- /dev/null +++ b/samples/INI/j9bcv.nls @@ -0,0 +1,440 @@ +# +# Copyright (c) 2000, 2020 IBM Corp. and others +# +# This program and the accompanying materials are made available under +# the terms of the Eclipse Public License 2.0 which accompanies this +# distribution and is available at https://www.eclipse.org/legal/epl-2.0/ +# or the Apache License, Version 2.0 which accompanies this distribution and +# is available at https://www.apache.org/licenses/LICENSE-2.0. +# +# This Source Code may also be made available under the following +# Secondary Licenses when the conditions for such availability set +# forth in the Eclipse Public License, v. 2.0 are satisfied: GNU +# General Public License, version 2 with the GNU Classpath +# Exception [1] and GNU General Public License, version 2 with the +# OpenJDK Assembly Exception [2]. +# +# [1] https://www.gnu.org/software/classpath/license.html +# [2] http://openjdk.java.net/legal/assembly-exception.html +# +# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception +# + +# Externalised messages for the Bytecode Verification errors. +# +# Note to developers: +# +# New messages MUST be added at the end of this file. +# DO NOT delete messages from this file, as it will change their indices. +# If you wish to remove a message, delete its text, but leave the key in place +# +# Note to translators: +# +# This file uses printf style substitutions. Sequences such as %s, %.*s, %10d +# etc. will be substituted at runtime. The special case of %% is not a substitution. +# It indicates a single percent sign. Please do not modify the format specifiers, or +# change their order. For instance, in a message like "from %d to %s", %d +# MUST appear before %s in any translated message, or a run-time crash +# could occur. This is a known limitation of the product. +# +# Every NLS message needs to have the following information provided: +# +# J9NLS_BCV_SAMPLE_MESSAGE=This is a sample message that takes two parameters parameter 1 is a string %1$s parameter 2 is a number %2$d +# J9NLS_BCV_SAMPLE_MESSAGE.sample_input_1=string parameter +# J9NLS_BCV_SAMPLE_MESSAGE.sample_input_2=2 +# J9NLS_BCV_SAMPLE_MESSAGE.explanation=Explanation for what the message means +# J9NLS_BCV_SAMPLE_MESSAGE.system_action=What will the JVM or more generally the system do when this message is output +# J9NLS_BCV_SAMPLE_MESSAGE.user_response=What should the user do when seeing this message +# +# NLS_ENCODING=UNICODE +# NLS_MESSAGEFORMAT_NONE +# + +J9NLS.MODULE=VRFY +J9NLS.HEADER=j9bcvnls.h + +#Example: JVMCRFY114; class=Foo, method=main([Ljava/lang/String;)V, pc=5 +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC=%1$s; class=%3$.*2$s, method=%5$.*4$s%7$.*6$s, pc=%8$u +# START NON-TRANSLATABLE +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_1=JVMCRFY114; +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_2=3 +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_3=Foo +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_4=4 +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_5=main +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_6=22 +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_7=([Ljava/lang/String;)V +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.sample_input_8=5 + +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.explanation=NOTAG +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.system_action= +J9NLS_BCV_ERROR_TEMPLATE_WITH_PC.user_response= + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERROR_TEMPLATE_NO_PC=%1$s; class=%3$.*2$s, method=%5$.*4$s%7$.*6$s +# START NON-TRANSLATABLE +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_1=JVMCRFY114; +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_2=3 +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_3=Foo +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_4=4 +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_5=main +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_6=22 +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.sample_input_7=([Ljava/lang/String;)V + +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.explanation=NOTAG +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.system_action= +J9NLS_BCV_ERROR_TEMPLATE_NO_PC.user_response= + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BYTECODES_INVALID=bytecode sequence invalid +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BYTECODES_INVALID.explanation=An undefined bytecode was encountered in the classfile +J9NLS_BCV_ERR_BYTECODES_INVALID.system_action=The JVM will throw a VerifyError +J9NLS_BCV_ERR_BYTECODES_INVALID.user_response=Contact the provider of the classfile for a corrected version + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_NO_PRE_VERIFY_DATA=class does not contain pre-verify data +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_NO_PRE_VERIFY_DATA.explanation=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_NO_PRE_VERIFY_DATA.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_NO_PRE_VERIFY_DATA.user_response=None required + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_TOO_MANY_JSRS=jsr inlining encountered too many jsrs +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_TOO_MANY_JSRS.explanation=The classfile contains too many 'jsr' bytecodes and cannot be loaded +J9NLS_BCV_ERR_TOO_MANY_JSRS.system_action=The JVM will throw a VerifyError +J9NLS_BCV_ERR_TOO_MANY_JSRS.user_response=Contact the provider of the classfile for a corrected version. The 'jsr' bytecode has effectively been deprecated. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_TEMP_NOT_COMPATIBLE=local not type compatible +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_TEMP_NOT_COMPATIBLE.explanation=None +J9NLS_BCV_ERR_TEMP_NOT_COMPATIBLE.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_TEMP_NOT_COMPATIBLE.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARRAY_SIZE_NOT_INTEGER=new array size not integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARRAY_SIZE_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_ARRAY_SIZE_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_ARRAY_SIZE_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_FINAL_METHOD_OVERRIDE=final method overridden +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_FINAL_METHOD_OVERRIDE.explanation=The class redefines a method that has been marked 'final' in a super class +J9NLS_BCV_ERR_FINAL_METHOD_OVERRIDE.system_action=The JVM will throw a VerifyError +J9NLS_BCV_ERR_FINAL_METHOD_OVERRIDE.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARRAY_INDEX_NOT_INTEGER=array index not integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARRAY_INDEX_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_ARRAY_INDEX_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_ARRAY_INDEX_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARRAY_TYPE_MISMATCH=array not type compatible +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARRAY_TYPE_MISMATCH.explanation=Verification failed due to an incorrect 'anewarray' bytecode +J9NLS_BCV_ERR_ARRAY_TYPE_MISMATCH.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_ARRAY_TYPE_MISMATCH.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_MULTIPLE_JSR=multiple jsrs use single return +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_MULTIPLE_JSR.explanation=Verification failed due to multiple 'jsr' bytecodes using the same 'ret' instruction. +J9NLS_BCV_ERR_MULTIPLE_JSR.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_MULTIPLE_JSR.user_response=Contact the provider of the classfile for a corrected version. The 'jsr' bytecode has effectively been deprecated. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_LOOKUPSWITCH_NOT_INTEGER=lookupswitch parameter not integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_LOOKUPSWITCH_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_LOOKUPSWITCH_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_LOOKUPSWITCH_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_INCONSISTENT_STACK=stack shape inconsistent +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_INCONSISTENT_STACK.explanation=Verification failed as the stack shape is inconsistent at a merge point +J9NLS_BCV_ERR_INCONSISTENT_STACK.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_INCONSISTENT_STACK.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_CLASSLOADING_CONSTRAINT=class loading constraint violated +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_CLASSLOADING_CONSTRAINT.explanation=A classloader has visibility to two different instances of the same class. +J9NLS_BCV_ERR_CLASSLOADING_CONSTRAINT.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_CLASSLOADING_CONSTRAINT.user_response=Adjust the class loading process of the application to ensure each classloader only has visibility to one instance of the class. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_RETURN_INCOMPATIBLE=return bytecode incompatible with return type +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_RETURN_INCOMPATIBLE.explanation=None +J9NLS_BCV_ERR_RETURN_INCOMPATIBLE.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_RETURN_INCOMPATIBLE.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_MULTIPLE_RET=multiple returns to single jsr +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_MULTIPLE_RET.explanation=Verification failed as multiple 'ret' bytecodes can return to the same 'jsr' bytecode +J9NLS_BCV_ERR_MULTIPLE_RET.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_MULTIPLE_RET.user_response=Contact the provider of the classfile for a corrected version. The 'jsr' bytecode has effectively been deprecated. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_SHIFT_NOT_INTEGER=shift bytecode parameter not integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_SHIFT_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_SHIFT_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_SHIFT_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_INIT_NOT_CALL_INIT= does not call this or super +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_INIT_NOT_CALL_INIT.explanation=Every method must either call a sibling constructor or a super constructor method to ensure all constructor methods in the superclass chain have been called. +J9NLS_BCV_ERR_INIT_NOT_CALL_INIT.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_INIT_NOT_CALL_INIT.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_STACK_OVERFLOW=max stack exceeded +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_STACK_OVERFLOW.explanation=Verification failed as the bytecodes use more stack space then the method declares +J9NLS_BCV_ERR_STACK_OVERFLOW.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_STACK_OVERFLOW.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_CLASS_LOAD_FAILED=class load failed +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_CLASS_LOAD_FAILED.explanation=Verification failed as a required class was not found. +J9NLS_BCV_ERR_CLASS_LOAD_FAILED.system_action=The JVM will prevent this from loading. +J9NLS_BCV_ERR_CLASS_LOAD_FAILED.user_response=Ensure that all required classfiles are accessible by the classloader. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARGS_NOT_COMPATIBLE=invoke arguments not type compatible +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARGS_NOT_COMPATIBLE.explanation=None +J9NLS_BCV_ERR_ARGS_NOT_COMPATIBLE.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_ARGS_NOT_COMPATIBLE.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_NOT_THROWABLE=thrown object not throwable +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_NOT_THROWABLE.explanation=Verification failed as an 'athrow' bytecode attempted to throw something that is not a subclass of java.lang.Throwable. +J9NLS_BCV_ERR_NOT_THROWABLE.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_NOT_THROWABLE.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_UNEXPECTED_SUBROUTINE_NOT_WALKED=subroutines must be re-walked for each jsr +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_UNEXPECTED_SUBROUTINE_NOT_WALKED.explanation=None +J9NLS_BCV_ERR_UNEXPECTED_SUBROUTINE_NOT_WALKED.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_UNEXPECTED_SUBROUTINE_NOT_WALKED.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_TABLESWITCH_NOT_INTEGER=tableswitch parameter not integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_TABLESWITCH_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_TABLESWITCH_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_TABLESWITCH_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARGUMENTS_INCOMPATIBLE=arguments are not type compatible +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARGUMENTS_INCOMPATIBLE.explanation=Verification failed as the arguments to the method have the wrong type, or too many, or too few arguments were passed. +J9NLS_BCV_ERR_ARGUMENTS_INCOMPATIBLE.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_ARGUMENTS_INCOMPATIBLE.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BAD_ACCESS_PROTECTED=bad access to protected data +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BAD_ACCESS_PROTECTED.explanation=Verification failed due to bytecodes trying to access a protected field or method from outside the defining package. +J9NLS_BCV_ERR_BAD_ACCESS_PROTECTED.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_BAD_ACCESS_PROTECTED.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_UNEXPECTED_EOF=unexpected EOF +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_UNEXPECTED_EOF.explanation=Verification failed due to truncated data, such as a method, in the classfile. +J9NLS_BCV_ERR_UNEXPECTED_EOF.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_UNEXPECTED_EOF.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_RECEIVER_NOT_COMPATIBLE=receiver is incompatible with declaring class +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_RECEIVER_NOT_COMPATIBLE.explanation=Verification failed as the receiver of the method is incompatible with the class declaring the method. +J9NLS_BCV_ERR_RECEIVER_NOT_COMPATIBLE.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_RECEIVER_NOT_COMPATIBLE.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_ARRAY_DIMENSION_MISMATCH=bad dimension +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_ARRAY_DIMENSION_MISMATCH.explanation=Verification failed due to a malformed 'multianewarray' bytecode. +J9NLS_BCV_ERR_ARRAY_DIMENSION_MISMATCH.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_ARRAY_DIMENSION_MISMATCH.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_TEMP_NOT_RET_ADDRESS=invalid returnAddress for ret instruction +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_TEMP_NOT_RET_ADDRESS.explanation=Verification failed as a 'ret' bytecode attempted to use an invalid value as a 'returnAddress'. +J9NLS_BCV_ERR_TEMP_NOT_RET_ADDRESS.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_TEMP_NOT_RET_ADDRESS.user_response=Contact the provider of the classfile for a corrected version. The 'jsr' bytecode has effectively been deprecated. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BAD_TYPE_ON_STACK=bad type on stack +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BAD_TYPE_ON_STACK.explanation=None +J9NLS_BCV_ERR_BAD_TYPE_ON_STACK.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_BAD_TYPE_ON_STACK.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_IINC_NOT_INTEGER=attempt to iinc non integer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_IINC_NOT_INTEGER.explanation=None +J9NLS_BCV_ERR_IINC_NOT_INTEGER.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_IINC_NOT_INTEGER.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BAD_INIT=bad receiver for +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BAD_INIT.explanation=An method may only be invoked on an uninitialized value. Verification failed as the receiver is either initialized or a primitive. +J9NLS_BCV_ERR_BAD_INIT.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_BAD_INIT.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_FIELD_TYPE_INCOMPATIBLE=field not type compatible +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_FIELD_TYPE_INCOMPATIBLE.explanation=None +J9NLS_BCV_ERR_FIELD_TYPE_INCOMPATIBLE.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_FIELD_TYPE_INCOMPATIBLE.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BAD_BRANCH=target PC invalid +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BAD_BRANCH.explanation=None +J9NLS_BCV_ERR_BAD_BRANCH.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_BAD_BRANCH.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_NO_ERROR=no error +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_NO_ERROR.explanation=None +J9NLS_BCV_ERR_NO_ERROR.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_NO_ERROR.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_STACK_UNDERFLOW=stack underflow +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_STACK_UNDERFLOW.explanation=Verification failed as the bytecodes attempt to pop more items from the stack then there are on the stack. +J9NLS_BCV_ERR_STACK_UNDERFLOW.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_STACK_UNDERFLOW.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BRANCH_WITH_INIT=uninitialized object during backwards branch +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BRANCH_WITH_INIT.explanation=None +J9NLS_BCV_ERR_BRANCH_WITH_INIT.system_action=THIS MESSAGE IS RESERVED FOR FUTURE USE +J9NLS_BCV_ERR_BRANCH_WITH_INIT.user_response=None + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BAD_INVOKESPECIAL=invokespecial on invalid target +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BAD_INVOKESPECIAL.explanation=Verification failed due to an invalid invokespecial instruction. +J9NLS_BCV_ERR_BAD_INVOKESPECIAL.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_BAD_INVOKESPECIAL.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BC_UNKNOWN=unknown bytecode +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BC_UNKNOWN.explanation=An undefined bytecode was encountered in the classfile. +J9NLS_BCV_ERR_BC_UNKNOWN.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_BC_UNKNOWN.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_VERIFY_OUT_OF_MEMORY=verifier unable to allocate native memory +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_VERIFY_OUT_OF_MEMORY.explanation=A native memory request failed during verification. +J9NLS_BCV_ERR_VERIFY_OUT_OF_MEMORY.system_action=The JVM will throw a java.lang.OutOfMemoryError. +J9NLS_BCV_ERR_VERIFY_OUT_OF_MEMORY.user_response=Ensure the system has sufficient memory to satisfy all native allocations. + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_WRONG_INIT_METHOD=invokespecial of wrong initializer +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_WRONG_INIT_METHOD.explanation=An 'invokespecial' bytecode targets an method of the wrong class for the uninitialized object being constructed. +J9NLS_BCV_ERR_WRONG_INIT_METHOD.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_WRONG_INIT_METHOD.user_response=Contact the provider of the classfile for a corrected version. +# END NON-TRANSLATABLE + +#Example: JVMVRFY012; class=Foo, method=main([Ljava/lang/String;)V, pc=5; Type Mismatch, argument 0 in signature Foo."":(Ljava/lang/String;)V does not match +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH=%1$s; class=%3$.*2$s, method=%5$.*4$s%7$.*6$s, pc=%8$u; Type Mismatch, argument %9$d in signature %11$.*10$s.%13$.*12$s:%15$.*14$s does not match +# START NON-TRANSLATABLE +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_1=JVMVRFY012; +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_2=3 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_3=Foo +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_4=4 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_5=main +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_6=22 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_7=([Ljava/lang/String;)V +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_8=5 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_9=0 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_10=3 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_11=Foo +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_12=6 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_13= +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_14=22 +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.sample_input_15=([Ljava/lang/String;)V + +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.explanation=NOTAG +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.system_action= +J9NLS_BCV_ERROR_TEMPLATE_TYPE_MISMATCH.user_response= + +# END NON-TRANSLATABLE + +J9NLS_BCV_ERR_BC_NEW_ARRAY=new bytecode cannot create arrays +# START NON-TRANSLATABLE +J9NLS_BCV_ERR_BC_NEW_ARRAY.explanation=Verification failed due to an incorrect 'new' bytecode +J9NLS_BCV_ERR_BC_NEW_ARRAY.system_action=The JVM will throw a verification or classloading related exception such as java.lang.VerifyError. +J9NLS_BCV_ERR_BC_NEW_ARRAY.user_response=Contact the provider of the classfile for a corrected version. + +# END NON-TRANSLATABLE diff --git a/samples/NetLogo/0_init.nls b/samples/NetLogo/0_init.nls new file mode 100644 index 0000000000..5472bbe497 --- /dev/null +++ b/samples/NetLogo/0_init.nls @@ -0,0 +1,204 @@ +extensions [ gis profiler nw csv ] + +breed [ bands band ] +breed [ volcanoes volcano ] + +globals [ + year + + ; start: GIS globals used for loading in map data + europe-landmass ; visualize the continent + europe-altitude ; altitude + europe-grid ; overlay a grid with graticules of 10 + europe-tri ; terrain roughness index + + ; mean precipitation GIS + europe_prec_djf ; DJF: December, January, February + europe_prec_mam ; MAM: March, April, May + europe_prec_jja ; JJA: June, July, August + europe_prec_son ; September, October, November + + ; mean temperature GIS + europe_temp_djf + europe_temp_mam + europe_temp_jja + europe_temp_son + europe_temp_range ; Annual Temeprature Range + ; end: GIS globals + + ; standard deviation of temperature + sd_temp_djf + sd_temp_mam + sd_temp_jja + sd_temp_son + ; standard deviation of precipitation + sd_prec_djf + sd_prec_mam + sd_prec_jja + sd_prec_son + + ;the list of ch4 levels in Greenland and Antarctica + GISP2_climate_trend + + ;A set of patches that are not water + land_patches + + ;The thresholds from which bands start sharing knowledge + technology_sharing_threshold + first_threshold_connection + second_threshold_connection + fourth_threshold_connection + + ;Keeps track of the current season which is based on ticks and will make sure the right data is used + current_season + + ;The number of days that bands can spend in total, always set to 90 (3 months) + time_available + + + ; climate change + temp_change + prec_change + sd_temp_change + sd_prec_change + + + ; global variables keeping track of statistics in the model (KPI's) + total_movement + + ; impacted_bands + + ; connectedness + unique_communities + agentset_unique_communities + ; number_links + + + ;; Compound Events KPI's + ;; - environment + average_temperature_of_patches + average_precipitation_of_patches + ;; - volcano impact + impact_by_ash + death_by_volcano + death_by_ash + event_cultural_capital_loss + lost_resources + ;; - patch availability + average_food_available + average_resources_available + ;; Connectedness + number_of_communities + average_community_size + number_of_links + ;; Band characteristics + average_knowledge_locations + average_cultural_capital + average_technology_level + average_time_spent_moving + ;; Population + mean_group_size + total_number_of_bands + total_population + extinct_bands + +] + +bands-own [ + group_size + + food_needed + resources_needed + food_owned + resources_owned + + effectiveness + cultural_capital + technology_level + initial_mobility + mobility + + death_rate + health + + ;if bands decide to split, mother is used to copy the links of the old complete band + mother + + ;Keeps track of the knowledge on locations per season + known_locations_summer + known_locations_fall + known_locations_winter + known_locations_spring + known_locations_current + count_known_locations_current + + + ;Keeps track of the current and previous home location, to be able to calculate the time needed to move from the "previous home" to the potential new home + current_home_location + previous_home_location + + + ;Keeps track of how much time is spent on what activity + time_spent + time_spent_exploring + time_spent_moving + time_spent_gathering + + event_impact? + + ;Keeps track of the communities that the bands belongs to + community + community_name + community_size +] + +links-own [ + strength_of_connection + updated? +] + +patches-own [ + max_food + max_resources + food_available + resources_available + altitude + ruggedness_index + landmass + + prec_djf + prec_mam + prec_jja + prec_son + prec_year + average_prec + prec_current + min_temperature + max_temperature + + temp_djf + temp_mam + temp_jja + temp_son + temp_range + temp_year + average_temp + temp_current + min_precipitation + max_precipitation + + temp_deviation + prec_deviation + + ; compound event impact + volcano_impact? + ash_impact? + ash_fall +] + +to debug [string] + ; small function for debugging + if debug? [ + print string + ] +end \ No newline at end of file diff --git a/samples/NetLogo/config-reader.nls b/samples/NetLogo/config-reader.nls new file mode 100644 index 0000000000..06a6d6167f --- /dev/null +++ b/samples/NetLogo/config-reader.nls @@ -0,0 +1,265 @@ +;; SWILT WP 3 simple fab simulation - functions & definitions for reading config files +;; ----------------------------------------------------------------------------------- +;; + +extensions [ + csv ; extension for working with CSV file format + table ; extension for working with tables +] + + + +globals [ ; for values see config-init function + + config_dir ; directory for config files + + mfile ; keyword "MFILE " for machine config file name + rfile ; keyword "RFILE " for recipe config file name + lfile ; keyword "LFLIE " for lot config file name + + mfile_fname ; machine config file name + rfile_fname ; recipe config file name + lfile_fname ; lot config file name + + sim_config ; list of lists from meta-config file = file names of machines, recipes, lots + machine_config ; list of lists of machines from MFILE + recipe_config ; list of lists of recipes from RFILE + lot_config ; list of lists of lots from LFILE + + TABLE_M ; tables for data: TABLE_M = table of machines + TABLE_R ; TABLE_R = table of recipes + TABLE_L ; TABLE_L = table of lots +] + + + +;;; define prefixes and filename of meta-configfile here +;; +;; @result sets config_fname, mfile, rfile, lfile +;; +to config-init + + if config_fname = "" [ set config_fname "config_simu.txt" ] ; default setting + + set config_dir "config-files" ; directory for config files, relative to .nlogo + + set mfile "MFILE " ; keywords for filenames of sub-configfiles + set rfile "RFILE " + set lfile "LFILE " + +end + + + +;;; read the meta-configfile to determine the filenames of the config files for +;; recipes (RFILE), lots (LFILE), and machines (MFILE), parse them and do a +;; consistency check +;; +;; @input globals config_dir, config_fname, mfile, rfile, lfile + the actual config files +;; @result sets mfile_fname, rfile_fname, lfile_fname +;; +to read-sim-config + + print "Reading config..." + + config-init + + set sim_config csv:from-file (word config_dir "/" config_fname) ; reads CSV file (list of lists) + + foreach sim_config [ x -> ; remove header/all lines starting with ";;" + if member? ";;" (reduce word x) [ set sim_config remove-item (position x sim_config) sim_config ] + ] + + foreach sim_config [ x -> + if (member? mfile (reduce word x)) [ set mfile_fname remove mfile (reduce word x) ] ; read machine config file+dir + if member? rfile (reduce word x) [ set rfile_fname remove rfile (reduce word x) ] ; read recipe config file+dir + if member? lfile (reduce word x) [ set lfile_fname remove lfile (reduce word x) ] ; read lot config file+dir + ] + + parse-machine-config + parse-recipe-config + parse-lot-config + + consistency-check + +end + + + +;;; consistency check if number of recipes consistent across TABLE_R/RFILE + TABLE_L/LFILE +;; check if needed machines listed in recipes in TABLE_R/RFILE exist in TABLE_M/MFILE +;; +;; @input globals TABLE_R, TABLE_L, TABLE_M +;; @result stops program if inconsistencies detected +;; +to consistency-check + ;;number of recipes N in TABLE_R must equal recipe number RN in TABLE_L + ifelse (table:length TABLE_R = table:length TABLE_L) [ if DEBUG? [ print " All lots have their recipes." ] ] + [ user-message "The number of recipes in recipe config and lot config is not equal!" stop] + + ;;list of requested PIDs in RFILE must have corresponding machines in MFILE + let needed_machines reduce sentence table:values TABLE_R ; flat list of all needed machines from all recipes (incl duplicates) + set needed_machines remove-duplicates needed_machines ; without duplicates + let available_machines table:keys TABLE_M ; flat list of all machine ids + + foreach needed_machines [ m -> + ifelse (member? m available_machines) [ if DEBUG? [ print (word " Necessary machine " m " available." ) ] ] + [ user-message (word "Missing PID >> " m " << in MFILE!") stop] + ] + print "Consistency checks passed..." ; only reaches this if ok +end + + + +;;; read and parse the LOT config file LFILE +;; assumes ;; = comment line +;; reads as many lines as in the file +;; +;; ATTN: no consistency checks yet. assumes file is correct and there exist +;; recipe definitions for every recipe number +;; with RN=0...(NOR-1) from RFILE +;; +;; @input globals config_dir, lfile_fname +;; @result TABLE_L: [ [ 0 50 ] [ 1 30 ] ... ] +;; keys = 0...(NOR-1) = recipe number +;; values = number of lots for that RN +;; +to parse-lot-config + + if DEBUG? [print (word "*** LFILE: " lfile_fname) ] + + set lot_config (csv:from-file (word config_dir "/" lfile_fname) " ") ; use " " as delimiter -> returns a list of lists + ; with 1 list per line with 1 list element per column + set TABLE_L table:make ; table for resulting machines + let curr_lot_rn 0 ; RN=PID becomes table key, 0...no lot definition read yet + let curr_lot_nol 0 ; number of lots (NOL) to produce of this type + + foreach lot_config [ line -> + ifelse item 0 line = ";;" [ ; --- comment line, ignore for now TODO: maybe parse later + + if DEBUG? [ print line ] + + ] [ ; --- new lot definition + set curr_lot_rn (item 0 line) ; recipe number = product type (!= PID), starts at 0 in file + set curr_lot_nol (item 1 line) ; number of lots + table:put TABLE_L curr_lot_rn curr_lot_nol + ] + ] + + if DEBUG? [ print (word "TABLE_L: " TABLE_L)] + +end + + + +;;; read and parse the MACHINE config file MFILE +;; assumes ;; = comment line +;; assumes cols = [ PID BS WT NOM TIME ] +;; PID ... process ID of machine = machine type from Excel +;; BS ... batch size +;; WT ... waiting time [h] for batch to fill up (if BS > 1) +;; NOM ... number of machines +;; TIME... time [h] the machine takes to run this process, +;; one decimal place; 0.1 h = 6 min -> 1 tick in TABLE_M +;; +;; TODO: type for TIME format and possibility to encode different distributions +;; planned as PID BS WT TIME_T (type) TIME_1 TIME_2 +;; with TIME_T = F...fixed, N...normal distri, U...uniform, etc +;; +;; ATTN: doesn't check if PIDs are unique; if same PID occurs twice in file +;; then later entries will overwrite existing lines; iow last line will be used +;; +;; ATTN: doesn't check if PIDs are in valid range +;; +;; @input globals config_dir, mfile_fname +;; @result TABLE_M: [ [ 1 [2 0.5 1 7] ] [ 2 [1 0 2 12] ] ... ] +;; keys = PID 1...10, 20 +;; values = [BS WT NOM TIME] +;; TIME ... in ticks, 0.1 h = 6 min = 1 tick +;; +to parse-machine-config + + if DEBUG? [print (word "*** MFILE: " mfile_fname) ] + + set machine_config (csv:from-file (word config_dir "/" mfile_fname) " ") ; use " " as delimiter -> returns a list of lists + ; with 1 list per line with 1 list element per column + set TABLE_M table:make ; table for resulting machines + let curr_machine_pid 0 ; PID becomes table key, 0...no machine read yet + let curr_machine_values [] ; list of [BS WT NOM TIME] = value + + foreach machine_config [ line -> + ifelse item 0 line = ";;" [ ; --- comment line, ignore for now TODO: maybe parse later + + if DEBUG? [ print line ] + + ] [ ; --- new machine definition + set curr_machine_pid (item 0 line) ; PID + set curr_machine_values (but-first line) ; [BS WT NOM TIME] + ; convert TIME hrs to ticks and replace time val in list + let nr_ticks round ((last curr_machine_values) * 10) ; 0.1 h = 1 tick, round off if more decimal places + let time_pos length curr_machine_values - 1 ; position of time value in list = last + set curr_machine_values replace-item time_pos curr_machine_values nr_ticks + + set nr_ticks round ((item 1 curr_machine_values) * 10) ; convert WT hrs to ticks and replace WT val in list + let wt_pos 1 ; position of WT value in list = 1 + set curr_machine_values replace-item wt_pos curr_machine_values nr_ticks + + table:put TABLE_M curr_machine_pid curr_machine_values + ] + ] + + if DEBUG? [ print (word "TABLE_M: " TABLE_M)] +end + + + +;;; read and parse the RECIPE config file RFILE +;; assumes ;; = comment line +;; assumes separator = # (hardcoded) +;; reads as many recipes as in the file (don't parse NOR value yet) +;; assumes lines not starting with ;; or # have a recipe step in the first col +;; +;; ATTN: doesn't check validity of PID range (1...10, 20) +;; +;; ATTN: assumes a # as the start of each recipe, therefore: +;; MUST HAVE a # before the start of each recipe (even the first one) +;; MUST HAVE a # after the last recipe +;; +;; @input globals config_dir, rfile_fname +;; @result TABLE_R: [ [ 0 [5 2 9 ...] ] [ 1 [3 9 2 ...] ... ] +;; keys = 0...n = recipe number = product type +;; values = list of recipe steps / process steps (PID nrs from Excel file) +;; +to parse-recipe-config + + if DEBUG? [print (word "*** RFILE: " rfile_fname) ] + + set recipe_config (csv:from-file (word config_dir "/" rfile_fname) " ") ; use " " as delimiter -> returns a list of lists + ; with 1 list per line with 1 list element per column + set TABLE_R table:make ; table for resulting recipes + ; values = list with recipe steps + let recipe_counter -1 ; no recipes yet, first recipe will be 0 + let curr_recipe_list [] ; list for the current recipe + + foreach recipe_config [ line -> + ifelse item 0 line = ";;" [ ; --- comment line, ignore for now TODO: maybe parse later + + if DEBUG? [ print line ] + + ] [ ifelse item 0 line = "#" [ ; --- separator between recipes + + if recipe_counter > -1 [ ; we already read a recipe (ie. not the first # in file) -> save + table:put TABLE_R recipe_counter curr_recipe_list ; key = recipe no (0,1,...), value = [step1 step2 ...] + ] + set recipe_counter recipe_counter + 1 ; generate a new key + set curr_recipe_list [] ; start new blank recipe + + ] [ ; --- new step in current recipe + set curr_recipe_list lput (item 0 line) curr_recipe_list + ] + ] + ] + + if DEBUG? [ print (word "TABLE_R: " TABLE_R)] +end + diff --git a/samples/NetLogo/nodes.nls b/samples/NetLogo/nodes.nls new file mode 100644 index 0000000000..f4da5dbc8d --- /dev/null +++ b/samples/NetLogo/nodes.nls @@ -0,0 +1,85 @@ + ;; Define the breed for nodes +breed [nodes node] +undirected-link-breed [ roads road ] + +; Define the variables for roads +roads-own [ + r-id ; ID of road + distance_to_destination ; Distance to the destination node + speed_limmit ; Speed limit of the road +] + +; Define the variables for nodes +nodes-own[ + n-id ; ID of node + n-xpos ; x-position of node + n-ypos ; y-position of node +] + +; Procedure to load the network from CSV files +to load-network + ;; Set the network context to nodes and roads + nw:set-context nodes roads + + ;; Load the node list from a CSV file + let csv-data csv:from-file "Data/node_list.csv" + + ;; Separate the header row from the data rows + let header-row first csv-data + let data-rows butfirst csv-data + + ;; Loop through the data rows and create nodes + foreach data-rows [ + row -> + create-nodes 1 [ + ;; Set the node's ID, x-position, and y-position + set n-id (item 0 row ) + set n-xpos item 1 row * max-pxcor + set n-ypos item 2 row * max-pycor + set shape "circle" + set size 0.6 + set color grey + setxy n-xpos n-ypos + ] + ] + + ;; Load the link list from a CSV file + set csv-data csv:from-file "Data/link_list.csv" + + ;; Separate the header row from the data rows + set header-row first csv-data + set data-rows butfirst csv-data + + ;; Loop through the data rows and create roads between nodes + foreach data-rows [ + row -> + let link-distance 0 + let t1 one-of nodes with [ n-id = item 1 row ] + let t2 one-of nodes with [ n-id = item 2 row ] + ifelse t1 != nobody and t2 != nobody [ + ;; Create a road between the two nodes and set its properties + ask t1 [ + set link-distance distance t2 + create-road-with t2 [ + set r-id item 0 row + set color gray + set thickness 0.1 + set distance_to_destination link-distance + let l-speed item 3 row + set speed_limmit 1.0 * 1.0 + if l-speed = "30 mph" [ + set speed_limmit 0.3 + set thickness 0.1 + ] + if l-speed = "20 mph" [ + set speed_limmit 0.2 * 1.0 + set thickness 0.1 + ] + + ] + ] + ][ + print " error in link or node data" + ] + ] +end \ No newline at end of file diff --git a/samples/NetLogo/output.nls b/samples/NetLogo/output.nls new file mode 100644 index 0000000000..ad36e1274b --- /dev/null +++ b/samples/NetLogo/output.nls @@ -0,0 +1,212 @@ + +;; ============================================ +;; OUTPUT +;; ============================================ + +to calculate-r0 + let new-infected nb-infected + let new-recovered nb-recovered + let currently-infected table:get populations "infected" + let currently-recovered table:get populations "recovered" + set nb-infected-previous (currently-infected + new-recovered - new-infected) ;; Number of infected people at the previous tick + let susceptible-t (N-people - currently-infected - currently-recovered) ;; Number of susceptibles now + ifelse nb-infected-previous < 10 + [ set beta-n 0 ] + [ set beta-n (new-infected / nb-infected-previous) ] ;; This is the average number of new secondary infections per infected this tick + + ifelse nb-infected-previous < 5 + [ set gamma 0 ] + [ set gamma (new-recovered / nb-infected-previous) ] ;; This is the average number of new recoveries per infected this tick + + if ((N-people - susceptible-t) != 0 and (susceptible-t != 0)) ;; Prevent from dividing by 0 + [ + ;; This is derived from integrating dI / dS = (beta*SI - gamma*I) / (-beta*SI) + ;; Assuming one infected individual introduced in the beginning, and hence counting I(0) as negligible, + ;; we get the relation + ;; N - gamma*ln(S(0)) / beta = S(t) - gamma*ln(S(t)) / beta, where N is the initial 'susceptible' population. + ;; Since N >> 1 + ;; Using this, we have R_0 = beta*N / gamma = N*ln(S(0)/S(t)) / (K-S(t)) + set r0 (ln (s0 / susceptible-t) / (N-people - susceptible-t)) + set r0 r0 * s0 + ] +end + +to current-rt + ifelse length table:keys infections > 0 + [ + let allinfections [] + foreach table:values infections [dd -> foreach dd [dd1 -> set allinfections lput dd1 allinfections]] + if length allinfections > 1 [ + set rtime mean allinfections + let spreaders length all-infections + set k0 ifelse-value rtime > 0 [(sum sublist reverse sort all-infections 0 (spreaders * 0.2)) / sum all-infections][0] + ] + ][set rtime 0] +end + +;; ========================== SUMMARY ========================== +;; These show in the output window and in the plots when we are running +;; in graphical mode. They have no effect in batch mode +;; ============================================================ + +to print-current-summary + let infected count turtles with [infected?] + let recovered count turtles with [cured?] + let propinf precision (infected / N-people) 3 + let proprec precision (recovered / N-people) 3 + let proprec2 precision (recovered / (infected + count turtles with [cured?])) 3 + output-print (word "Currently infected: " infected " (" precision (propinf * 100) 1 "% of population)" ) + output-print (word "Currently recovered: " recovered " (" precision (proprec * 100) 1 "% of population - " precision (proprec2 * 100) 1 "% of all infected)" ) + output-print (word "Current average R0: " precision rtime 2) +end + +to print-double-time + output-print (word "On day " ticks " cases doubled within: " (ticks - double-t) " days" ) +end + +to-report inc-rate + report table:get populations "infected" / cum-infected +end + +to plot-friends + set-current-plot "Degree distribution (log-log)" + let max-degree max [count friends] of turtles with [age > 12] + ;; for this plot, the axes are logarithmic, so we can't + ;; use "histogram-from"; we have to plot the points + ;; ourselves one at a time + plot-pen-reset + let degree 1 + while [degree <= max-degree] [ + let matches turtles with [age > 12 and count friends = degree] + if any? matches + [ plotxy log degree 10 + log (count matches) 10 ] + set degree degree + 1 + ] + + set-current-plot "Degree distribution" + set max-degree max [count friends] of turtles with [age > 12] + plot-pen-reset ;; erase what we plotted before + set-plot-x-range 1 (max-degree + 1) ;; + 1 to make room for the width of the last bar + histogram [count friends] of turtles with [age > 12] +end + +to plot-contacts + set-current-plot "Number of contacts per day of infected" + set-plot-x-range 0 50 + histogram [nm_contacts / (days_cont + 0.0000001)] of turtles with [my-state = "recovered"] +end + +to plot-age + set-current-plot "Age distribution" + let maxage max [age] of turtles + plot-pen-reset ;; erase what we plotted before + set-plot-x-range 1 (maxage + 1) ;; + 1 to make room for the width of the last bar + set-plot-pen-interval 5 + histogram [age] of turtles +end + +to plot-spreaders + set-current-plot "Infections per agent" + let max-spreading max all-infections + plot-pen-reset ;; erase what we plotted before + set-plot-x-range 1 (max-spreading + 1) ;; + 1 to make room for the width of the last bar + histogram all-infections +end + +to plot-inf + set-current-plot "Infection distribution (log-log)" + let max-degree max all-infections + plot-pen-reset + let degree 1 + while [degree <= max-degree] [ + let matches filter [i -> i = degree] all-infections + if length matches > 0 + [ plotxy log degree 10 + log (length matches) 10 + ] + set degree degree + 1 + ] +end + +to export-agents + file-open "glasgow_agents.csv" + ask turtles [file-print (word who "," age "," sex "," hhtype "," neigh)] + file-close +end + +;; ================================ OUTPUT FILES ==================================== + +;; These are produced only when we run in batch mode. We generate two output files: +;; one contains the final state of the simulation once the epidemic is over; +;; the other (suffix _ind) records the progression of the epidemic in a single run. + +;; ================================================================================== + +to print-final-summary + let deaths table:get populations "dead" + let recovered table:get populations "recovered" + let totalinf table:get populations "infected" + recovered + deaths + let totalinfpct precision ((totalinf / N-people) * 100) 3 + + ifelse behaviorspace-run-number = 0 [ + plot-spreaders + plot-inf + output-print " ================================ " + output-print (word "End of epidemic: day " ticks) + output-print (word "Total infected: " totalinfpct "% of population" ) + output-print (word "Total deaths: " deaths ". - Mortality rate: " precision ((deaths / totalinf) * 100) 2 "%") + output-print (word "Tests performed: " tests-performed) + let asy table:get cumulatives "asymptomatic" + let sym table:get cumulatives "symptomatic" + let sev table:get cumulatives "severe" + let all_cases sev + sym + asy + output-print (word "Ratio: hospital reported/community non-reported: " precision (( asy + sym) / sev ) 1 ) + output-print (word "Severe: " precision (100 * sev / all_cases) 1 "% " " Symptomatic: " precision (100 * sym / all_cases) 1 "% " " Asymptomatic: " precision (100 * asy / all_cases) 1 "% ") + let tot sum table:values counters + output-print (word "Infection sources: ") + foreach table:keys counters [ctr -> + output-type (word ctr ": " (precision (100 * table:get counters ctr / tot) 1) "% " ) + ] + ] + [ + let file-name word behaviorspace-experiment-name ".csv" + ifelse file-exists? file-name + [file-open file-name] + [ + file-open file-name + file-print "run,beta,lambda,prob-rnd-infection,f,pctApp,pctTest,lockdown,schools,compliance,SymPriority,deaths,propInfected,mortality,days,tests,household,relations,friends,school,random,work" + ] + let tot sum table:values counters + file-type (word + behaviorspace-run-number "," infection-chance "," lambda "," prob-rnd-infection "," per-dif-friends "," pct-with-tracing-app "," tests-per-100-people "," lockdown-at-first-death "," schools-open? "," app-compliance "," prioritize-symptomatics? "," + deaths "," ((totalinf / N-people) * 100) "," (precision ((deaths / totalinf) * 100) 2) "," ticks "," tests-performed + ) + ifelse tot > 0 + [foreach table:values counters [ctr -> file-type (word "," (precision (ctr / tot) 2))]] + [file-type ",0,0,0,0,0"] + file-print "" + file-close + ] +end + +to save-individual + let file-name word behaviorspace-experiment-name "_ind.csv" + ifelse file-exists? file-name + [file-open file-name] + [ + file-open file-name + file-print "run,t,beta,lambda,prob-rnd-infection,f,pctApp,pctTest,lockdown,schoolsopen,compliance,SymPriority,susceptible,infected,recovered,isolated,dead,hospitalized,presymptomatic,symptomatic,asymptomatic,severe,tests,positiveTests" + ] + file-print (word behaviorspace-run-number "," ticks "," infection-chance "," lambda "," prob-rnd-infection "," per-dif-friends "," pct-with-tracing-app "," tests-per-100-people "," + lockdown-at-first-death "," schools-open? "," app-compliance "," prioritize-symptomatics? "," csv:to-row table:values populations "," tests-today "," tested-positive) + file-close +end + +to save_contacts + file-open "contacts_13_10.csv" + file-print "contacts,days" + ask turtles with [my-state = "recovered" and days_cont > 0] + [file-print (word nm_contacts "," days_cont)] + file-close +end diff --git a/samples/NetLogo/parameters.nls b/samples/NetLogo/parameters.nls new file mode 100644 index 0000000000..5e4b9072ff --- /dev/null +++ b/samples/NetLogo/parameters.nls @@ -0,0 +1,1072 @@ +breed [farmers farmer] ;; ceate a breed to represent the farmers +breed [RiverVolumes RiverVolume] ;; ceate a breed to represent river volumes +breed [IrrigationVolumes IrrigationVolume] ;; ceate a breed to represent irrigation volumes +breed [StorageVolumes StorageVolume] ;; ceate a breed to represent storage volumes +breed [BarleyPlants BarleyPlant] ;; ceate a breed to represent the barley +breed [HarvestBarleyRecords HarvestBarleyRecord] ;; create a breed to record if there is a harvest in the barley field +breed [ComparisonRecords ComparisonRecord] ;; create a breed to record if there is a comparison + + +globals +[ + time + day + Year + InitialLandscape ;; land type variable for reading the file is then coverted to a patch variable + ExpandedLandscape + folderPath ;; the path where the files will be written to + Q_randomizer ;; the actual random value for deviation of Qin_average + RandomSeedVariable ;; the random seed variable + FarmerAverageAvailableWater ;; the average available water for a farmer + SowingChoice ;; the choice of new sowing to cultivate if a fallow field is ready to be cultivated + IrrigationStatus ;; varaible used to present fields irrigated or not + StartTotalBarley ;; the aggregated amount of barley of all the farmers at the start + FarmerBarley ;; variable used to store the barley of a farmer when he makes a decision on sowing barley after the first harvest + BarleyFarmerPerYear ;; barley amount of each farmer per year + TotalBarleyYieldPerFarmerPerYear + AverageBarleyPerField ;; the average barley per field per farmer per year, use to strict the expanding condition + TotalBarleyPerFarmer ;; the amount of barley harvest a farmer + + BarleyYieldPerYearF1 ;; the 1st farmer's yields per year + BarleyYieldPerYearF2 ;; the 2nd farmer's yields per year + BarleyYieldPerYearF3 ;; the 3rd farmer's yields per year + BarleyYieldPerYearF4 ;; the 4th farmer's yields per year + BarleyYieldPerYearF5 ;; the 5th farmer's yields per year + BarleyYieldPerYearF6 ;; the 6th farmer's yields per year + BarleyYieldPerYearF7 ;; the 7th farmer's yields per year + BarleyYieldPerYearF8 ;; the 8th farmer's yields per year + BarleyYieldPerYearF9 ;; the 9th farmer's yields per year + BarleyYieldPerYearF10 ;; the 10th farmer's yields per year + BarleyYieldPerYearF11 ;; the 11th farmer's yields per year + BarleyYieldPerYearF12 ;; the 12th farmer's yields per year + BarleyYieldPerYearF13 ;; the 13th farmer's yields per year + BarleyYieldPerYearF14 ;; the 14th farmer's yields per year + BarleyYieldPerYearF15 ;; the 15th farmer's yields per year + BarleyYieldPerYearF16 ;; the 16th farmer's yields per year + BarleyYieldPerYearF17 ;; the 17th farmer's yields per year + BarleyYieldPerYearF18 ;; the 18th farmer's yields per year + BarleyYieldPerYearF19 ;; the 19th farmer's yields per year + BarleyYieldPerYearF20 ;; the 19th farmer's yields per year + BarleyYieldPerYearF21 ;; the 19th farmer's yields per year + BarleyYieldPerYearF22 ;; the 19th farmer's yields per year + + FarmersBarleyYieldList ;; the list for F1-10's yields + UpstreamFarmersBarleyYieldList ;; the yields list for upstream farmers: F1 F2 F3 + MiddlestreamFarmersBarleyYieldList ;; the yields list for middle stream farmers: F4 F5 F6 F7 + DownstreamFarmersBarleyYieldList ;; the yields list for downstream farmers: F8 F9 F10 + + MiddlestreamF12-13BarleyYieldList ;; the yields list for middle stream farmers: F12 13 + MiddlestreamF12-14BarleyYieldList ;; the yields list for middle stream farmers: F12 13 14 + UpstreamF11-12BarleyYieldList ;; the yields list for upstream farmers:F11 12 + MiddlestreamF13-14BarleyYieldList ;; the yields list for middle stream farmers: F13 14 + DownstreamF15-16BarleyYieldList ;; the yields list for downstream farmers: F15 1 + + NumberofHarvestFieldsF1 ;; the 1st farmers' harvest fields + NumberofHarvestFieldsF2 ;; the 2nd farmers' harvest fields + NumberofHarvestFieldsF3 ;; the 3rd farmers' harvest fields + NumberofHarvestFieldsF4 ;; the 4th farmers' harvest fields + NumberofHarvestFieldsF5 ;; the 5th farmers' harvest fields + NumberofHarvestFieldsF6 ;; the 6th farmers' harvest fields + NumberofHarvestFieldsF7 ;; the 7th farmers' harvest fields + NumberofHarvestFieldsF8 ;; the 8th farmers' harvest fields + NumberofHarvestFieldsF9 ;; the 9th farmers' harvest fields + NumberofHarvestFieldsF10 ;; the 10th farmers' harvest fields + NumberofHarvestFieldsF11 ;; the 11th farmers' harvest fields + NumberofHarvestFieldsF12 ;; the 12th farmers' harvest fields + NumberofHarvestFieldsF13 ;; the 13th farmers' harvest fields + NumberofHarvestFieldsF14 ;; the 14th farmers' harvest fields + NumberofHarvestFieldsF15 ;; the 15th farmers' harvest fields + NumberofHarvestFieldsF16 ;; the 16th farmers' harvest fields + NumberofHarvestFieldsF17 ;; the 17th farmers' harvest fields + NumberofHarvestFieldsF18 ;; the 18th farmers' harvest fields + NumberofHarvestFieldsF19 ;; the 19th farmers' harvest fields + NumberofHarvestFieldsF20 ;; the 20th farmers' harvest fields + NumberofHarvestFieldsF21 ;; the 21th farmers' harvest fields + NumberofHarvestFieldsF22 ;; the 22th farmers' harvest fields + FarmersHarvestFieldsList + UpstreamfarmersHarvestFieldsList ;; upsream farmers: F1 F2 F3 + MiddlestreamfarmersHarvestFieldsList ;; middle stream farmers: F4 F5 F6 F7 + DownstreamfarmersHarvestFieldsList ;; downstream farmers: F8 F9 F10 + MiddlestreamF12-13HarvestFieldsList + MiddlestreamF12-14HarvestFieldsList + UpstreamF11-12HarvestFieldsList + MiddlestreamF13-14HarvestFieldsList + DownstreamF15-16HarvestFieldsList + MiddlestreamF18-19BarleyYieldList + MiddlestreamF18-19HarvestFieldsList + MiddlestreamF18-20BarleyYieldList + MiddlestreamF18-20HarvestFieldsList + UpstreamF17-18BarleyYieldList + UpstreamF17-18HarvestFieldsList + MiddlestreamF19-20BarleyYieldList + MiddlestreamF19-20HarvestFieldsList + DownstreamF21-22BarleyYieldList + DownstreamF21-22HarvestFieldsList + + +; ReadyforGCDecision ;; ready for GC change (boolean) +; ReadyforGFDecision ;; ready for GF gate flow change (boolean) + ReadyforGCDecision_PrimaryCanal ;; ready for GC change (boolean) + ReadyforGCDecision_SecondaryCanal ;; ready for GC change (boolean) + ReadyforGCDecision_SecondaryCanalF11-14 + ReadyforGCDecision_SecondaryCanalF11-15 + ReadyforGCDecision_SecondaryCanalF11-16 + ReadyforGCDecisionF17-19 + ReadyforGCDecisionF17-20 + ReadyforGCDecisionF17-21 + ReadyforGCDecisionF17-22 + CommunicationYear ;; the first compare year-The year when farmers along the same canal comparing their harvest situation and if there is poor harvest sitation the upstream and middle stream farmers will decrease their GC + ;ContinuousPoorYearNumber ;; record the number of tines when poor year appears + AW_List ;; the list shows the year and the available water in this year +] + +turtles-own +[ + ;FeedbackChoice ;; what decision each farmer has made after the communication among within the canal +] + +patches-own +[ + LandType ;; land type variable for a patch + ;TotalBarleyPerFarmer ;; the amount of barley harvest a farmer has + QHeadGateMax ;; the gate capacity of the heading gate + QGateMax ;; the gate capacity of each farmer + GCF11_F13 + GCF12_F13 + GCF13_F13 + GCF11_F14 ;; the initial GC of farmer11 when expanding to farmer14 + GCF12_F14 ;; the initial GC of farmer12 when expanding to farmer14 + GCF13_F14 ;; the initial GC of farmer13 when expanding to farmer14 + GCF14_F14 + GCF11_F15 ;; the initial GC of farmer11 when expanding to farmer15 + GCF12_F15 ;; the initial GC of farmer12 when expanding to farmer15 + GCF13_F15 ;; the initial GC of farmer13 when expanding to farmer15 + GCF14_F15 ;; the initial GC of farmer14 when expanding to farmer15 + GCF15_F15 + GCF11_F16 ;; the initial GC of farmer11 when expanding to farmer16 + GCF12_F16 ;; the initial GC of farmer12 when expanding to farmer16 + GCF13_F16 ;; the initial GC of farmer13 when expanding to farmer16 + GCF14_F16 ;; the initial GC of farmer14 when expanding to farmer16 + GCF15_F16 ;; the initial GC of farmer15 when expanding to farmer16 + + GCF17_F19 + GCF18_F19 + GCF19_F19 + GCF17_F20 ;; the initial GC of farmer17 when expanding to farmer20 + GCF18_F20 ;; the initial GC of farmer18 when expanding to farmer20 + GCF19_F20 ;; the initial GC of farmer19 when expanding to farmer20 + GCF20_F20 + GCF17_F21 ;; the initial GC of farmer17 when expanding to farmer21 + GCF18_F21 ;; the initial GC of farmer18 when expanding to farmer21 + GCF19_F21 ;; the initial GC of farmer19 when expanding to farmer21 + GCF20_F21 ;; the initial GC of farmer20 when expanding to farmer21 + GCF21_F21 + GCF17_F22 ;; the initial GC of farmer17 when expanding to farmer21 + GCF18_F22 ;; the initial GC of farmer18 when expanding to farmer21 + GCF19_F22 ;; the initial GC of farmer19 when expanding to farmer21 + GCF20_F22 ;; the initial GC of farmer20 when expanding to farmer21 + GCF21_F22 ;; the initial GC of farmer21 when expanding to farmer21 + + IrrigationDemand ;; the amount of water that barley desires per tick + ;TotalIrrigationDemand ;; if barely sowed it is (120+80+80+70+60), if not it is 0 + PreIrrigationDemand ;; irrigation demand at the preparation stage + CurrentStorage ;; the irrigation storage of fields + IrrigationMemory ;; how long ago were the crops irrigated + CountDown ;; variable used to record the irrigation time of each farmer + Field-IrrigationVolume1 ;; the amount of water that needs to be supplied by irrigation in field1 + Field-IrrigationVolume2 ;; the amount of water that needs to be supplied by irrigation in field2 + Field-IrrigationVolume2-sub + Field-IrrigationVolume3 ;; the amount of water that needs to be supplied by irrigation in field3 + Field-IrrigationVolume4 ;; the amount of water that needs to be supplied by irrigation in field4 + Field-IrrigationVolume5 ;; the amount of water that needs to be supplied by irrigation in field5 + Counter ;; used to count irrigation volumes at fields + ;BarleyWaterStress ;; barley starts without any water stress + BarleyQuality ;; the quality of the crops on the field goes down if it doesn't receive it's water demand too frequent GOOD: 3 MEDIUM: 2 POOR: 1 DEAD: 0 --> becomes fellow + BarleyQuality1 + BarleyQuality2 + BarleyQuality3 + BarleyYield + + BarleyDied ;; keeps track if barley died + FallowCountDown ;; how much time left befor cropselection procedure might start + ReadyForBarley ;; ready for crop selection (boolean) + AlreadyWithBarley ;; already sowed barley and both keeping the fields and expand a new fields + HarvestCycle ;; how many days left till harvest + ReceivedWater ;; + ReceivedWater1 ;; the amount of received water at the preparation stage + ReceivedWater2 ;; the amount of received water at the first irrigation stage + ReceivedWater3 ;; the amount of received water at the second irrigation stage + ReceivedWater4 ;; the amount of received water at the third irrigation stage + ReceivedWater5 ;; the amount of received water at the fourth irrigation stage + FieldReceivedWater-Stage1 + FieldReceivedWater-Stage2 + FieldReceivedWater-Stage3 + FeedbackChoice ;; what decision each farmer has made after the communication among within the canal + AverageHarvestBarley + HarvestBarleyY1 + HarvestBarleyY2 + HarvestBarleyY3 + HarvestBarleyY4 + HarvestBarleyY5 + HarvestBarleyY6 + HarvestBarleyY7 + HarvestBarleyY8 + HarvestBarleyY9 + HarvestBarleyY10 + HarvestBarleyY11 + HarvestBarleyY12 + HarvestBarleyY13 + HarvestBarleyY14 + HarvestBarleyY15 + HarvestBarleyY16 + HarvestBarleyY17 + HarvestBarleyY18 + HarvestBarleyY19 + HarvestBarleyY20 + HarvestBarleyY21 + HarvestBarleyY22 + HarvestBarleyY23 + HarvestBarleyY24 + HarvestBarleyY25 + HarvestBarleyY26 + HarvestBarleyY27 + HarvestBarleyY28 + HarvestBarleyY29 + HarvestBarleyY30 + HarvestBarleyY31 + HarvestBarleyY32 + HarvestBarleyY33 + HarvestBarleyY34 + HarvestBarleyY35 + HarvestBarleyY36 + HarvestBarleyY37 + HarvestBarleyY38 + HarvestBarleyY39 + HarvestBarleyY40 + HarvestBarleyY41 + HarvestBarleyY42 + HarvestBarleyY43 + HarvestBarleyY44 + HarvestBarleyY45 + HarvestBarleyY46 + HarvestBarleyY47 + HarvestBarleyY48 + HarvestBarleyY49 + HarvestBarleyY50 + HarvestBarleyY51 + HarvestBarleyY52 + HarvestBarleyY53 + HarvestBarleyY54 + HarvestBarleyY55 + HarvestBarleyY56 + HarvestBarleyY57 + HarvestBarleyY58 + HarvestBarleyY59 + HarvestBarleyY60 + HarvestBarleyY61 + HarvestBarleyY62 + HarvestBarleyY63 + HarvestBarleyY64 + HarvestBarleyY65 + HarvestBarleyY66 + HarvestBarleyY67 + HarvestBarleyY68 + HarvestBarleyY69 + HarvestBarleyY70 + HarvestBarleyY71 + HarvestBarleyY72 + HarvestBarleyY73 + HarvestBarleyY74 + HarvestBarleyY75 + HarvestBarleyY76 + HarvestBarleyY77 + HarvestBarleyY78 + HarvestBarleyY79 + HarvestBarleyY80 + HarvestBarleyY81 + HarvestBarleyY82 + HarvestBarleyY83 + HarvestBarleyY84 + HarvestBarleyY85 + HarvestBarleyY86 + HarvestBarleyY87 + HarvestBarleyY88 + HarvestBarleyY89 + HarvestBarleyY90 + HarvestBarleyY91 + HarvestBarleyY92 + HarvestBarleyY93 + HarvestBarleyY94 + HarvestBarleyY95 + HarvestBarleyY96 + HarvestBarleyY97 + HarvestBarleyY98 + HarvestBarleyY99 + HarvestBarleyY100 + + Landed_Year ;; variable to record passed rivervolumes on a storage patch in one year + Landed ;; variable used to record passed rivervolumes on a storage patch + + AverageAvailableWater ;; the average available water after at the current timestep days + AvailableWaterY100 + AvailableWaterY99 + AvailableWaterY98 + AvailableWaterY97 + AvailableWaterY96 + AvailableWaterY95 + AvailableWaterY94 + AvailableWaterY93 + AvailableWaterY92 + AvailableWaterY91 + AvailableWaterY90 + AvailableWaterY89 + AvailableWaterY88 + AvailableWaterY87 + AvailableWaterY86 + AvailableWaterY85 + AvailableWaterY84 + AvailableWaterY83 + AvailableWaterY82 + AvailableWaterY81 + AvailableWaterY80 + AvailableWaterY79 + AvailableWaterY78 + AvailableWaterY77 + AvailableWaterY76 + AvailableWaterY75 + AvailableWaterY74 + AvailableWaterY73 + AvailableWaterY72 + AvailableWaterY71 + AvailableWaterY70 + AvailableWaterY69 + AvailableWaterY68 + AvailableWaterY67 + AvailableWaterY66 + AvailableWaterY65 + AvailableWaterY64 + AvailableWaterY63 + AvailableWaterY62 + AvailableWaterY61 + AvailableWaterY60 + AvailableWaterY59 + AvailableWaterY58 + AvailableWaterY57 + AvailableWaterY56 + AvailableWaterY55 + AvailableWaterY54 + AvailableWaterY53 + AvailableWaterY52 + AvailableWaterY51 + AvailableWaterY50 + AvailableWaterY49 + AvailableWaterY48 + AvailableWaterY47 + AvailableWaterY46 + AvailableWaterY45 + AvailableWaterY44 + AvailableWaterY43 + AvailableWaterY42 + AvailableWaterY41 + AvailableWaterY40 + AvailableWaterY39 + AvailableWaterY38 + AvailableWaterY37 + AvailableWaterY36 + AvailableWaterY35 + AvailableWaterY34 + AvailableWaterY33 + AvailableWaterY32 + AvailableWaterY31 + AvailableWaterY30 ;; the available water after 30 days + AvailableWaterY29 ;; the available water after 29 days + AvailableWaterY28 ;; the available water after 28 days + AvailableWaterY27 ;; the available water after 27 days + AvailableWaterY26 ;; the available water after 26 days + AvailableWaterY25 ;; the available water after 25 days + AvailableWaterY24 ;; the available water after 24 days + AvailableWaterY23 ;; the available water after 23 days + AvailableWaterY22 ;; the available water after 22 days + AvailableWaterY21 ;; the available water after 21 days + AvailableWaterY20 ;; the available water after 20 days + AvailableWaterY19 ;; the available water after 19 days + AvailableWaterY18 ;; the available water after 18 days + AvailableWaterY17 ;; the available water after 17 days + AvailableWaterY16 ;; the available water after 16 days + AvailableWaterY15 ;; the available water after 15 days + AvailableWaterY14 ;; the available water after 14 days + AvailableWaterY13 ;; the available water after 13 days + AvailableWaterY12 ;; the available water after 12 days + AvailableWaterY11 ;; the available water after 11 days + AvailableWaterY10 ;; the available water after 10 days + AvailableWaterY9 ;; the available water after 9 days + AvailableWaterY8 ;; the available water after 8 days + AvailableWaterY7 ;; the available water after 7 days + AvailableWaterY6 ;; the available water after 6 days + AvailableWaterY5 ;; the available water after 5 days + AvailableWaterY4 ;; the available water after 4 days + AvailableWaterY3 ;; the available water after 3 days + AvailableWaterY2 ;; the available water after 2 days + AvailableWaterY1 ;; the available water after 1 day + AvailableWater ;; the available water after at the current timestep days + ComparisonProcedure1 ;; the first time of poor harvest situation + ComparisonProcedure ;; the following comparison procedure + ContinuousPoorYearNumberPrimary ;; record the number of times when poor year appears along the primary canal + ContinuousPoorYearNumberSecondary ;; record the number of times when poor year appears along the primary canal + ContinuousPoorYearNumberSecondaryF11-14 + ContinuousPoorYearNumberSecondaryF11-15 + ContinuousPoorYearNumberSecondaryF11-16 + ContinuousPoorYearNumberF17-19 + ContinuousPoorYearNumberF17-20 + ContinuousPoorYearNumberF17-21 + ContinuousPoorYearNumberF17-22 + CompareOnceAYear ;; the procedure of comparing the harvest every year, for F1-13 + CompareOnceAYearF11-14 ;; the procedure of comparing the harvest every year, for F1-14 + CompareOnceAYearF11-15 ;; the procedure of comparing the harvest every year, for F1-15 + CompareOnceAYearF11-16 ;; the procedure of comparing the harvest every year, for F1-16 + CompareOnceAYearF17-19 + CompareOnceAYearF17-20 + CompareOnceAYearF17-21 + CompareOnceAYearF17-22 + CompareEveryTwoYearsPrimary ;; the procedure of comparing the harvest every two years along the primary canal + CompareEveryTwoYearsSecondary ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-14 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-15 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsSecondaryF11-16 ;; the procedure of comparing the harvest every two years along the secondary canal + CompareEveryTwoYearsF17-19 + CompareEveryTwoYearsF17-20 + CompareEveryTwoYearsF17-21 + CompareEveryTwoYearsF17-22 + ComparisonCountDownPrimary;ComparisonTime ;; use to present how often to compare the harvest + ComparisonCountDownSecondary + ComparisonCountDownSecondaryF11-14 + ComparisonCountDownSecondaryF11-15 + ComparisonCountDownSecondaryF11-16 + ComparisonCountDownF17-19 + ComparisonCountDownF17-20 + ComparisonCountDownF17-21 + ComparisonCountDownF17-22 + + ContinuouslySameHarvestYear ;; use to record the number of continuously year that all farmers have the same harvest (prepare for the canal expansion) + ContinuouslyPoorHarvestYear ;; use to record the number of continuously year that farmers have poor harvest (prepare for the farmers' movement) +;;;;;;these for meet good harvest first + ContinuouslySameHarvestYearProcedure_1year_1st? ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ContinuouslySameHarvestYearProcedure_1year_2nd? ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_1year_3rd? ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_1year_4th? ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + ContinuouslySameHarvestYearProcedure_1year_5th? ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + ContinuouslySameHarvestYearProcedure_1year_6th? ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + ContinuouslySameHarvestYearProcedure_1year_7th? ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + ContinuouslySameHarvestYearProcedure_1year_8th? ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + ContinuouslySameHarvestYearProcedure_1year_9th? ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + ContinuouslySameHarvestYearProcedure_1year_10th? ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + ContinuouslySameHarvestYearProcedure_1year_11th? ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + ContinuouslySameHarvestYearProcedure_1year_12th? ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + ContinuouslySameHarvestYearProcedure_1year_13th? ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + ContinuouslySameHarvestYearProcedure_1year_14th? ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + ContinuouslySameHarvestYearProcedure_1year_15th? ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + ContinuouslySameHarvestYearProcedure_1year_16th? ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + ContinuouslySameHarvestYearProcedure_2years_1st? ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_2years_2nd? ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_2years_3rd? ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_2years_4th? ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_2years_5th? ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_2years_6th? ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + ContinuouslySameHarvestYearProcedure_2years_7th? ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + ContinuouslySameHarvestYearProcedure_2years_8th? ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + ContinuouslySameHarvestYearProcedure_3years_1st? ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_3years_2nd? ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_3years_3rd? ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_3years_4th? ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_3years_5th? ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_3years_6th? ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_4years_1st? ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_4years_2nd? ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_4years_3rd? ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_4years_4th? ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_4years_5th? ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_4years_6th? ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_5years_1st? ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_5years_2nd? ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_5years_3rd? ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_5years_4th? ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_5years_5th? ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_5years_6th? ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_6years_1st? ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_6years_2nd? ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_6years_3rd? ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_6years_4th? ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_6years_5th? ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_6years_6th? ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_1year_1st? ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_1year_2nd? ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_1year_3rd? ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_1year_4th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_1year_5th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_1year_6th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_1year_7th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_1year_8th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + ContinuouslyPoorHarvestYearProcedure_1year_9th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + ContinuouslyPoorHarvestYearProcedure_1year_10th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + ContinuouslyPoorHarvestYearProcedure_1year_11th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + ContinuouslyPoorHarvestYearProcedure_1year_12th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + ContinuouslyPoorHarvestYearProcedure_1year_13th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + ContinuouslyPoorHarvestYearProcedure_1year_14th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + ContinuouslyPoorHarvestYearProcedure_1year_15th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + ContinuouslyPoorHarvestYearProcedure_1year_16th? ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + ContinuouslyPoorHarvestYearProcedure_2years_1st? ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_2years_2nd? ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_2years_3rd? ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_2years_4th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_2years_5th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_2years_6th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_2years_7th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_2years_8th? ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + + ContinuouslyPoorHarvestYearProcedure_3years_1st? ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_3years_2nd? ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_3years_3rd? ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_3years_4th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_3years_5th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_3years_6th? ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_4years_1st? ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_4years_2nd? ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_4years_3rd? ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_4years_4th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_4years_5th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_4years_6th? ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_5years_1st? ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_5years_2nd? ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_5years_3rd? ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_5years_4th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_5years_5th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_5years_6th? ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_6years_1st? ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_6years_2nd? ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_6years_3rd? ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_6years_4th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_6years_5th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_6years_6th? ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + CountDownExpansion1_1 ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + CountDownExpansion1_2 ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + CountDownExpansion1_3 ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + CountDownExpansion1_4 ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + CountDownExpansion1_5 ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + CountDownExpansion1_6 ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + CountDownExpansion1_7 ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + CountDownExpansion1_8 ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + CountDownExpansion1_9 ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + CountDownExpansion1_10 ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + CountDownExpansion1_11 ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + CountDownExpansion1_12 ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + CountDownExpansion1_13 ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + CountDownExpansion1_14 ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + CountDownExpansion1_15 ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + CountDownExpansion1_16 ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + CountDownExpansion2_1 ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + CountDownExpansion2_2 ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + CountDownExpansion2_3 ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + CountDownExpansion2_4 ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + CountDownExpansion2_5 ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + CountDownExpansion2_6 ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + CountDownExpansion2_7 ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + CountDownExpansion2_8 ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + CountDownExpansion3_1 ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + CountDownExpansion3_2 ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + CountDownExpansion3_3 ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + CountDownExpansion3_4 ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + CountDownExpansion3_5 ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + CountDownExpansion3_6 ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + CountDownExpansion4_1 ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + CountDownExpansion4_2 ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + CountDownExpansion4_3 ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + CountDownExpansion4_4 ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + CountDownExpansion4_5 ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + CountDownExpansion4_6 ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + CountDownExpansion5_1 ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + CountDownExpansion5_2 ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + CountDownExpansion5_3 ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + CountDownExpansion5_4 ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + CountDownExpansion5_5 ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + CountDownExpansion5_6 ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + CountDownExpansion6_1 ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + CountDownExpansion6_2 ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + CountDownExpansion6_3 ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + CountDownExpansion6_4 ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + CountDownExpansion6_5 ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + CountDownExpansion6_6 ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + CountDownMovement1_1 ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + CountDownMovement1_2 ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + CountDownMovement1_3 ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + CountDownMovement1_4 ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + CountDownMovement1_5 ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + CountDownMovement1_6 ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + CountDownMovement1_7 ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + CountDownMovement1_8 ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + CountDownMovement1_9 ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + CountDownMovement1_10 ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + CountDownMovement1_11 ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + CountDownMovement1_12 ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + CountDownMovement1_13 ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + CountDownMovement1_14 ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + CountDownMovement1_15 ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + CountDownMovement1_16 ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + CountDownMovement2_1 ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + CountDownMovement2_2 ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + CountDownMovement2_3 ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + CountDownMovement2_4 ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + CountDownMovement2_5 ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + CountDownMovement2_6 ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + CountDownMovement2_7 ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + CountDownMovement2_8 ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + CountDownMovement3_1 ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + CountDownMovement3_2 ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + CountDownMovement3_3 ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + CountDownMovement3_4 ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + CountDownMovement3_5 ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + CountDownMovement3_6 ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + CountDownMovement4_1 ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + CountDownMovement4_2 ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + CountDownMovement4_3 ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + CountDownMovement4_4 ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + CountDownMovement4_5 ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + CountDownMovement4_6 ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + CountDownMovement5_1 ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + CountDownMovement5_2 ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + CountDownMovement5_3 ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + CountDownMovement5_4 ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + CountDownMovement5_5 ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + CountDownMovement5_6 ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + CountDownMovement6_1 ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + CountDownMovement6_2 ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + CountDownMovement6_3 ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + CountDownMovement6_4 ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + CountDownMovement6_5 ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + CountDownMovement6_6 ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time + +;;;;;;these for meet poor harvest first(each variable end with p) + ContinuouslySameHarvestYearProcedure_1year_1st?p ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + ContinuouslySameHarvestYearProcedure_1year_2nd?p ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_1year_3rd?p ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_1year_4th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + ContinuouslySameHarvestYearProcedure_1year_5th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + ContinuouslySameHarvestYearProcedure_1year_6th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + ContinuouslySameHarvestYearProcedure_1year_7th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + ContinuouslySameHarvestYearProcedure_1year_8th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + ContinuouslySameHarvestYearProcedure_1year_9th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + ContinuouslySameHarvestYearProcedure_1year_10th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + ContinuouslySameHarvestYearProcedure_1year_11th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + ContinuouslySameHarvestYearProcedure_1year_12th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + ContinuouslySameHarvestYearProcedure_1year_13th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + ContinuouslySameHarvestYearProcedure_1year_14th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + ContinuouslySameHarvestYearProcedure_1year_15th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + ContinuouslySameHarvestYearProcedure_1year_16th?p ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + ContinuouslySameHarvestYearProcedure_2years_1st?p ;; use to record the continuously same good harvest year with 2 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_2years_2nd?p ;; use to record the continuously same good harvest year with 2 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_2years_3rd?p ;; use to record the continuously same good harvest year with 2 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_2years_4th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_2years_5th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_2years_6th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 6th time + ContinuouslySameHarvestYearProcedure_2years_7th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 7th time + ContinuouslySameHarvestYearProcedure_2years_8th?p ;; use to record the continuously same good harvest year with 2 years, appear at the 8th time + + ContinuouslySameHarvestYearProcedure_3years_1st?p ;; use to record the continuously same good harvest year with 3 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_3years_2nd?p ;; use to record the continuously same good harvest year with 3 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_3years_3rd?p ;; use to record the continuously same good harvest year with 3 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_3years_4th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_3years_5th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_3years_6th?p ;; use to record the continuously same good harvest year with 3 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_4years_1st?p ;; use to record the continuously same good harvest year with 4 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_4years_2nd?p ;; use to record the continuously same good harvest year with 4 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_4years_3rd?p ;; use to record the continuously same good harvest year with 4 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_4years_4th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_4years_5th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_4years_6th?p ;; use to record the continuously same good harvest year with 4 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_5years_1st?p ;; use to record the continuously same good harvest year with 5 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_5years_2nd?p ;; use to record the continuously same good harvest year with 5 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_5years_3rd?p ;; use to record the continuously same good harvest year with 5 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_5years_4th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_5years_5th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_5years_6th?p ;; use to record the continuously same good harvest year with 5 years, appear at the 6th time + + ContinuouslySameHarvestYearProcedure_6years_1st?p ;; use to record the continuously same good harvest year with 6 years, appear at the 1st time + ContinuouslySameHarvestYearProcedure_6years_2nd?p ;; use to record the continuously same good harvest year with 6 years, appear at the 2nd time + ContinuouslySameHarvestYearProcedure_6years_3rd?p ;; use to record the continuously same good harvest year with 6 years, appear at the 3rd time + ContinuouslySameHarvestYearProcedure_6years_4th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 4th time + ContinuouslySameHarvestYearProcedure_6years_5th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 5th time + ContinuouslySameHarvestYearProcedure_6years_6th?p ;; use to record the continuously same good harvest year with 6 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_1year_1st?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_1year_2nd?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_1year_3rd?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_1year_4th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_1year_5th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_1year_6th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_1year_7th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_1year_8th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + ContinuouslyPoorHarvestYearProcedure_1year_9th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + ContinuouslyPoorHarvestYearProcedure_1year_10th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + ContinuouslyPoorHarvestYearProcedure_1year_11th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + ContinuouslyPoorHarvestYearProcedure_1year_12th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + ContinuouslyPoorHarvestYearProcedure_1year_13th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + ContinuouslyPoorHarvestYearProcedure_1year_14th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + ContinuouslyPoorHarvestYearProcedure_1year_15th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + ContinuouslyPoorHarvestYearProcedure_1year_16th?p ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + ContinuouslyPoorHarvestYearProcedure_2years_1st?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_2years_2nd?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_2years_3rd?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_2years_4th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_2years_5th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_2years_6th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 6th time + ContinuouslyPoorHarvestYearProcedure_2years_7th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 7th time + ContinuouslyPoorHarvestYearProcedure_2years_8th?p ;; use to record the continuously Poor harvest year with 2 years, appear at the 8th time + + + ContinuouslyPoorHarvestYearProcedure_3years_1st?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_3years_2nd?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_3years_3rd?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_3years_4th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_3years_5th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_3years_6th?p ;; use to record the continuously Poor harvest year with 3 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_4years_1st?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_4years_2nd?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_4years_3rd?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_4years_4th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_4years_5th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_4years_6th?p ;; use to record the continuously Poor harvest year with 4 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_5years_1st?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_5years_2nd?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_5years_3rd?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_5years_4th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_5years_5th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_5years_6th?p ;; use to record the continuously Poor harvest year with 5 years, appear at the 6th time + + ContinuouslyPoorHarvestYearProcedure_6years_1st?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 1st time + ContinuouslyPoorHarvestYearProcedure_6years_2nd?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 2nd time + ContinuouslyPoorHarvestYearProcedure_6years_3rd?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 3rd time + ContinuouslyPoorHarvestYearProcedure_6years_4th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 4th time + ContinuouslyPoorHarvestYearProcedure_6years_5th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 5th time + ContinuouslyPoorHarvestYearProcedure_6years_6th?p ;; use to record the continuously Poor harvest year with 6 years, appear at the 6th time + + CountDownExpansion1_1p ;; use to record the continuously same good harvest year with 1 year, appear at the 1st time + CountDownExpansion1_2p ;; use to record the continuously same good harvest year with 1 year, appear at the 2nd time + CountDownExpansion1_3p ;; use to record the continuously same good harvest year with 1 year, appear at the 3rd time + CountDownExpansion1_4p ;; use to record the continuously same good harvest year with 1 year, appear at the 4th time + CountDownExpansion1_5p ;; use to record the continuously same good harvest year with 1 year, appear at the 5th time + CountDownExpansion1_6p ;; use to record the continuously same good harvest year with 1 year, appear at the 6th time + CountDownExpansion1_7p ;; use to record the continuously same good harvest year with 1 year, appear at the 7th time + CountDownExpansion1_8p ;; use to record the continuously same good harvest year with 1 year, appear at the 8th time + CountDownExpansion1_9p ;; use to record the continuously same good harvest year with 1 year, appear at the 9th time + CountDownExpansion1_10p ;; use to record the continuously same good harvest year with 1 year, appear at the 10th time + CountDownExpansion1_11p ;; use to record the continuously same good harvest year with 1 year, appear at the 11th time + CountDownExpansion1_12p ;; use to record the continuously same good harvest year with 1 year, appear at the 12th time + CountDownExpansion1_13p ;; use to record the continuously same good harvest year with 1 year, appear at the 13th time + CountDownExpansion1_14p ;; use to record the continuously same good harvest year with 1 year, appear at the 14th time + CountDownExpansion1_15p ;; use to record the continuously same good harvest year with 1 year, appear at the 15th time + CountDownExpansion1_16p ;; use to record the continuously same good harvest year with 1 year, appear at the 16th time + + CountDownExpansion2_1p ;; use to record the continuously same good harvest year with 2 year, appear at the 1st time + CountDownExpansion2_2p ;; use to record the continuously same good harvest year with 2 year, appear at the 2nd time + CountDownExpansion2_3p ;; use to record the continuously same good harvest year with 2 year, appear at the 3rd time + CountDownExpansion2_4p ;; use to record the continuously same good harvest year with 2 year, appear at the 4th time + CountDownExpansion2_5p ;; use to record the continuously same good harvest year with 2 year, appear at the 5th time + CountDownExpansion2_6p ;; use to record the continuously same good harvest year with 2 year, appear at the 6th time + CountDownExpansion2_7p ;; use to record the continuously same good harvest year with 2 year, appear at the 7th time + CountDownExpansion2_8p ;; use to record the continuously same good harvest year with 2 year, appear at the 8th time + + CountDownExpansion3_1p ;; use to record the continuously same good harvest year with 3 year, appear at the 1st time + CountDownExpansion3_2p ;; use to record the continuously same good harvest year with 3 year, appear at the 2nd time + CountDownExpansion3_3p ;; use to record the continuously same good harvest year with 3 year, appear at the 3rd time + CountDownExpansion3_4p ;; use to record the continuously same good harvest year with 3 year, appear at the 4th time + CountDownExpansion3_5p ;; use to record the continuously same good harvest year with 3 year, appear at the 5th time + CountDownExpansion3_6p ;; use to record the continuously same good harvest year with 3 year, appear at the 6th time + + CountDownExpansion4_1p ;; use to record the continuously same good harvest year with 4 year, appear at the 1st time + CountDownExpansion4_2p ;; use to record the continuously same good harvest year with 4 year, appear at the 2nd time + CountDownExpansion4_3p ;; use to record the continuously same good harvest year with 4 year, appear at the 3rd time + CountDownExpansion4_4p ;; use to record the continuously same good harvest year with 4 year, appear at the 4th time + CountDownExpansion4_5p ;; use to record the continuously same good harvest year with 4 year, appear at the 5th time + CountDownExpansion4_6p ;; use to record the continuously same good harvest year with 4 year, appear at the 6th time + + CountDownExpansion5_1p ;; use to record the continuously same good harvest year with 5 year, appear at the 1st time + CountDownExpansion5_2p ;; use to record the continuously same good harvest year with 5 year, appear at the 2nd time + CountDownExpansion5_3p ;; use to record the continuously same good harvest year with 5 year, appear at the 3rd time + CountDownExpansion5_4p ;; use to record the continuously same good harvest year with 5 year, appear at the 4th time + CountDownExpansion5_5p ;; use to record the continuously same good harvest year with 5 year, appear at the 5th time + CountDownExpansion5_6p ;; use to record the continuously same good harvest year with 5 year, appear at the 6th time + + CountDownExpansion6_1p ;; use to record the continuously same good harvest year with 6 year, appear at the 1st time + CountDownExpansion6_2p ;; use to record the continuously same good harvest year with 6 year, appear at the 2nd time + CountDownExpansion6_3p ;; use to record the continuously same good harvest year with 6 year, appear at the 3rd time + CountDownExpansion6_4p ;; use to record the continuously same good harvest year with 6 year, appear at the 4th time + CountDownExpansion6_5p ;; use to record the continuously same good harvest year with 6 year, appear at the 5th time + CountDownExpansion6_6p ;; use to record the continuously same good harvest year with 6 year, appear at the 6th time + + CountDownMovement1_1p ;; use to record the continuously Poor harvest year with 1 year, appear at the 1st time + CountDownMovement1_2p ;; use to record the continuously Poor harvest year with 1 year, appear at the 2nd time + CountDownMovement1_3p ;; use to record the continuously Poor harvest year with 1 year, appear at the 3rd time + CountDownMovement1_4p ;; use to record the continuously Poor harvest year with 1 year, appear at the 4th time + CountDownMovement1_5p ;; use to record the continuously Poor harvest year with 1 year, appear at the 5th time + CountDownMovement1_6p ;; use to record the continuously Poor harvest year with 1 year, appear at the 6th time + CountDownMovement1_7p ;; use to record the continuously Poor harvest year with 1 year, appear at the 7th time + CountDownMovement1_8p ;; use to record the continuously Poor harvest year with 1 year, appear at the 8th time + CountDownMovement1_9p ;; use to record the continuously Poor harvest year with 1 year, appear at the 9th time + CountDownMovement1_10p ;; use to record the continuously Poor harvest year with 1 year, appear at the 10th time + CountDownMovement1_11p ;; use to record the continuously Poor harvest year with 1 year, appear at the 11th time + CountDownMovement1_12p ;; use to record the continuously Poor harvest year with 1 year, appear at the 12th time + CountDownMovement1_13p ;; use to record the continuously Poor harvest year with 1 year, appear at the 13th time + CountDownMovement1_14p ;; use to record the continuously Poor harvest year with 1 year, appear at the 14th time + CountDownMovement1_15p ;; use to record the continuously Poor harvest year with 1 year, appear at the 15th time + CountDownMovement1_16p ;; use to record the continuously Poor harvest year with 1 year, appear at the 16th time + + CountDownMovement2_1p ;; use to record the continuously Poor harvest year with 2 year, appear at the 1st time + CountDownMovement2_2p ;; use to record the continuously Poor harvest year with 2 year, appear at the 2nd time + CountDownMovement2_3p ;; use to record the continuously Poor harvest year with 2 year, appear at the 3rd time + CountDownMovement2_4p ;; use to record the continuously Poor harvest year with 2 year, appear at the 4th time + CountDownMovement2_5p ;; use to record the continuously Poor harvest year with 2 year, appear at the 5th time + CountDownMovement2_6p ;; use to record the continuously Poor harvest year with 2 year, appear at the 6th time + CountDownMovement2_7p ;; use to record the continuously Poor harvest year with 2 year, appear at the 7th time + CountDownMovement2_8p ;; use to record the continuously Poor harvest year with 2 year, appear at the 8th time + + CountDownMovement3_1p ;; use to record the continuously Poor harvest year with 3 year, appear at the 1st time + CountDownMovement3_2p ;; use to record the continuously Poor harvest year with 3 year, appear at the 2nd time + CountDownMovement3_3p ;; use to record the continuously Poor harvest year with 3 year, appear at the 3rd time + CountDownMovement3_4p ;; use to record the continuously Poor harvest year with 3 year, appear at the 4th time + CountDownMovement3_5p ;; use to record the continuously Poor harvest year with 3 year, appear at the 5th time + CountDownMovement3_6p ;; use to record the continuously Poor harvest year with 3 year, appear at the 6th time + + CountDownMovement4_1p ;; use to record the continuously Poor harvest year with 4 year, appear at the 1st time + CountDownMovement4_2p ;; use to record the continuously Poor harvest year with 4 year, appear at the 2nd time + CountDownMovement4_3p ;; use to record the continuously Poor harvest year with 4 year, appear at the 3rd time + CountDownMovement4_4p ;; use to record the continuously Poor harvest year with 4 year, appear at the 4th time + CountDownMovement4_5p ;; use to record the continuously Poor harvest year with 4 year, appear at the 5th time + CountDownMovement4_6p ;; use to record the continuously Poor harvest year with 4 year, appear at the 6th time + + CountDownMovement5_1p ;; use to record the continuously Poor harvest year with 5 year, appear at the 1st time + CountDownMovement5_2p ;; use to record the continuously Poor harvest year with 5 year, appear at the 2nd time + CountDownMovement5_3p ;; use to record the continuously Poor harvest year with 5 year, appear at the 3rd time + CountDownMovement5_4p ;; use to record the continuously Poor harvest year with 5 year, appear at the 4th time + CountDownMovement5_5p ;; use to record the continuously Poor harvest year with 5 year, appear at the 5th time + CountDownMovement5_6p ;; use to record the continuously Poor harvest year with 5 year, appear at the 6th time + + CountDownMovement6_1p ;; use to record the continuously Poor harvest year with 6 year, appear at the 1st time + CountDownMovement6_2p ;; use to record the continuously Poor harvest year with 6 year, appear at the 2nd time + CountDownMovement6_3p ;; use to record the continuously Poor harvest year with 6 year, appear at the 3rd time + CountDownMovement6_4p ;; use to record the continuously Poor harvest year with 6 year, appear at the 4th time + CountDownMovement6_5p ;; use to record the continuously Poor harvest year with 6 year, appear at the 5th time + CountDownMovement6_6p ;; use to record the continuously Poor harvest year with 6 year, appear at the 6th time +;;there is farmers11 12 13, and compare these three farmers per year to see if it possible to expand to farmer14 + F11-13WithGoodHarvestYears + F11-13WithGoodHarvestYearsProcedure_1year? + F11-13WithGoodHarvestYearsProcedure_2years? + F11-13WithGoodHarvestYearsProcedure_3years? + F11-13WithGoodHarvestYearsProcedure_4years? + F11-13WithGoodHarvestYearsProcedure_5years? + F11-13WithGoodHarvestYearsProcedure_6years? + F11-13CountDownExpansion_1year + F11-13CountDownExpansion_2years + F11-13CountDownExpansion_3years + F11-13CountDownExpansion_4years + F11-13CountDownExpansion_5years + +;;there is farmers11 12 13, and compare these three farmers per year to see if there is poor harvest situation and then expand to farmer17-19, a new primary canal + F11-13WithPoorHarvestYears + F11-13WithPoorHarvestYearsProcedure_1year? + F11-13WithPoorHarvestYearsProcedure_2years? + F11-13WithPoorHarvestYearsProcedure_3years? + F11-13WithPoorHarvestYearsProcedure_4years? + F11-13WithPoorHarvestYearsProcedure_5years? + F11-13WithPoorHarvestYearsProcedure_6years? + +;;there is farmers11 12 13,14 and compare these three farmers per year to see if it possible to expand to farmer15 + F11-14WithGoodHarvestYears + F11-14WithGoodHarvestYearsProcedure_1year? + F11-14WithGoodHarvestYearsProcedure_2years? + F11-14WithGoodHarvestYearsProcedure_3years? + F11-14WithGoodHarvestYearsProcedure_4years? + F11-14WithGoodHarvestYearsProcedure_5years? + F11-14WithGoodHarvestYearsProcedure_6years? + F11-14CountDownExpansion_1year + F11-14CountDownExpansion_2years + F11-14CountDownExpansion_3years + F11-14CountDownExpansion_4years + F11-14CountDownExpansion_5years + +;;there is farmers11 12 13,14,15 and compare these three farmers per year to see if it possible to expand to farmer16 + F11-15WithGoodHarvestYears + F11-15WithGoodHarvestYearsProcedure_1year? + F11-15WithGoodHarvestYearsProcedure_2years? + F11-15WithGoodHarvestYearsProcedure_3years? + F11-15WithGoodHarvestYearsProcedure_4years? + F11-15WithGoodHarvestYearsProcedure_5years? + F11-15WithGoodHarvestYearsProcedure_6years? + F11-15CountDownExpansion_1year + F11-15CountDownExpansion_2years + F11-15CountDownExpansion_3years + F11-15CountDownExpansion_4years + F11-15CountDownExpansion_5years + +;;there is farmers11 12 13,14,15, 16 and compare these three farmers per year to see if it possible to expand to another primary canal + F11-16WithGoodHarvestYears + F11-16WithGoodHarvestYearsProcedure_1year? + F11-16WithGoodHarvestYearsProcedure_2years? + F11-16WithGoodHarvestYearsProcedure_3years? + F11-16WithGoodHarvestYearsProcedure_4years? + F11-16WithGoodHarvestYearsProcedure_5years? + F11-16WithGoodHarvestYearsProcedure_6years? + F11-16CountDownExpansion_1year + F11-16CountDownExpansion_2years + F11-16CountDownExpansion_3years + F11-16CountDownExpansion_4years + F11-16CountDownExpansion_5years + +;;there is farmers17, 18, 19 and compare these three farmers per year to see if it possible to expand to F20 + F17-19WithGoodHarvestYears + F17-19WithGoodHarvestYearsProcedure_1year? + F17-19WithGoodHarvestYearsProcedure_2years? + F17-19WithGoodHarvestYearsProcedure_3years? + F17-19WithGoodHarvestYearsProcedure_4years? + F17-19WithGoodHarvestYearsProcedure_5years? + F17-19WithGoodHarvestYearsProcedure_6years? + F17-19CountDownExpansion_1year + F17-19CountDownExpansion_2years + F17-19CountDownExpansion_3years + F17-19CountDownExpansion_4years + F17-19CountDownExpansion_5years + +;;there is farmers17, 18, 19 due to movement of poor harvest situation + F17-19WithPoorHarvestYears + F17-19WithPoorHarvestYearsProcedure_1year? + F17-19WithPoorHarvestYearsProcedure_2years? + F17-19WithPoorHarvestYearsProcedure_3years? + F17-19WithPoorHarvestYearsProcedure_4years? + F17-19WithPoorHarvestYearsProcedure_5years? + F17-19WithPoorHarvestYearsProcedure_6years? + +;;there is farmers17, 18, 19, 20 and compare these three farmers per year to see if it possible to expand to F21 + F17-20WithGoodHarvestYears + F17-20WithGoodHarvestYearsProcedure_1year? + F17-20WithGoodHarvestYearsProcedure_2years? + F17-20WithGoodHarvestYearsProcedure_3years? + F17-20WithGoodHarvestYearsProcedure_4years? + F17-20WithGoodHarvestYearsProcedure_5years? + F17-20WithGoodHarvestYearsProcedure_6years? + F17-20CountDownExpansion_1year + F17-20CountDownExpansion_2years + F17-20CountDownExpansion_3years + F17-20CountDownExpansion_4years + F17-20CountDownExpansion_5years + +;;there is farmers17, 18, 19, 20, 21 and compare these three farmers per year to see if it possible to expand to F22 + F17-21WithGoodHarvestYears + F17-21WithGoodHarvestYearsProcedure_1year? + F17-21WithGoodHarvestYearsProcedure_2years? + F17-21WithGoodHarvestYearsProcedure_3years? + F17-21WithGoodHarvestYearsProcedure_4years? + F17-21WithGoodHarvestYearsProcedure_5years? + F17-21WithGoodHarvestYearsProcedure_6years? + F17-21CountDownExpansion_1year + F17-21CountDownExpansion_2years + F17-21CountDownExpansion_3years + F17-21CountDownExpansion_4years + F17-21CountDownExpansion_5years + +;;there is farmers17, 18, 19, 20, 21,22 and compare these three farmers per year to see if it possible to expand to F23 + F17-22WithGoodHarvestYears + F17-22WithGoodHarvestYearsProcedure_1year? + F17-22WithGoodHarvestYearsProcedure_2years? + F17-22WithGoodHarvestYearsProcedure_3years? + F17-22WithGoodHarvestYearsProcedure_4years? + F17-22WithGoodHarvestYearsProcedure_5years? + F17-22WithGoodHarvestYearsProcedure_6years? + F17-22CountDownExpansion_1year + F17-22CountDownExpansion_2years + F17-22CountDownExpansion_3years + F17-22CountDownExpansion_4years + F17-22CountDownExpansion_5years + + F11NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF11 + CountDownBarleyF11 + F11NeverWithLand? + F11FirstWithLand + CountDownLandF11 + + F14NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF14 + CountDownBarleyF14 + F14NeverWithLand? + F14FirstWithLand + CountDownLandF14 + + F15NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF15 + CountDownBarleyF15 + F15NeverWithLand? + F15FirstWithLand + CountDownLandF15 + + F16NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF16 + CountDownBarleyF16 + F16NeverWithLand? + F16FirstWithLand + CountDownLandF16 + + F17NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF17 + CountDownBarleyF17 + F17NeverWithLand? + F17FirstWithLand + CountDownLandF17 + + F20NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF20 + CountDownBarleyF20 + F20NeverWithLand? + F20FirstWithLand + CountDownLandF20 + + F21NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF21 + CountDownBarleyF21 + F21NeverWithLand? + F21FirstWithLand + CountDownLandF21 + + F22NeverWithBarley? ;; use to record the farmer has the first harvest or not + TheFirstHarvestYearF22 + CountDownBarleyF22 + F22NeverWithLand? + F22FirstWithLand + CountDownLandF22 +] \ No newline at end of file diff --git a/samples/NetLogo/police.nls b/samples/NetLogo/police.nls new file mode 100644 index 0000000000..8a7fa308e2 --- /dev/null +++ b/samples/NetLogo/police.nls @@ -0,0 +1,310 @@ + +police-own [ + next-task + person-to-search + person-to-follow + search-tick + follow-tick + someoneAskedForHelp + ImOccupied + RespondingOnHelp + + homeAdress + goToWork + dayShift? + shift + status + + list-of-known-hideouts + list-of-known-gangsters + chance-of-finding-gangster + + loyal + police-money-limit +] + +to setup-police + + create-police number-of-police [ + set police-money-limit 600 + random 200 + set shape "person police" + set color blue + set search-tick 0 + set size 2 + set follow-tick -1 + set shift number-of-police + set homeAdress one-of houses + set list-of-known-gangsters [] + set list-of-known-hideouts [] + setxy [ xcor ] of homeAdress [ ycor ] of homeAdress + setxy random-xcor random abs 11 + set next-task [ -> move-police ] + ask police [ + ifelse shift <= number-of-police / 2 [ + set dayShift? true + ] [ + set dayShift? false + ] + set shift shift - 1 + ] + ] +end + +to idle + run next-task +end + +to move-police + ; Move + ifelse abs xcor > 15 or ycor <= -10 or ycor > 14 [ + set heading towards patch 0 0 + ] [ + ifelse time >= 1199 or time <= 300 [ + if dayShift? = true [ + set next-task [ -> police-go-home ] + ] + ] [ + ifelse time >= 350 or time <= 650 [ + if dayShift? = false [ + set next-task [ -> police-go-home ] + ] + ] [ + right random 45 + left random 45 + ] + ] + ] + forward 0.5 + + ; Check if searchable agent on patch + let agent-to-search nobody + (ifelse any? adult-gangsters-here [ + set agent-to-search one-of adult-gangsters-here + ] any? (adults-here with [ stoppedByPolice? = false and state != "work" ]) [ + set agent-to-search one-of adults-here + ] any? child-gangsters-here with [followedByPolice? = false and hidden? = false] [ + set person-to-follow one-of child-gangsters-here + ask person-to-follow [ set followedByPolice? true ] + set chance-of-finding-gangster 2 + set next-task [ -> police-follow-child-gangster ] + ]) + + if agent-to-search != nobody [ + police-stop-agent agent-to-search + set next-task [ -> police-search-agent agent-to-search ] + ] + + if any? (hideouts-here with [drugs > 0 or weapons > 0]) or any?(stash-houses-here with [drugs > 0 or weapons > 0])[ + set next-task [ -> ask-for-help ] + ] +end + +to police-search-agent [ agent ] + set ImOccupied 1 + set search-tick search-tick + 1 + if search-tick >= 10 [ + ifelse [ done-negotiating? ] of agent = false [ + if [ turn-to-negotiate ] of agent = 2 [ + ifelse [ offered-money ] of agent >= police-money-limit [ + ask agent [ + set stoppedByPolice? false + set done-negotiating? true + set turn-to-negotiate 1 + set money money - offered-money + ] + set next-task [ -> move-police ] + set search-tick 0 + ] [ + ask agent [ set turn-to-negotiate turn-to-negotiate + 1 ] + ] + ] + if [turn-to-negotiate] of agent = 4 [ + ifelse [offered-money] of agent >= police-money-limit [ + ask agent [ + set stoppedByPolice? false + set done-negotiating? true + set turn-to-negotiate 1 + set money money - offered-money + ] + set next-task [ -> move-police ] + set search-tick 0 + ] [ + ask agent [ + set done-negotiating? true + set turn-to-negotiate 1 + ] + ] + ] + ] [ + ask agent [ + (ifelse breed = adults [ + if hasDrugs? = true [ + police-arrest-agent agent + set hasDrugs? false + ] + ] breed = adult-gangsters [ + police-arrest-agent agent + set color color - 4 + ] [ + set stoppedByPolice? false + set police-ID nobody + ]) + ] + ] + ifelse [ arrested-time ] of agent != -1 [ + set next-task [ -> police-go-to-jail ] + ] [ + set ImOccupied 0 + set next-task [ -> move-police ] + ] + set search-tick 0 + ] +end + +to police-go-to-jail + ifelse distance min-one-of (prison) [distance myself]> 1 [ + set heading towards-nowrap one-of prison with [count turtles-here = 0] + forward 0.5 + ] + [ + set ImOccupied 0 + set status status + 1 + print self print status + set next-task [ -> move-police] + ] +end + +to ask-for-help + let IAskedForHelp self + set ImOccupied 1 + set someoneAskedForHelp 1 + ifelse any? other police with [ImOccupied = 0] [ + set RespondingOnHelp min-one-of (other police with [ImOccupied = 0]) [distance myself] + + ask RespondingOnHelp [ + set heading towards-nowrap IAskedForHelp + if distance min-one-of (other police) [distance myself] > 2 [ + fd 1 + ] + ] + ask IAskedForHelp [ + if any? (police-on neighbors) [ + set next-task [-> search-place] + ] + ] +] + [ set next-task [-> ask-for-help] + ] +end + +to search-place + ifelse any? hideouts-here[ + let hideout-to-search hideouts-here + if [drugs] of (one-of hideout-to-search) > 0 or [weapons] of (one-of hideout-to-search) > 0 + [set status status + 1] + print self print status + ask hideout-to-search [ + set weapons 0 + set drugs 0 + set color orange + ] + ask police [ + set list-of-known-hideouts lput hideout-to-search list-of-known-hideouts + set list-of-known-hideouts remove-duplicates list-of-known-hideouts + ] + ][ + let stash-houses-to-search stash-houses-here + if [drugs] of (one-of stash-houses-to-search) > 0 or [weapons] of (one-of stash-houses-to-search) > 0 + [set status status + 1] + print self print status + ask stash-houses-to-search [ + set weapons 0 + set drugs 0 + set color pink + ] + ] + set ImOccupied 0 + set next-task [-> move-police] +end + +to police-follow-child-gangster + set follow-tick follow-tick + 1 + ifelse [hidden?] of person-to-follow = true or follow-tick = 400 [ + set follow-tick -1 + set next-task [ -> move-police ] + ] + [ + + ifelse chance-of-finding-gangster = 0 and [carriesDrug?] of person-to-follow = true [ + + set next-task [ -> police-investigate ] + + ][ + set heading towards person-to-follow + ifelse [distance person-to-follow] of self < 3 [ + ifelse [distance person-to-follow] of self < 1 [ + stop + ][ + forward 0.2 + ] + ][ + forward 0.5 + ] + ] + + ] +end + + +to police-go-home + face homeAdress + forward 0.5 + + if (distance homeAdress < 0.5)[ + set next-task[-> police-at-home] + ] +end + +to police-at-home + if (time = 300)[ + set next-task[-> move-police] + ] +end + +to police-investigate + set follow-tick follow-tick + 1 + ifelse [hidden?] of person-to-follow = true or follow-tick = 600 [ + set follow-tick -1 + set next-task [ -> move-police ] + + ] + [ + ask person-to-follow [ + let temp-adult adult-gangster-order + ask one-of police [ + set list-of-known-gangsters lput temp-adult list-of-known-gangsters + set list-of-known-gangsters remove-duplicates list-of-known-gangsters + ; show list-of-known-gangsters + ] + ] + ] + +end + +to police-stop-agent [ agent ] + ask agent [ + set stoppedByPolice? true + set police-ID myself + ] +end + +to police-arrest-agent [ agent ] + ask agent [ + set numberOfConvictions numberOfConvictions + 1 + set color yellow + set arrested-time ticks + ] +end + + + diff --git a/samples/NetLogo/roads.nls b/samples/NetLogo/roads.nls new file mode 100644 index 0000000000..b5ecd3cccd --- /dev/null +++ b/samples/NetLogo/roads.nls @@ -0,0 +1,35 @@ +breed [nodes node] + +nodes-own[ + n-id +] + +directed-link-breed [roads road] + +roads-own [ + traffic + r-id +] + + +to new_node [ _id x-pos y-pos ] + set n-id _id + set color blue + set size 2 + set shape "circle" + setxy x-pos y-pos +end + +to print_node + write xcor + write ycor + print out-road-neighbors + print " " +end + + +to print_road + write traffic + print r-id +end + \ No newline at end of file diff --git a/samples/NetLogo/setup-map.nls b/samples/NetLogo/setup-map.nls new file mode 100644 index 0000000000..929bbcb5b9 --- /dev/null +++ b/samples/NetLogo/setup-map.nls @@ -0,0 +1,105 @@ +; __includes ["check-gis.nls" "lookup-series-color.nls"] +; extensions [gis] + +; globals [ +; data-series +; series-color +; background-color +; black-min +; black-value +; white-max +; white-value +; ] + +to setup-map + assert-gis dataset + + let #envelope gis:envelope-of dataset + + ifelse ((item 0 #envelope < -150) or (item 1 #envelope > 150)) [ + gis:set-world-envelope-ds #envelope + ] [ + gis:set-world-envelope #envelope + ] + + gis:apply-raster dataset value + + ; Convert `NaN` values to `false`. + ask patches [set value ifelse-value (is-nan? value) [false] [value]] + + if (reduce [[#i #j] -> not-empty? #i or not-empty? #j] world-bleed) [ + remove-world-bleed 0.25 1 + ] + + let #max-value max [value] of patches with [not is-false? value] + let #min-value min [value] of patches with [not is-false? value] + + ; Correct inflated values. + if ((#max-value - #min-value) > (10 ^ 6)) [ + let #extreme-values unique-outliers + [value] of patches with [not is-false? value] + 10 + + ask patches with [member? value #extreme-values] [set value false] + + set #max-value max [value] of patches with [not is-false? value] + set #min-value min [value] of patches with [not is-false? value] + ] + + let #min-pcolor-value 0 + let #max-pcolor-value 0 + + if (black-value >= white-value) [set white-value black-value + 50] + if (white-value <= black-value) [set black-value white-value - 50] + + ifelse (black-min = true) [ + set #min-pcolor-value #min-value + ] [ + set #min-pcolor-value black-value + ] + + ifelse (white-max = true) [ + set #max-pcolor-value #max-value + ] [ + set #max-pcolor-value white-value + ] + + ask (patches) [ + ifelse (not is-false? value) [ + set pcolor ( + scale-color series-color value #min-pcolor-value #max-pcolor-value + ) + + (ifelse ((index = 0) or (is-false? value-12)) [ + set value-12 (list value) + set value-12ma false + ] ((length value-12) < 12) [ + set value-12 lput value value-12 + ] [ + set value-12 but-first (lput value value-12) + ]) + + if ((length value-12) = 12) [ + set value-12ma mean value-12 + ] + ] [ + set pcolor background-color + set value-12 false + set value-12ma false + ] + + let #patch-envelope gis:envelope-of self + set latitude sublist #patch-envelope 2 4 + set longitude sublist #patch-envelope 0 2 + ] + + set cell-size + mean + remove-duplicates + map [i -> distance-between (first i) (last i)] + [longitude] of patches with [not is-false? value] + + if (not headless?) [ + plot-color-bar color-bar-bins #min-pcolor-value #max-pcolor-value + ] +end diff --git a/samples/TeX/Hauptdatei.nls b/samples/TeX/Hauptdatei.nls new file mode 100644 index 0000000000..b29f64070d --- /dev/null +++ b/samples/TeX/Hauptdatei.nls @@ -0,0 +1,38 @@ +\begin{thenomenclature} + + \nomgroup{A} + + \item [{AdaIN}]\begingroup Adaptive Instance Normalization\nomeqref {0} + \nompageref{iii} + \item [{AI}]\begingroup Artificial Intelligence\nomeqref {0} + \nompageref{iii} + \item [{CNN}]\begingroup Convolutional Neural Network\nomeqref {0} + \nompageref{iii} + \item [{DCGAN}]\begingroup Deep Convolutional Generative Adversarial Networks\nomeqref {0} + \nompageref{iii} + \item [{GAN}]\begingroup Generative Adversarial Network\nomeqref {0} + \nompageref{iii} + \item [{IEEE}]\begingroup Institute of Electrical and Electronics Engineers\nomeqref {0} + \nompageref{iii} + \item [{KI}]\begingroup Künstliche Intelligenz\nomeqref {0} + \nompageref{iii} + \item [{KL-Divergenz}]\begingroup Kullback-Leibler-Divergenz\nomeqref {0} + \nompageref{iii} + \item [{KNN}]\begingroup Künstliches Neurales Netz\nomeqref {0} + \nompageref{iii} + \item [{LSTM}]\begingroup Long Short-Term Memory\nomeqref {0} + \nompageref{iii} + \item [{ML}]\begingroup Machine Learning\nomeqref {0}\nompageref{iii} + \item [{NIPS}]\begingroup Neural Information Processing Systems (Konferenz)\nomeqref {0} + \nompageref{iii} + \item [{NN}]\begingroup Neural Network\nomeqref {0}\nompageref{iii} + \item [{PG-GAN}]\begingroup Progressive Growing Generative Adversarial Network\nomeqref {0} + \nompageref{iii} + \item [{RNN}]\begingroup Recurrent Neural Network\nomeqref {0} + \nompageref{iii} + \item [{SRGAN}]\begingroup Super Resolution Generative Adversarial Network\nomeqref {0} + \nompageref{iii} + \item [{VAE}]\begingroup Variational Autoencoder\nomeqref {0} + \nompageref{iii} + +\end{thenomenclature} diff --git a/samples/TeX/edengths.nls b/samples/TeX/edengths.nls new file mode 100644 index 0000000000..c07b059284 --- /dev/null +++ b/samples/TeX/edengths.nls @@ -0,0 +1,314 @@ +\begin{thenomenclature} + + \nomgroup{A} + + \item [{AC}]\begingroup Alternating Current\nomeqref {0} + \nompageref{xv} + \item [{ADMM}]\begingroup Alternating Direction Method of Multipliers\nomeqref {0} + \nompageref{xv} + \item [{ANM}]\begingroup Active Network Management\nomeqref {0} + \nompageref{xv} + \item [{APX}]\begingroup Amsterdam Power Exchange\nomeqref {0} + \nompageref{xv} + \item [{CDF}]\begingroup Cumulative Distribution Function\nomeqref {0} + \nompageref{xv} + \item [{CHP}]\begingroup Combined heat and power\nomeqref {0} + \nompageref{xv} + \item [{CO$_2$}]\begingroup Carbon dioxide\nomeqref {0} + \nompageref{xv} + \item [{DC}]\begingroup Direct Current\nomeqref {0}\nompageref{xv} + \item [{DG}]\begingroup Distributed generation\nomeqref {0} + \nompageref{xv} + \item [{DR}]\begingroup Demand response\nomeqref {0}\nompageref{xv} + \item [{DSM}]\begingroup Demand side management\nomeqref {0} + \nompageref{xv} + \item [{DSO, DNO}]\begingroup Distribution system/network operator\nomeqref {0} + \nompageref{xv} + \item [{ELEXON}]\begingroup Electric utility company in London\nomeqref {0} + \nompageref{xv} + \item [{EPEX}]\begingroup European Power Exchange\nomeqref {0} + \nompageref{xv} + \item [{EU}]\begingroup European Union\nomeqref {0}\nompageref{xv} + \item [{EV}]\begingroup Electric vehicle\nomeqref {0}\nompageref{xv} + \item [{ICT}]\begingroup Information and communication technology\nomeqref {0} + \nompageref{xv} + \item [{IEC}]\begingroup International Electrotechnical Commission\nomeqref {0} + \nompageref{xv} + \item [{IEEE}]\begingroup Institute of Electrical and Electronics Engineers\nomeqref {0} + \nompageref{xv} + \item [{ISO}]\begingroup International Organization for Standardization\nomeqref {0} + \nompageref{xv} + \item [{LP}]\begingroup Linear Programming, Linear Programme\nomeqref {0} + \nompageref{xv} + \item [{LV}]\begingroup Low Voltage\nomeqref {0}\nompageref{xv} + \item [{MATLAB}]\begingroup Programming Language\nomeqref {0} + \nompageref{xv} + \item [{MC}]\begingroup Monte Carlo\nomeqref {0}\nompageref{xv} + \item [{MDP}]\begingroup Markov Decision Process\nomeqref {0} + \nompageref{xv} + \item [{MPC}]\begingroup Model Predictive Control\nomeqref {0} + \nompageref{xv} + \item [{MV}]\begingroup Medium Voltage\nomeqref {0}\nompageref{xv} + \item [{OLTC}]\begingroup On Load Tap Changer\nomeqref {0} + \nompageref{xv} + \item [{OpenDSS}]\begingroup Open-source electrical power Distribution System Simulator\nomeqref {0} + \nompageref{xv} + \item [{PDF}]\begingroup Probability Distribution Function\nomeqref {0} + \nompageref{xv} + \item [{PF}]\begingroup Power Flow\nomeqref {0}\nompageref{xv} + \item [{PV}]\begingroup Photovoltaic\nomeqref {0}\nompageref{xv} + \item [{Python}]\begingroup Programming Language\nomeqref {0} + \nompageref{xv} + \item [{RPD}]\begingroup Reference Price Data\nomeqref {0} + \nompageref{xv} + \item [{RTP}]\begingroup Real time prices (type of electricity tariffs)\nomeqref {0} + \nompageref{xv} + \item [{Scipy}]\begingroup Python library for scientific computing\nomeqref {0} + \nompageref{xv} + \item [{SOC}]\begingroup State of charge\nomeqref {0}\nompageref{xv} + \item [{THD}]\begingroup Total Harmonic Distortion\nomeqref {0} + \nompageref{xv} + \item [{TSO}]\begingroup Transmission system operator\nomeqref {0} + \nompageref{xv} + \item [{UK}]\begingroup United Kingdom\nomeqref {0}\nompageref{xv} + \item [{UKPX}]\begingroup United Kingdom Power Exchange\nomeqref {0} + \nompageref{xv} + \item [{ULEV}]\begingroup Ultra low emission vehicles\nomeqref {0} + \nompageref{xv} + \item [{USA, US}]\begingroup United States of America\nomeqref {0} + \nompageref{xv} + \item [{V2G}]\begingroup Vehicle-to-Grid\nomeqref {0}\nompageref{xv} + + \nomgroup{D} + + \item [{$\bar{}$}]\begingroup Average value\nomeqref {0} + \nompageref{xv} + \item [{$\hat{}$}]\begingroup Estimate for uncertain parameter\nomeqref {0} + \nompageref{xv} + \item [{$\tilde{}$}]\begingroup Uncertain parameter\nomeqref {0} + \nompageref{xv} + + \nomgroup{N} + + \item [{$\bm{0}_{X,Y}$}]\begingroup Zero matrix with dimensions $X\times Y$\nomeqref {0} + \nompageref{xv} + \item [{$\bm{\rho}$}]\begingroup Matrix of correlation coefficients\nomeqref {0} + \nompageref{xv} + \item [{$\displaystyle e$}]\begingroup Euler's number\nomeqref {0} + \nompageref{xv} + \item [{$\Gamma(x)$}]\begingroup Gamma function\nomeqref {0} + \nompageref{xv} + \item [{$\gamma_1$}]\begingroup Skewness of a distribution\nomeqref {0} + \nompageref{xv} + \item [{$\gamma_2$}]\begingroup Kurtosis of a distribution\nomeqref {0} + \nompageref{xv} + \item [{$\lambda$}]\begingroup Rate parameter of the exponential distribution\nomeqref {0} + \nompageref{xv} + \item [{$\mathbb{B}$}]\begingroup Set of binary numbers\nomeqref {0} + \nompageref{xv} + \item [{$\mathbb{E}[X]$}]\begingroup Expectation value of a random variable $X$\nomeqref {0} + \nompageref{xv} + \item [{$\mathbb{N}$}]\begingroup Set of natural numbers\nomeqref {0} + \nompageref{xv} + \item [{$\mathbb{P}(x=X)$}]\begingroup Probability of $x$ being realised from a random variable $X$\nomeqref {0} + \nompageref{xv} + \item [{$\mathbb{R}$}]\begingroup Set of real numbers\nomeqref {0} + \nompageref{xv} + \item [{$\mathcal{M}$}]\begingroup Generic multivariate distribution\nomeqref {0} + \nompageref{xv} + \item [{$\mathcal{M}_i$}]\begingroup Marginal distribution of generic multivariate distribution\nomeqref {0} + \nompageref{xv} + \item [{$\mathcal{N}(\mu,\sigma)$}]\begingroup Univariate normal distribution with mean $\mu$ and standard deviation $\sigma$\nomeqref {0} + \nompageref{xv} + \item [{$\mathcal{N}_i(\bm{\mu},\bm{\rho})$}]\begingroup Multivariate normal distribution with means $\bm{\mu}\in \mathbb{R}^i$ and matrix of correlation coefficients $\bm{\rho}\in \mathbb{R}^{i\times i}$\nomeqref {0} + \nompageref{xv} + \item [{$\mathcal{U}(a,b)$}]\begingroup Uniform distribution on the interval $[a,b]$\nomeqref {0} + \nompageref{xv} + \item [{$\mu$}]\begingroup Mean, location parameter of logistic distribution\nomeqref {0} + \nompageref{xv} + \item [{$\Phi$}]\begingroup Cumulative distribution function of standard normal distribution $\mathcal{N}(0,1)$\nomeqref {0} + \nompageref{xv} + \item [{$\sigma$}]\begingroup Standard deviation\nomeqref {0} + \nompageref{xv} + \item [{$\sigma^2$}]\begingroup Variance\nomeqref {0}\nompageref{xv} + \item [{$\theta$}]\begingroup Scale parameter of Gamma distribution\nomeqref {0} + \nompageref{xv} + \item [{$a$}]\begingroup Shape parameter of Gamma distribution\nomeqref {0} + \nompageref{xv} + \item [{$F$}]\begingroup Cumulative distribution function\nomeqref {0} + \nompageref{xv} + \item [{$f$}]\begingroup Probability distribution function\nomeqref {0} + \nompageref{xv} + \item [{$F^{-1}$}]\begingroup Inverse cumulative distribution function\nomeqref {0} + \nompageref{xv} + \item [{$r$}]\begingroup Sample Pearson correlation coefficient, lag-1 autocorrelation\nomeqref {0} + \nompageref{xv} + \item [{$s$}]\begingroup Scale parameter of logistic distribution\nomeqref {0} + \nompageref{xv} + \item [{$W$}]\begingroup Univariate random variable\nomeqref {0} + \nompageref{xv} + \item [{$w$}]\begingroup Realisation of random variable $W$\nomeqref {0} + \nompageref{xv} + \item [{$X$}]\begingroup Bivariate random variable\nomeqref {0} + \nompageref{xv} + \item [{$x_i$}]\begingroup i-th realisation of random variable $X$\nomeqref {0} + \nompageref{xv} + \item [{$Z$}]\begingroup Bivariate random variable\nomeqref {0} + \nompageref{xv} + \item [{$z_i$}]\begingroup i-th realisation of random variable $Z$\nomeqref {0} + \nompageref{xv} + + \nomgroup{P} + + \item [{$\alpha^{EV}_{k,t}$}]\begingroup Vehicle availability at slot $t$ at household $k$\nomeqref {0} + \nompageref{xv} + \item [{$\bar{\pi}$}]\begingroup Average spot price (p/kWh)\nomeqref {0} + \nompageref{xv} + \item [{$\bm{\lambda}$}]\begingroup Network line loading sensitivity matrix (A/kW)\nomeqref {0} + \nompageref{xv} + \item [{$\bm{\mu}$}]\begingroup Network voltage sensitivity matrix (V/kW)\nomeqref {0} + \nompageref{xv} + \item [{$\Delta P$}]\begingroup Incremental step size of load limitation (kW)\nomeqref {0} + \nompageref{xv} + \item [{$\Delta t$}]\begingroup Granularity, resolution, slot length (hours)\nomeqref {0} + \nompageref{xv} + \item [{$\Delta^{EV}_{max}$}]\begingroup Maximum rate of change of charging power (kW)\nomeqref {0} + \nompageref{xv} + \item [{$\delta_{mil}$}]\begingroup Daily mileage of an electric vehicle (miles)\nomeqref {0} + \nompageref{xv} + \item [{$\eta$}]\begingroup Charging efficiency\nomeqref {0} + \nompageref{xv} + \item [{$\gamma_{min}$}]\begingroup Battery charge level threshold for the provision of regulation service\nomeqref {0} + \nompageref{xv} + \item [{$\kappa$}]\begingroup Sequence of factors describing the severity of price uncertainty\nomeqref {0} + \nompageref{xv} + \item [{$\mu_{arr}$}]\begingroup Average arrival time (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\mu_{dep}$}]\begingroup Average departure time (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\mu_{mil}$}]\begingroup Average daily mileage (miles)\nomeqref {0} + \nompageref{xv} + \item [{$\nu_{\alpha}$}]\begingroup Degree of certainty that vehicle is available\nomeqref {0} + \nompageref{xv} + \item [{$\nu_{\pi}$}]\begingroup Degree of certainty that price is not higher\nomeqref {0} + \nompageref{xv} + \item [{$\nu_{B}$}]\begingroup Degree of certainty that initial battery charge level is no less than entered\nomeqref {0} + \nompageref{xv} + \item [{$\omega$}]\begingroup Sequence of white Gaussian noise\nomeqref {0} + \nompageref{xv} + \item [{$\pi$}]\begingroup Input price profile (p/kWh)\nomeqref {0} + \nompageref{xv} + \item [{$\pi'$}]\begingroup Temporally extended price input profile (p/kWh)\nomeqref {0} + \nompageref{xv} + \item [{$\pi^{EPEX}_t$}]\begingroup Pure spot market price at time slot $t$ (p/kWh)\nomeqref {0} + \nompageref{xv} + \item [{$\rho$}]\begingroup Regulation service price (p/kW$\cdot$h)\nomeqref {0} + \nompageref{xv} + \item [{$\sigma$}]\begingroup Indices of sorted prices in ascending order\nomeqref {0} + \nompageref{xv} + \item [{$\sigma_{arr}$}]\begingroup Standard deviation of arrival times (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\sigma_{dep}$}]\begingroup Standard deviation of departure times (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\sigma_{mil}$}]\begingroup Standard deviation of daily milage (miles)\nomeqref {0} + \nompageref{xv} + \item [{$\tau_{arr}$}]\begingroup Arrival time of an electric vehicle (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\tau_{dep}$}]\begingroup Departure time of an electric vehicle (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\tau_{init}$}]\begingroup Time of the day in minutes at which the optimisation routine starts (minutes)\nomeqref {0} + \nompageref{xv} + \item [{$\theta$}]\begingroup Priority list (order in which electric vehicles are scheduled)\nomeqref {0} + \nompageref{xv} + \item [{$\xi$}]\begingroup Sequence of red Gaussian noise where $\xi_t \sim \mathcal{N}(0,1)$\nomeqref {0} + \nompageref{xv} + \item [{$\zeta$}]\begingroup Consumption rate of electric vehicles (kWh/km)\nomeqref {0} + \nompageref{xv} + \item [{$B^{arr}_{k}$}]\begingroup Initial battery charge level of electric vehicle at household $k$ (kWh)\nomeqref {0} + \nompageref{xv} + \item [{$B_{max}$}]\begingroup Battery capacity of electric vehicles (kWh)\nomeqref {0} + \nompageref{xv} + \item [{$C$}]\begingroup Objective function of problem (p)\nomeqref {0} + \nompageref{xv} + \item [{$C'$}]\begingroup Objective function of problem including regulation service provision (p)\nomeqref {0} + \nompageref{xv} + \item [{$D_k^{EV}$}]\begingroup Electric vehicle energy demand (kWh)\nomeqref {0} + \nompageref{xv} + \item [{$D_{k,t}$}]\begingroup Residential electricity demand of household $k$ in slot $t$ (kW)\nomeqref {0} + \nompageref{xv} + \item [{$I^{line}_{\ell,t}$}]\begingroup Current through cable $\ell$ in slot $t$ (A)\nomeqref {0} + \nompageref{xv} + \item [{$I^{max}_{\ell}$}]\begingroup Rated ampacity of cable $\ell$ (A)\nomeqref {0} + \nompageref{xv} + \item [{$K$}]\begingroup Number of households\nomeqref {0} + \nompageref{xv} + \item [{$L$}]\begingroup Number of transmission lines\nomeqref {0} + \nompageref{xv} + \item [{$P^{EV}_{max}$}]\begingroup Maximum EV charging rate (kW)\nomeqref {0} + \nompageref{xv} + \item [{$P^{EV}_{min}$}]\begingroup Minimum EV charging rate (kW)\nomeqref {0} + \nompageref{xv} + \item [{$q$}]\begingroup Static price surcharge (p/kWh)\nomeqref {0} + \nompageref{xv} + \item [{$s$}]\begingroup Price spreading factor\nomeqref {0} + \nompageref{xv} + \item [{$S_t^{tr}$}]\begingroup Apparent power flowing through the transformer (kVA)\nomeqref {0} + \nompageref{xv} + \item [{$S_{max}^{tr}$}]\begingroup Maximum allowed apparent power flowing through the transformer (kVA)\nomeqref {0} + \nompageref{xv} + \item [{$T$}]\begingroup Optimisation horizon in slots, transposition operator\nomeqref {0} + \nompageref{xv} + \item [{$T_{viol}$}]\begingroup Subset of slots $T$ with technical constraint violations\nomeqref {0} + \nompageref{xv} + \item [{$V_{k,t,init}^{bus}$}]\begingroup Initial terminal phase voltage without electric vehicles (V)\nomeqref {0} + \nompageref{xv} + \item [{$V_{k,t}^{bus}$}]\begingroup Terminal phase voltage (V)\nomeqref {0} + \nompageref{xv} + \item [{$V_{max}$}]\begingroup Maximum phase voltage (V)\nomeqref {0} + \nompageref{xv} + \item [{$V_{min}$}]\begingroup Minimum phase voltage (V)\nomeqref {0} + \nompageref{xv} + \item [{$w$}]\begingroup Temporal shift of residential demand (hours)\nomeqref {0} + \nompageref{xv} + \item [{$w_{max}$}]\begingroup Maximum window size of demand peaks (hours)\nomeqref {0} + \nompageref{xv} + + \nomgroup{S} + + \item [{$\ell$}]\begingroup Line identifier\nomeqref {0} + \nompageref{xv} + \item [{$k$}]\begingroup Node with household connected\nomeqref {0} + \nompageref{xv} + \item [{$t$}]\begingroup Time slot\nomeqref {0}\nompageref{xv} + + \nomgroup{U} + + \item [{\pounds}]\begingroup British Pound (unit of currency)\nomeqref {0} + \nompageref{xv} + \item [{A}]\begingroup Ampere (unit of current)\nomeqref {0} + \nompageref{xv} + \item [{h}]\begingroup Hours (unit of time)\nomeqref {0} + \nompageref{xv} + \item [{kVA}]\begingroup Kilovolt-amperes (unit of apparent power)\nomeqref {0} + \nompageref{xv} + \item [{kvar}]\begingroup Kilovolt-amperes reactive (unit of reactive power)\nomeqref {0} + \nompageref{xv} + \item [{kW}]\begingroup Kilowatt (unit of active power)\nomeqref {0} + \nompageref{xv} + \item [{kWh}]\begingroup Kilowatt-hour (unit of energy)\nomeqref {0} + \nompageref{xv} + \item [{min}]\begingroup Minutes (unit of time)\nomeqref {0} + \nompageref{xv} + \item [{p}]\begingroup British Pence (sub-unit of currency: \pounds 1 = 100 p)\nomeqref {0} + \nompageref{xv} + \item [{V}]\begingroup Volt (unit of voltage)\nomeqref {0} + \nompageref{xv} + + \nomgroup{V} + + \item [{$\omega_{k,t}$}]\begingroup Regulation service provision of EV at household $k$ in time slot $t$\nomeqref {0} + \nompageref{xv} + \item [{$P^{EV}_{k,t}$}]\begingroup Charging rate of electric vehicel at household $k$ in time slot $t$ (kW)\nomeqref {0} + \nompageref{xv} + +\end{thenomenclature} diff --git a/samples/TeX/tcc-ifbaiano.nls b/samples/TeX/tcc-ifbaiano.nls new file mode 100644 index 0000000000..d9e294037a --- /dev/null +++ b/samples/TeX/tcc-ifbaiano.nls @@ -0,0 +1,13 @@ + +\begin{thenomenclature} +\nomgroup{A} + \item [{API}]\begingroup Application Programming Interface\nomeqref {0}\nompageref{1} + \item [{CSRF}]\begingroup Cross-Site Request Forgery\nomeqref {0}\nompageref{1} + \item [{CSS3}]\begingroup Cascading Style Sheets 3\nomeqref {0}\nompageref{1} + \item [{HTML5}]\begingroup HyperText Markup Language 5\nomeqref {0}\nompageref{1} + \item [{ORM}]\begingroup Object-Relational Mapping\nomeqref {0}\nompageref{1} + \item [{QR Code}]\begingroup Quick Response Code\nomeqref {0}\nompageref{1} + \item [{REST}]\begingroup Representational State Transfer\nomeqref {0}\nompageref{1} + \item [{SCAMPER}]\begingroup Substitute, Combine, Adapt, Modify, Put to another use, Eliminate, Reverse\nomeqref {0}\nompageref{1} + +\end{thenomenclature}