Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
29971a2
refactor: decouple P2P propagation model
mglesser May 21, 2026
3c1c1f8
Merge branch 'Universite-Gustave-Eiffel:main' into p2p-propagation-mo…
mglesser May 26, 2026
18482f9
refactor: decouple P2P propagation model
mglesser May 29, 2026
acfb90a
fix: swap PropagationModel.computeAttenuation input param
mglesser Jun 1, 2026
3849726
refactor: decouple P2P propagation model
mglesser Jun 1, 2026
ae81646
refactor: create propagation model factory and use it in unit tests
mglesser Jun 3, 2026
a1305d2
refactor: use propagation model factory in jdbc
mglesser Jun 3, 2026
84edaa7
Merge branch 'Universite-Gustave-Eiffel:main' into p2p-propagation-mo…
mglesser Jun 4, 2026
03ce9c9
refactor: cnossosPathCount becomes cutProfileCount
mglesser Jun 4, 2026
3525f1e
Merge remote-tracking branch 'origin/p2p-propagation-model-archi' int…
mglesser Jun 4, 2026
99fed9f
refactor: fix cutProfileCount test
mglesser Jun 8, 2026
eedf34d
refactor: move path export in AttenuationOutputSingleThread
mglesser Jun 8, 2026
715c8a1
refactor: invert loop over rays and period in AttenuationOutputSingle…
mglesser Jun 8, 2026
72923b3
refactor: move loop over CnossosPath in sub-method
mglesser Jun 9, 2026
686726c
refactor: remove one constructor for CnossosPropagationModel
mglesser Jun 9, 2026
a2613e1
refactor: move one loop on CnossosPath from AttenuationOutputSingleTh…
mglesser Jun 9, 2026
b2fbd56
refactor: propagate propagationModelName through methods
mglesser Jun 10, 2026
a664de0
refactor: cleanup imports
mglesser Jun 11, 2026
558a79d
feat: add template of P2P propagation model
mglesser Jun 11, 2026
a2d0e97
refactor: avoid multiple attenuation computation with default parameters
mglesser Jun 11, 2026
441dd58
fix: javadoc error
mglesser Jun 11, 2026
6444019
fix: javadoc error
mglesser Jun 11, 2026
ae3ff6e
fix: export cnossos path
mglesser Jun 15, 2026
e24abdb
refactor: proper propagation model factory method implementation
mglesser Jun 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.noise_planet.noisemodelling.pathfinder.CutPlaneVisitorFactory;
import org.noise_planet.noisemodelling.pathfinder.PathFinder;
import org.noise_planet.noisemodelling.pathfinder.utils.profiler.ProfilerThread;
import org.noise_planet.noisemodelling.propagation.PropagationModelCreator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -49,18 +50,24 @@ public class NoiseMapByReceiverMaker extends GridMapMaker {
/** If true, all processing are aborted and all threads will be shutdown */
public AtomicBoolean aborted = new AtomicBoolean(false);
private final NoiseMapDatabaseParameters noiseMapDatabaseParameters = new NoiseMapDatabaseParameters();
private IComputeRaysOutFactory computeRaysOutFactory = new DefaultCutPlaneProcessing(noiseMapDatabaseParameters, exitWhenDone, aborted);
private IComputeRaysOutFactory computeRaysOutFactory;
private Logger logger = LoggerFactory.getLogger(NoiseMapByReceiverMaker.class);
private int threadCount = 0;
private ProfilerThread profilerThread;

SceneDatabaseInputSettings sceneDatabaseInputSettings = new SceneDatabaseInputSettings();

/** ?? for train source ? TODO is it related to sources ? if yes then provide a special column for this kind of source */

/**
* Constructor for NoiseMapByReceiverMaker object.
*
* @param buildingsTableName Buildings table
* @param sourcesTableName Source table
* @param receiverTableName Receiver table
*/
public NoiseMapByReceiverMaker(String buildingsTableName, String sourcesTableName, String receiverTableName) {
super(buildingsTableName, sourcesTableName);
this.receiverTableName = receiverTableName;
computeRaysOutFactory = new DefaultCutPlaneProcessing(noiseMapDatabaseParameters, exitWhenDone, aborted);
}

/**
Expand Down Expand Up @@ -428,7 +435,20 @@ public interface IComputeRaysOutFactory {
* @return an object that computes paths out for noise map computation.
*/
CutPlaneVisitorFactory create(SceneWithEmission cellData);
}

/**
* Setter for propagationModelCreator
*
* @param propagationModelCreator interface for PropagationModel creation
*/
void setPropagationModelCreator(PropagationModelCreator propagationModelCreator);

/**
* Getter for propagationModelCreator
*
* @return interface for PropagationModel creation
*/
PropagationModelCreator getPropagationModelCreator();

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
import org.noise_planet.noisemodelling.jdbc.input.SceneWithEmission;
import org.noise_planet.noisemodelling.pathfinder.CutPlaneVisitor;
import org.noise_planet.noisemodelling.pathfinder.CutPlaneVisitorFactory;
import org.noise_planet.noisemodelling.propagation.AttenuationComputeOutput;
import org.noise_planet.noisemodelling.propagation.PropagationModel;
import org.noise_planet.noisemodelling.propagation.PropagationModelCreator;
import org.noise_planet.noisemodelling.propagation.cnossos.CnossosPropagationModel;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicInteger;

/**
* This class is built on each new computation cell area. It will create for each thread (range of receivers) an instance
Expand All @@ -29,25 +31,35 @@ public class AttenuationOutputMultiThread implements CutPlaneVisitorFactory {
public NoiseMapDatabaseParameters noiseMapDatabaseParameters = new NoiseMapDatabaseParameters();
public AtomicBoolean exitWhenDone = new AtomicBoolean(false);
public AtomicBoolean aborted = new AtomicBoolean(false);
public AtomicLong cnossosPathCount = new AtomicLong();
public AtomicInteger cutProfileCount = new AtomicInteger();
public PropagationModel propagationModel;

/**
* Create NoiseMap constructor
* @param inputData
* @param resultsCache
* @param noiseMapDatabaseParameters
*
* @param inputData Geometrical information about the propagation scene
* @param resultsCache Results cache
* @param noiseMapDatabaseParameters Propagation parameters
*/
public AttenuationOutputMultiThread(SceneWithEmission inputData,
public AttenuationOutputMultiThread(SceneWithEmission inputData, PropagationModelCreator propagationModelCreator,
ResultsCache resultsCache, NoiseMapDatabaseParameters noiseMapDatabaseParameters, AtomicBoolean exitWhenDone, AtomicBoolean aborted) {
this.resultsCache = resultsCache;
this.sceneWithEmission = inputData;
this.noiseMapDatabaseParameters = noiseMapDatabaseParameters;
this.exitWhenDone = exitWhenDone;
this.aborted = aborted;
this.propagationModel = propagationModelCreator.create();
}

/**
* Constructor for AttenuationOutputMultiThread with Cnossos propagation model
* (for testing purpose).
*
* @param sceneWithEmission Geometrical information about the propagation scene
*/
public AttenuationOutputMultiThread(SceneWithEmission sceneWithEmission) {
this.sceneWithEmission = sceneWithEmission;
this.propagationModel = new CnossosPropagationModel();
}

/**
Expand Down
Loading
Loading