MATSIM
CharyparNagelScoringFunctionFactory.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * CharyparNagelOpenTimesScoringFunctionFactory.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2007 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 
21 package org.matsim.core.scoring.functions;
22 
23 import org.matsim.api.core.v01.Scenario;
26 import org.matsim.core.config.Config;
30 
31 import jakarta.inject.Inject;
32 
45 
46  private final Config config;
47  private Network network;
48 
50 
52  this( sc.getConfig(), new SubpopulationScoringParameters( sc ) , sc.getNetwork() );
53  }
54 
55  @Inject
57  this.config = config;
58  this.params = params;
59  this.network = network;
60  }
61 
80  @Override
82 
83  final ScoringParameters parameters = params.getScoringParameters( person );
84 
85  SumScoringFunction sumScoringFunction = new SumScoringFunction();
86  sumScoringFunction.addScoringFunction(new CharyparNagelActivityScoring( parameters ));
87  sumScoringFunction.addScoringFunction(new CharyparNagelLegScoring( parameters , this.network, config.transit().getTransitModes() ));
88  sumScoringFunction.addScoringFunction(new CharyparNagelMoneyScoring( parameters ));
89  sumScoringFunction.addScoringFunction(new CharyparNagelAgentStuckScoring( parameters ));
90  sumScoringFunction.addScoringFunction(new ScoreEventScoring());
91  return sumScoringFunction;
92  }
93 }
void addScoringFunction(BasicScoring scoringFunction)
TransitConfigGroup transit()
Definition: Config.java:451