mess-nlesc / model

NetLogo code for an agent-basel model
Apache License 2.0
0 stars 0 forks source link

Identify parameters and their range for a parameter sweep #27

Open lyashevska opened 7 months ago

lyashevska commented 7 months ago

This relates to #29

lyashevska commented 7 months ago
Parameters to test as suggested in 'Parameters to test IRABM3.xlsx' Input Parameters Value Increment
Simulation years 100
RiverDischarge (Qin_Average) 650-1000 10, 20
GateCapacity (QGateMaxFixed) 30-200 10
QHeadGateMaxFixed
GC adjustment variation 3, 4, 5
Continuously poor harvest years 5
Continuously good harvest years 5
Harvest memory 10,20
Available water memory 10,20
Qin_randomizer 0
QGateLimit? true
QHeadGateLimit? true
TotalIrrigationDemand 410
Pre-IrrigationDemand 82
BarleyIrrigationDemand 82
BarleyIrrigationMemory 36
MaximunStorageOfStoragePatch 200
StartBarley 44
BarleyYieldY6 880
BarleyYieldY5 440
BarleyYieldY4 220
BarleyYieldY3 110
BarleyYieldY2 55
BarleyYieldY1 27
BarleyYieldY0 0
CountDownForWaterAvailability 365
ComparisonCountDownForCanalExpansion 365
ComparisonCountDownForFarmersExpansion 365
CountDownForHarvestMemory 365
fdiblen commented 3 months ago

@mwertsen @Dengxiao-Lang Can you please tell us where these variables can be found in the model?

For example, as we understand for the GateCapacity variable of farmer 1 and canal 10, one needs to change the values from 30 to desired value at the lines below. Is that correct?

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L95

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L101

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L106

fdiblen commented 3 months ago

@lyashevska just mentioned you run some experiments in the past which are also described in the table on page 5 of Summary overview of IRABM3.docx. We would like to know what changes you made for each of these experiments.

Dengxiao-Lang commented 3 months ago

Hi @fdiblen

These lines are for gate capacity adjusting. The logic of this process is:

In the beginning, all farmers have the same initial gate capacity (30<IGC< = 200).

Then, farmers' harvest situation will be evaluated every year:

If there is a poor harvest situation among these farmers, the gate capacity of upstream farmers and mid-stream farmers will be decreased; if there are poor harvest situations that last for many years and the gate capacity of upstream and mid-stream farmers is higher than 30 (like line 95 and 101), their gate capacity will be gradually decreased till to 30 (like line 106).

Thus, 30 is the minimum gate capacity for all farmers.

I hope this answered your question.

发自 Outlookhttp://aka.ms/weboutlook


发件人: fdiblen @.> 发送时间: 2024年3月19日 18:05 收件人: mess-nlesc/model @.> 抄送: Dengxiao Lang @.>; Mention @.> 主题: Re: [mess-nlesc/model] Identify parameters and their range for a parameter sweep (Issue #27)

@mwertsenhttps://github.com/mwertsen @Dengxiao-Langhttps://github.com/Dengxiao-Lang Can you please tell us where these variables can be found in the model?

For example, as we understand for the GateCapacity variable of farmer 1 and canal 10, one needs to change the values from 30 to desired value at the lines below. Is that correct?

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L95

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L101

https://github.com/mess-nlesc/model/blob/b0ece6ba725837d92c0fec5d0a742f3b243597e3/model/GateCapacity.nls#L106

― Reply to this email directly, view it on GitHubhttps://github.com/mess-nlesc/model/issues/27#issuecomment-2007700819, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMCLBQ2M3LMUSNV3Q2YUJTYZBV5DAVCNFSM6AAAAAA7WDIDIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXG4YDAOBRHE. You are receiving this because you were mentioned.

fdiblen commented 3 months ago

Hi @Dengxiao-Lang,

Thank you, it helps to understand how gate capacity is calculated.

Can you please also help us with identifying where these variables are used in the code? We want to know what hard coded numbers need to change in order to run experiments with different values of:

  1. RiverDischarge
  2. GateCapacity
  3. GC adjustment variation
  4. Harvest memory
  5. Available water memory
Dengxiao-Lang commented 3 months ago

I am sorry I forgot to mention these variables in the earlier email.

The first three variables are presented as sliders (NetLogo function) in the NetLgo interface, the other two are calculated in this code:

Qin_average = RiverDischarge QGateMaxFixed = GateCapacity (initial) ComparisonTime = GC adjustment variation (please refer to the FarmersHarvestEvaluation.nls) AverageHarvestBarley = Harvest memory (please refer to the HarvestMemory.nls) AvailableWaterSupply = Available water memory (please refer to the AvailableWaterSupply.nls)

发自 Outlookhttp://aka.ms/weboutlook


发件人: fdiblen @.> 发送时间: 2024年3月20日 14:51 收件人: mess-nlesc/model @.> 抄送: Dengxiao Lang @.>; Mention @.> 主题: Re: [mess-nlesc/model] Identify parameters and their range for a parameter sweep (Issue #27)

Hi @Dengxiao-Langhttps://github.com/Dengxiao-Lang,

Thank you, it helps to understand how gate capacity is calculated.

Can you please also help us with identifying where these variables are used in the code? We want to know what hard coded numbers need to change in order to run experiments with different values of:

  1. RiverDischarge
  2. GateCapacity
  3. GC adjustment variation
  4. Harvest memory
  5. Available water memory

― Reply to this email directly, view it on GitHubhttps://github.com/mess-nlesc/model/issues/27#issuecomment-2009616149, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMMCLBRFLYVCVHI5YGFEWITYZGH4NAVCNFSM6AAAAAA7WDIDIWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBZGYYTMMJUHE. You are receiving this because you were mentioned.Message ID: @.***>

lyashevska commented 3 months ago

Suppose we run the following: ./netlogo-headless.sh --model "model/main.nlogo" --experiment "RD40to200_GC30_CSPHY3__50years" --table output.csv

where: --experiment "RD40to200_GC30_CSPHY3__50years" corresponds to https://github.com/mess-nlesc/model/blob/5980b7e24080ff733598f4d55ef71e14ed4838a0/model/main.nlogo#L10570

If we further look into say Qin_Average (RiverDischarge) we can see it is controlled here: https://github.com/mess-nlesc/model/blob/5980b7e24080ff733598f4d55ef71e14ed4838a0/model/main.nlogo#L10672

And QGateMaxFixed (GateCapacity) here: https://github.com/mess-nlesc/model/blob/5980b7e24080ff733598f4d55ef71e14ed4838a0/model/main.nlogo#L10688

The <steppedValueSet> and <enumeratedValueSet> tags define the parameters. The <steppedValueSet> tag is used for parameters that should be varied in steps between a start and end value. The <enumeratedValueSet> tag is used for parameters that should take on a specific set of values. For example, the "Qin_average" parameter is varied from 40 to 200 in steps of 10, and the "QGateMaxFixed" parameter is set to 30.

lyashevska commented 3 months ago

This relates to #33

Dengxiao-Lang commented 2 months ago

Hi @lyashevska @fdiblen I am sorry for being late. Could you please find the Parameter Sweep in this Excel: Parameter Sweep.xlsx

If something is lacking please do not hesitate to contact me.