File tree Expand file tree Collapse file tree 1 file changed +22
-13
lines changed
epo/src/main/java/uk/ac/ox/poseidon/epo Expand file tree Collapse file tree 1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import uk .ac .ox .oxfish .experiments .tuna .Policy ;
4
4
import uk .ac .ox .oxfish .model .scenario .EpoScenario ;
5
+ import uk .ac .ox .oxfish .regulations .ForbiddenIf ;
6
+ import uk .ac .ox .oxfish .regulations .NamedRegulations ;
5
7
import uk .ac .ox .oxfish .regulations .conditions .AnyOf ;
6
8
import uk .ac .ox .oxfish .regulations .conditions .BetweenYearlyDates ;
7
9
import uk .ac .ox .oxfish .regulations .conditions .InRectangularArea ;
@@ -36,20 +38,27 @@ public List<Policy<EpoScenario<?>>> get() {
36
38
extraDays ,
37
39
extraDays
38
40
),
39
- epoScenario ->
40
- new AnyOf (
41
- yearsActiveCondition (),
42
- new BetweenYearlyDates (
43
- addDays (EL_CORRALITO_BEGINNING , -extraDays ),
44
- addDays (EL_CORRALITO_END , extraDays )
45
- ),
46
- new InRectangularArea (
47
- 50 ,
48
- -150 ,
49
- -50 ,
50
- eastLongitude
41
+ epoScenario -> {
42
+ final NamedRegulations namedRegulations = (NamedRegulations ) epoScenario .getRegulations ();
43
+ namedRegulations .modify (
44
+ "El Corralito" ,
45
+ () -> new ForbiddenIf (
46
+ new AnyOf (
47
+ yearsActiveCondition (),
48
+ new BetweenYearlyDates (
49
+ addDays (EL_CORRALITO_BEGINNING , -extraDays ),
50
+ addDays (EL_CORRALITO_END , extraDays )
51
+ ),
52
+ new InRectangularArea (
53
+ 50 ,
54
+ -150 ,
55
+ -50 ,
56
+ eastLongitude
57
+ )
58
+ )
51
59
)
52
- )
60
+ );
61
+ }
53
62
)
54
63
).collect (toImmutableList ());
55
64
}
You can’t perform that action at this time.
0 commit comments