Skip to content

Commit

Permalink
move Cnossos attenuation stuff from pathfinder to propagation package
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-f committed Dec 4, 2024
1 parent 77ab3c0 commit 9ed58d5
Show file tree
Hide file tree
Showing 26 changed files with 940 additions and 1,073 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

package org.noise_planet.noisemodelling.jdbc;

import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.Attenuation;

import java.util.concurrent.ConcurrentLinkedDeque;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
package org.noise_planet.noisemodelling.jdbc;

import org.noise_planet.noisemodelling.pathfinder.IComputePathsOut;
import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.pathfinder.utils.AcousticIndicatorsFunctions;
import org.noise_planet.noisemodelling.propagation.Attenuation;
import org.noise_planet.noisemodelling.propagation.AttenuationVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import org.locationtech.jts.geom.LineString;
import org.noise_planet.noisemodelling.jdbc.utils.StringPreparedStatements;
import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.Attenuation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import org.locationtech.jts.math.Vector3D;
import org.noise_planet.noisemodelling.pathfinder.path.Scene;
import org.noise_planet.noisemodelling.pathfinder.PathFinder;
import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.pathfinder.delaunay.LayerDelaunayError;
import org.noise_planet.noisemodelling.pathfinder.path.SegmentPath;
import org.noise_planet.noisemodelling.propagation.cnossos.SegmentPath;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.ProfileBuilder;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.ProfileBuilderDecorator;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.WallAbsorption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.noise_planet.noisemodelling.jdbc.Utils.JDBCComputeRaysOut;
import org.noise_planet.noisemodelling.jdbc.Utils.JDBCPropagationData;
import org.noise_planet.noisemodelling.pathfinder.*;
import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.GroundAbsorption;
import org.noise_planet.noisemodelling.pathfinder.utils.geometry.Orientation;
import org.noise_planet.noisemodelling.pathfinder.utils.profiler.RootProgressVisitor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.h2gis.utilities.SpatialResultSet;
import org.locationtech.jts.geom.Geometry;
import org.noise_planet.noisemodelling.pathfinder.*;
import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.pathfinder.path.Scene;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.ProfileBuilder;
import org.noise_planet.noisemodelling.propagation.cnossos.AttenuationCnossosParameters;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,45 @@

package org.noise_planet.noisemodelling.pathfinder;

import org.noise_planet.noisemodelling.pathfinder.cnossos.CnossosPath;
import org.noise_planet.noisemodelling.pathfinder.profilebuilder.CutProfile;

import java.util.List;

/**
* Instead of feeding a list and returning all vertical cut planes.
* A visitor instance that implement this interface can skip planes and intervene in the search of cut planes.
*/
public interface IComputePathsOut {

/**
* Get propagation path result
* @param sourceId Source identifier
* @param sourceLi Source power per meter coefficient
* @param pathParameters Propagation path result
* A new vertical profile between a receiver and a source has been found
*
* @param cutProfile vertical profile
* @return Will skip or not the next processing depending on this value.
*/
double[] addPropagationPaths(long sourceId, double sourceLi, long receiverId, List<CnossosPath> pathParameters);
PathSearchStrategy onNewCutPlane(CutProfile cutProfile);

enum PathSearchStrategy {
/**
* Continue looking for vertical cut planes
*/
CONTINUE,
/**
* Skip remaining potential vertical planes for this source point
*/
SKIP_SOURCE,
/**
* Ignore other sources and process to the next receiver
*/
SKIP_RECEIVER
}

/**
* No more propagation paths will be pushed for this receiver identifier
* @param receiverId
* @param receiverId Primary key of the receiver (not the id of the receiver in the subdomain)
*/
void finalizeReceiver(long receiverId);

/**
* If the implementation does not support thread concurrency, this method is called to return an instance
* @return
Expand Down
Loading

0 comments on commit 9ed58d5

Please sign in to comment.