Skip to content

Commit

Permalink
create new regulations subproject
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaspayette committed Feb 6, 2025
1 parent c501b9b commit 4cc6371
Show file tree
Hide file tree
Showing 47 changed files with 85 additions and 104 deletions.
1 change: 1 addition & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions .idea/modules/agents/POSEIDON.agents.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/biology/POSEIDON.biology.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/core/POSEIDON.core.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/examples/POSEIDON.examples.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/geography/POSEIDON.geography.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/gui/POSEIDON.gui.main.iml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules/io/POSEIDON.io.main.iml

This file was deleted.

8 changes: 8 additions & 0 deletions .idea/modules/regulations/POSEIDON.regulations.main.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
}

dependencies {
implementation(project(":agents"))
implementation(project(":regulations"))
implementation(project(":biology"))
implementation(project(":io"))
implementation(project(":gui"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
import uk.ac.ox.poseidon.agents.registers.Register;
import uk.ac.ox.poseidon.agents.registers.RegisterFactory;
import uk.ac.ox.poseidon.agents.registers.RegisteringFactory;
import uk.ac.ox.poseidon.agents.regulations.AlwaysPermittedFactory;
import uk.ac.ox.poseidon.agents.regulations.FishingLocationLegalityCheckerFactory;
import uk.ac.ox.poseidon.agents.tables.FishingActionListenerTableFactory;
import uk.ac.ox.poseidon.agents.vessels.RandomHomePortFactory;
import uk.ac.ox.poseidon.agents.vessels.VesselFactory;
Expand Down Expand Up @@ -83,6 +81,8 @@
import uk.ac.ox.poseidon.io.ScenarioWriter;
import uk.ac.ox.poseidon.io.tables.CsvTableWriter;
import uk.ac.ox.poseidon.io.tables.CsvTableWriterFactory;
import uk.ac.ox.poseidon.regulations.AlwaysPermittedFactory;
import uk.ac.ox.poseidon.regulations.FishingLocationLegalityCheckerFactory;

import java.nio.file.Path;
import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
import uk.ac.ox.poseidon.agents.registers.Register;
import uk.ac.ox.poseidon.agents.registers.RegisterFactory;
import uk.ac.ox.poseidon.agents.registers.RegisteringFactory;
import uk.ac.ox.poseidon.agents.regulations.FishingLocationLegalityCheckerFactory;
import uk.ac.ox.poseidon.agents.regulations.NeverPermittedFactory;
import uk.ac.ox.poseidon.agents.tables.FishingActionListenerTableFactory;
import uk.ac.ox.poseidon.agents.vessels.RandomHomePortFactory;
import uk.ac.ox.poseidon.agents.vessels.VesselFactory;
Expand Down Expand Up @@ -82,6 +80,8 @@
import uk.ac.ox.poseidon.io.ScenarioWriter;
import uk.ac.ox.poseidon.io.tables.CsvTableWriter;
import uk.ac.ox.poseidon.io.tables.CsvTableWriterFactory;
import uk.ac.ox.poseidon.regulations.FishingLocationLegalityCheckerFactory;
import uk.ac.ox.poseidon.regulations.NeverPermittedFactory;

import java.nio.file.Path;
import java.time.LocalDate;
Expand Down
27 changes: 27 additions & 0 deletions regulations/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* POSEIDON: an agent-based model of fisheries
* Copyright (c) 2025 CoHESyS Lab [email protected]
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/

plugins {
id("buildlogic.java-library-conventions")
}


dependencies {
api(project(":agents"))
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import uk.ac.ox.poseidon.agents.behaviours.Action;
import uk.ac.ox.poseidon.agents.regulations.Regulations;

public class AlwaysPermitted implements Regulations {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import uk.ac.ox.poseidon.core.GlobalScopeFactory;
import uk.ac.ox.poseidon.core.Simulation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.RequiredArgsConstructor;
import sim.util.Int2D;
import uk.ac.ox.poseidon.agents.behaviours.Action;
import uk.ac.ox.poseidon.agents.behaviours.fishing.DummyFishingAction;
import uk.ac.ox.poseidon.agents.regulations.Regulations;
import uk.ac.ox.poseidon.agents.vessels.Vessel;
import uk.ac.ox.poseidon.geography.distance.Distance;
import uk.ac.ox.poseidon.geography.paths.GridPathFinder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import uk.ac.ox.poseidon.agents.regulations.Regulations;
import uk.ac.ox.poseidon.agents.vessels.Vessel;
import uk.ac.ox.poseidon.agents.vessels.VesselScopeFactory;
import uk.ac.ox.poseidon.core.Factory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.RequiredArgsConstructor;
import uk.ac.ox.poseidon.agents.behaviours.Action;
import uk.ac.ox.poseidon.agents.regulations.Regulations;

import java.util.function.Predicate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import uk.ac.ox.poseidon.agents.behaviours.Action;
import uk.ac.ox.poseidon.agents.regulations.Regulations;

public class NeverPermitted implements Regulations {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import uk.ac.ox.poseidon.core.GlobalScopeFactory;
import uk.ac.ox.poseidon.core.Simulation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.RequiredArgsConstructor;
import uk.ac.ox.poseidon.agents.behaviours.Action;
import uk.ac.ox.poseidon.agents.regulations.Regulations;

import java.util.function.Predicate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations;
package uk.ac.ox.poseidon.regulations;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import com.google.common.collect.ImmutableList;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import com.google.common.collect.ImmutableList;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import lombok.Getter;
import lombok.NonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.operators;
package uk.ac.ox.poseidon.regulations.predicates.operators;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.temporal;
package uk.ac.ox.poseidon.regulations.predicates.temporal;

import lombok.Getter;
import lombok.NonNull;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.temporal;
package uk.ac.ox.poseidon.regulations.predicates.temporal;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.temporal;
package uk.ac.ox.poseidon.regulations.predicates.temporal;

import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*
*/

package uk.ac.ox.poseidon.agents.regulations.predicates.temporal;
package uk.ac.ox.poseidon.regulations.predicates.temporal;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Loading

0 comments on commit 4cc6371

Please sign in to comment.