generated from matsim-scenarios/matsim-scenario-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use FareZoneBasedPtFareHandler instead of DistanceBasedPtFareHandler
- Loading branch information
Showing
7 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
Binary file not shown.
1 change: 1 addition & 0 deletions
1
input/v1.1/vvo_tarifzone20/vvo_tarifzone20_hoyerswerda_utm32n.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
PROJCS["ETRS_1989_UTM_Zone_32N",GEOGCS["GCS_ETRS_1989",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",9.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
library(tidyverse) | ||
|
||
prices <- read.csv(file="../../shared-svn/projects/DiTriMo/data/deutschlandtarif_prices/deutschlandtarif_prices.csv") | ||
|
||
prices20 <- prices %>% | ||
filter(km <= 20) | ||
|
||
prices100 <- prices %>% | ||
filter(km <= 100) | ||
|
||
prices1000 <- prices %>% | ||
filter(km <= 1000) | ||
|
||
pricesAbove100 <- prices %>% | ||
filter(km >= 100) | ||
|
||
linear20 <- lm(price ~ km, data = prices20) | ||
linear100 <- lm(price ~ km, data = prices100) | ||
linear1000 <- lm(price ~ km, data = prices1000) | ||
linear <- lm(price ~ km, data = prices) | ||
linearAbove100 <- lm(price ~ km, data = pricesAbove100) | ||
|
||
# Create a dataframe for the lines | ||
lines_df <- data.frame( | ||
intercept = c(coef(linear)[1], coef(linear20)[1], coef(linear100)[1], coef(linear1000)[1], coef(linearAbove100)[1]), | ||
slope = c(coef(linear)[2], coef(linear20)[2], coef(linear100)[2], coef(linear1000)[2], coef(linearAbove100)[2]), | ||
label = c("1-2000km", "1-20km", "1-100km", "1-1000km", "100-2000km") | ||
) | ||
|
||
ggplot(prices, aes(x = km, y = price)) + | ||
geom_point() + # Scatter plot of the data points | ||
geom_abline(data = lines_df, aes(intercept = intercept, slope = slope, color = label), linewidth=.75) + | ||
scale_color_manual(values = c("red", "lightblue", "orange3", "purple4", "pink")) + # Manually setting colors | ||
labs(title = "Deutschlandtarif linear functions", | ||
x = "km", | ||
y = "price [€]", | ||
color = "Model") + # Legend title | ||
theme_minimal() | ||
|
||
lines_df_relevant <- data.frame( | ||
intercept = c(coef(linear100)[1], coef(linearAbove100)[1]), | ||
slope = c(coef(linear100)[2], coef(linearAbove100)[2]), | ||
label = c("1-100km", "100-2000km") | ||
) | ||
|
||
ggplot(prices, aes(x = km, y = price)) + | ||
geom_point() + # Scatter plot of the data points | ||
geom_abline(data = lines_df_relevant, aes(intercept = intercept, slope = slope, color = label), linewidth=.75) + | ||
scale_color_manual(values = c("red", "blue"), labels = c("1-100km y = 0.272x + 1.67", "100-2000km y = 0.11x + 26.89")) + # Manually setting colors | ||
labs(title = "Deutschlandtarif linear functions", | ||
x = "km", | ||
y = "price [€]", | ||
color = "Model") + # Legend title | ||
theme_minimal() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters