Skip to content

Commit

Permalink
some renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Nov 27, 2024
1 parent 570612b commit bac9691
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void install() {
bind(ScoringParametersForPerson.class).to(IndividualPersonScoringParameters.class).in(Singleton.class);

bind(PseudoRandomScorer.class).in(Singleton.class);
bind(PseudoRandomTripScore.class).to(DefaultPseudoRandomTripScore.class).in(Singleton.class);
bind(PseudoRandomTripError.class).to(DefaultPseudoRandomTripError.class).in(Singleton.class);

addControlerListenerBinding().to(AdvancedScoringOutputWriter.class).in(Singleton.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* Computes a random seed based on person id, previous activity and routing mode.
*/
public final class DefaultPseudoRandomTripScore implements PseudoRandomTripScore {
public final class DefaultPseudoRandomTripError implements PseudoRandomTripError {

@Override
public long getSeed(Id<Person> personId, String routingMode, String prevActivityType) {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/matsim/run/scoring/PseudoRandomScorer.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.matsim.core.config.ConfigUtils;

/**
* Computes pseudo random scores, which are frozen for certain choice situations, thus representing the unobserved heterogeneity.
* Computes pseudo random errors (epsilons), which are frozen for certain choice situations, thus representing the unobserved heterogeneity.
*/
public final class PseudoRandomScorer {

Expand All @@ -20,12 +20,12 @@ public final class PseudoRandomScorer {
*/
private static final int WARMUP_ITERATIONS = 100;

private final PseudoRandomTripScore tripScore;
private final PseudoRandomTripError tripScore;
private final long seed;
private final double scale;

@Inject
public PseudoRandomScorer(PseudoRandomTripScore tripScore, Config config) {
public PseudoRandomScorer(PseudoRandomTripError tripScore, Config config) {
this.tripScore = tripScore;
this.seed = config.global().getRandomSeed();
this.scale = ConfigUtils.addOrGetModule(config, AdvancedScoringConfigGroup.class).pseudoRamdomScale;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import org.matsim.api.core.v01.population.Person;

/**
* Interface to provide pseudo-random scoring for a trip.*
* Interface to provide pseudo-random errors for a trip.
*/
public interface PseudoRandomTripScore {
public interface PseudoRandomTripError {

/**
* Return a seed for a trip. The seed must be designed such that it is constant for the same choice situations.
Expand Down

0 comments on commit bac9691

Please sign in to comment.