Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DVRPC updates and a bug fix #311

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f3a75a9
Added recent changes made to Work/School Location and Other Tour Dest…
JoeJimFlood May 11, 2021
c420665
Line 35 of PnR Shadow Price calculator iterated over variable j but j…
JoeJimFlood May 11, 2021
b62cdb2
Added toll to PnR lot cost along with print lines to make sure it works
JoeJimFlood May 17, 2021
6c117e0
Added AddTollToParkAndRide to configuration.cs
JoeJimFlood May 17, 2021
8b66320
Add toll weight in PnR model
JoeJimFlood May 18, 2021
e4cf265
Added semicolon after ParkAndRideTollWeight definition
JoeJimFlood May 18, 2021
387f3bb
Switched lines 1360 and 1361 to correct calculation of bidirectional …
JoeJimFlood May 19, 2021
39b82b8
Replaced boolean option for toll in PnR cost with weight
JoeJimFlood Jul 26, 2021
b11e947
Lowered Core CBD threshold from 31000 to 30000
JoeJimFlood Jul 26, 2021
b28908d
Updated utility terms in customization scripts to use parcel district…
JoeJimFlood Jul 27, 2021
e95a013
Fixed bug where origin parcel wasn't tour attribute
JoeJimFlood Jul 27, 2021
b11bb1e
Commented out lines to check if toll was being applied correctly
JoeJimFlood Aug 5, 2021
f91eeb7
Update azure-pipelines.yml
bstabler Nov 11, 2021
5268c32
Update README.md
bstabler Nov 11, 2021
74bbfce
Merge pull request #307 from dvrpc/develop
bstabler Nov 11, 2021
5a375fd
Merge pull request #310 from RSGInc/updated-user-list
bstabler Nov 11, 2021
a3aac8d
Changes made for SACOG reestimation - issues 312, 313 and 314.
mabcal Dec 29, 2021
733f858
putting back in TravelCost calculations. Close #309
nsdhakar Jan 5, 2022
e6b980f
Updated work at home model spec in the day pattern model and the conf…
mabcal Feb 9, 2022
9f1f5f5
Merge branch 'develop' of https://github.com/RSGInc/DaySim into develop
mabcal Feb 9, 2022
c3a87bb
Try again to commit and push changes to work at home model.
mabcal Feb 9, 2022
fa1afcc
Changed the PersonExactNumberOfToursModel, IndividualPersonDayPattern…
mabcal Feb 10, 2022
2d96378
Write total number of simulated stops to person day file if selected.
mabcal Mar 7, 2022
3233532
Changed coefficient numbers for new variables in WorkLocationModel to…
mabcal Mar 7, 2022
4928c04
Added a new configuration switch CheckTripDurationAgainstArrivalAndDe…
mabcal Sep 30, 2022
b00d2e0
Changed coefficient # 89 added in March 7, 2022 commit to coefficient…
mabcal Nov 26, 2022
e4678fb
add pierce county specific calibration constants in work location, wo…
nsdhakar Apr 10, 2023
7aeb3b2
Nashville specific constants in work location and other tour destinat…
nsdhakar Oct 5, 2023
b1eb761
updated PSRC dll to add seacast specific constants in work location, …
nsdhakar Apr 22, 2024
4edef40
add fresno specific district constant in work location model.
nsdhakar Jun 6, 2024
5bc0dd8
add fresno specific constants in auto ownership model. Issue #318
nsdhakar Jul 19, 2024
95c4a3b
fixed a bug in fresno specific auto ownership model. Issue #318.
nsdhakar Jul 19, 2024
c45b315
fixed more bugs in fresno specific auto ownership model. Issue #318.
nsdhakar Jul 19, 2024
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 @@ -14,8 +14,8 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
int originInNJ = ((tour.OriginParcel.ZoneKey >= 18000 && tour.OriginParcel.ZoneKey < 50000) || (tour.OriginParcel.ZoneKey >= 53000 && tour.OriginParcel.ZoneKey < 58000)).ToFlag();
int destinInNJ = ((destinationParcel.ZoneKey >= 18000 && destinationParcel.ZoneKey < 50000) || (destinationParcel.ZoneKey >= 53000 && destinationParcel.ZoneKey < 58000)).ToFlag();

int coreCBDOrig = (tour.OriginParcel.HouseholdsBuffer1 + tour.OriginParcel.EmploymentTotalBuffer1 >= 20000).ToFlag();
int coreCBDDest = (destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 20000).ToFlag();
int coreCBDOrig = (tour.OriginParcel.District == 1).ToFlag();// (tour.OriginParcel.HouseholdsBuffer1 + tour.OriginParcel.EmploymentTotalBuffer1 >= 31000).ToFlag();
int coreCBDDest = (destinationParcel.District == 1).ToFlag();// (destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 31000).ToFlag();

if (mode == Global.Settings.Modes.ParkAndRide) {
//alternative.AddUtilityTerm(211, tour.OriginParcel.CBD_AreaType_Buffer1());
Expand All @@ -37,14 +37,14 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
// alternative.AddUtilityTerm(227, destinationParcel.PCA_MixedUseTerm_Buffer1());
// alternative.AddUtilityTerm(228, destinationParcel.PCA_TransitAccessTerm_Buffer1());
} else if (mode == Global.Settings.Modes.Transit) {
alternative.AddUtilityTerm(231, tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(232, tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(233, tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(234, tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(235, destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(236, destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(237, destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(238, destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(231, (tour.OriginParcel.District <= 2).ToFlag()); //tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(232, (tour.OriginParcel.District == 3).ToFlag()); //tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(233, (tour.OriginParcel.District == 4).ToFlag()); //tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(234, (tour.OriginParcel.District >= 5).ToFlag()); //tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(235, (destinationParcel.District <= 2).ToFlag()); //destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(236, (destinationParcel.District == 3).ToFlag()); //destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(237, (destinationParcel.District == 4).ToFlag()); //destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(238, (destinationParcel.District >= 5).ToFlag()); //destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(239, (tour.OriginParcel.DistanceToFerry > 0 && tour.OriginParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(240, (destinationParcel.DistanceToFerry > 0 && destinationParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(241, originInNJ);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void RegionSpecificOtherTourDistrictCoefficients(ChoiceProbab
int d_ext_snj = (destinationParcel.ZoneKey > 56000 && destinationParcel.ZoneKey <= 58000).ToFlag();
int d_ext_oth = (destinationParcel.ZoneKey > 58000).ToFlag();

int cbdDest = destinationParcel.CBD_AreaType_Buffer1();
int cbdDest = (destinationParcel.District == 1).ToFlag();// (destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 30000).ToFlag();
double distanceFromOrigin = _tour.OriginParcel.DistanceFromOrigin(destinationParcel, _tour.DestinationArrivalTime);

alternative.AddUtilityTerm(121, o_int_nj * distanceFromOrigin);
Expand All @@ -38,6 +38,7 @@ protected override void RegionSpecificOtherTourDistrictCoefficients(ChoiceProbab
alternative.AddUtilityTerm(125, cbdDest * (_tour.DestinationPurpose == Global.Settings.Purposes.Shopping).ToFlag());
alternative.AddUtilityTerm(126, cbdDest * (_tour.DestinationPurpose == Global.Settings.Purposes.Meal).ToFlag());
alternative.AddUtilityTerm(127, cbdDest * (_tour.DestinationPurpose == Global.Settings.Purposes.Social).ToFlag());
alternative.AddUtilityTerm(201, o_int_paphi * distanceFromOrigin);

alternative.AddUtilityTerm(130, (_tour.OriginParcel.Id == destinationParcel.Id).ToFlag());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
int d_ext_snj = (destinationParcel.ZoneKey > 56000 && destinationParcel.ZoneKey <= 58000).ToFlag();
int d_ext_oth = (destinationParcel.ZoneKey > 58000).ToFlag();

int cbdDest = destinationParcel.CBD_AreaType_Buffer1();
int cbdDest = (destinationParcel.District == 1).ToFlag();//(destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 30000).ToFlag();
double distanceFromOrigin = _person.Household.ResidenceParcel.DistanceFromOrigin(destinationParcel, Global.Settings.Times.EightAM);

alternative.AddUtilityTerm(121, o_int_nj * distanceFromOrigin);
Expand All @@ -41,7 +41,7 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
alternative.AddUtilityTerm(124, cbdDest);
alternative.AddUtilityTerm(125, cbdDest * (_person.Household.Income < 50000).ToFlag());
alternative.AddUtilityTerm(126, cbdDest * (_person.Household.Income >= 100000).ToFlag());

alternative.AddUtilityTerm(201, o_int_paphi * distanceFromOrigin);

alternative.AddUtilityTerm(131, o_int_paphi * d_int_paphi);
alternative.AddUtilityTerm(132, o_int_paphi * d_int_paoth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
int d_ext_snj = (destinationParcel.ZoneKey > 56000 && destinationParcel.ZoneKey <= 58000).ToFlag();
int d_ext_oth = (destinationParcel.ZoneKey > 58000).ToFlag();

int cbdDest = destinationParcel.CBD_AreaType_Buffer1();
int cbdDest = (destinationParcel.District == 1).ToFlag();//(destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 30000).ToFlag();
double distanceFromOrigin = _person.Household.ResidenceParcel.DistanceFromOrigin(destinationParcel, Global.Settings.Times.EightAM);

alternative.AddUtilityTerm(121, o_int_nj * distanceFromOrigin);
Expand All @@ -37,6 +37,7 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
alternative.AddUtilityTerm(124, cbdDest );
alternative.AddUtilityTerm(125, cbdDest * (_person.Household.Income < 50000).ToFlag());
alternative.AddUtilityTerm(126, cbdDest * (_person.Household.Income >= 100000).ToFlag());
alternative.AddUtilityTerm(201, o_int_paphi * distanceFromOrigin);

alternative.AddUtilityTerm(131, o_int_paphi * d_int_paphi);
alternative.AddUtilityTerm(132, o_int_paphi * d_int_paoth);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
int originInNJ = ((tour.OriginParcel.ZoneKey >= 18000 && tour.OriginParcel.ZoneKey < 50000) || (tour.OriginParcel.ZoneKey >= 53000 && tour.OriginParcel.ZoneKey < 58000)).ToFlag();
int destinInNJ = ((destinationParcel.ZoneKey >= 18000 && destinationParcel.ZoneKey < 50000) || (destinationParcel.ZoneKey >= 53000 && destinationParcel.ZoneKey < 58000)).ToFlag();

int coreCBDOrig = (tour.OriginParcel.HouseholdsBuffer1 + tour.OriginParcel.EmploymentTotalBuffer1 >= 20000).ToFlag();
int coreCBDDest = (destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 20000).ToFlag();
int coreCBDOrig = (tour.OriginParcel.District == 1).ToFlag();// (tour.OriginParcel.HouseholdsBuffer1 + tour.OriginParcel.EmploymentTotalBuffer1 >= 31000).ToFlag();
int coreCBDDest = (destinationParcel.District == 1).ToFlag();// (destinationParcel.HouseholdsBuffer1 + destinationParcel.EmploymentTotalBuffer1 >= 31000).ToFlag();


if (mode == Global.Settings.Modes.ParkAndRide) {
alternative.AddUtilityTerm(211, tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(212, tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(213, tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(214, tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(215, destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(216, destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(217, destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(218, destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(211, (tour.OriginParcel.District <= 2).ToFlag()); //tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(212, (tour.OriginParcel.District == 3).ToFlag()); //tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(213, (tour.OriginParcel.District == 4).ToFlag()); //tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(214, (tour.OriginParcel.District >= 5).ToFlag()); //tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(215, (destinationParcel.District <= 2).ToFlag()); //destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(216, (destinationParcel.District == 3).ToFlag()); //destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(217, (destinationParcel.District == 4).ToFlag()); //destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(218, (destinationParcel.District >= 5).ToFlag()); //destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(219, (tour.OriginParcel.DistanceToFerry > 0 && tour.OriginParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(220, (destinationParcel.DistanceToFerry > 0 && destinationParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(221, originInNJ);
Expand All @@ -40,14 +40,14 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator
// alternative.AddUtilityTerm(227, destinationParcel.PCA_MixedUseTerm_Buffer1());
// alternative.AddUtilityTerm(228, destinationParcel.PCA_TransitAccessTerm_Buffer1());
} else if (mode == Global.Settings.Modes.Transit) {
alternative.AddUtilityTerm(231, tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(232, tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(233, tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(234, tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(235, destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(236, destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(237, destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(238, destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(231, (tour.OriginParcel.District <= 2).ToFlag()); //tour.OriginParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(232, (tour.OriginParcel.District == 3).ToFlag()); //tour.OriginParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(233, (tour.OriginParcel.District == 4).ToFlag()); //tour.OriginParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(234, (tour.OriginParcel.District >= 5).ToFlag()); //tour.OriginParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(235, (destinationParcel.District <= 2).ToFlag()); //destinationParcel.CBD_AreaType_Buffer1());
alternative.AddUtilityTerm(236, (destinationParcel.District == 3).ToFlag()); //destinationParcel.Urban_AreaType_Buffer1());
alternative.AddUtilityTerm(237, (destinationParcel.District == 4).ToFlag()); //destinationParcel.Suburban_AreaType_Buffer1());
alternative.AddUtilityTerm(238, (destinationParcel.District >= 5).ToFlag()); //destinationParcel.AllRural_AreaType_Buffer1());
alternative.AddUtilityTerm(239, (tour.OriginParcel.DistanceToFerry > 0 && tour.OriginParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(240, (destinationParcel.DistanceToFerry > 0 && destinationParcel.DistanceToFerry <= 0.5).ToFlag());
alternative.AddUtilityTerm(241, originInNJ);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using System;
using DaySim.Framework.Core;
using DaySim.Framework.ChoiceModels;
using DaySim.Framework.DomainModels.Wrappers;

namespace DaySim.ChoiceModels.Default.Models
{
internal class Fresno_AutoOwnershipModel : AutoOwnershipModel {

protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator.Alternative alternative, IHouseholdWrapper household) {
//home district
int homedist = household.ResidenceParcel.District;
int homedist_clovis = (homedist == 5 || homedist == 6 || homedist == 8) ? 1 : 0; //clovis area is dist =5,6,8

//clovis specific constants
if (homedist_clovis == 1)
{
alternative.AddUtilityTerm(101 + alternative.Id, household.Has1Driver.ToFlag()); //101,102 (not used),103,104,105
alternative.AddUtilityTerm(106 + alternative.Id, household.Has2Drivers.ToFlag()); //106,107,108 (not used),109,110
alternative.AddUtilityTerm(111 + alternative.Id, household.Has3Drivers.ToFlag()); //111,112,113,114 (not used),115
alternative.AddUtilityTerm(116 + alternative.Id, household.Has4OrMoreDrivers.ToFlag()); //116,117,118,119,120 (not used)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,27 @@ protected override void RegionSpecificCustomizations(ChoiceProbabilityCalculator

//add any region-specific new terms in region-specific class, using coefficient numbers 91-97, 49, 99,100 or other unused variable #
//Global.PrintFile.WriteLine("Default Fresno_WorkLocationModel.RegionSpecificCustomizations called");
int homeNorthWorkSCBD = (homedist == 2 || homedist == 3 || homedist == 4 || homedist == 5 || homedist == 6 || homedist == 7) && (zonedist == 10) ? 1 : 0;
int homeSCBDWorkSCBD = homedist == 10 && (zonedist == 10) ? 1 : 0;
int destDist1 = (zonedist == 1) ? 1 : 0;
int destDist2 = (zonedist == 2) ? 1 : 0;
int destDist3 = (zonedist == 3) ? 1 : 0;
int destDist4 = (zonedist == 4) ? 1 : 0;
int destDist5 = (zonedist == 5) ? 1 : 0;
int destDist6 = (zonedist == 6) ? 1 : 0;
int destDist7 = (zonedist == 7) ? 1 : 0;
int destDist8 = (zonedist == 8) ? 1 : 0;
int destDist9 = (zonedist == 9) ? 1 : 0;
int destDist10 = (zonedist == 10) ? 1 : 0;

alternative.AddUtilityTerm(91, homeNorthWorkSCBD);
alternative.AddUtilityTerm(92, homeSCBDWorkSCBD);
alternative.AddUtilityTerm(101, destDist1);
alternative.AddUtilityTerm(102, destDist2);
alternative.AddUtilityTerm(103, destDist3);
alternative.AddUtilityTerm(104, destDist4);
alternative.AddUtilityTerm(105, destDist5);
alternative.AddUtilityTerm(106, destDist6);
alternative.AddUtilityTerm(107, destDist7);
alternative.AddUtilityTerm(108, destDist8);
alternative.AddUtilityTerm(109, destDist9);
alternative.AddUtilityTerm(110, destDist10);

}
}
Expand Down
1 change: 1 addition & 0 deletions DaySim.Customizations/Fresno/Fresno.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ChoiceModels\Default\Models\Fresno_AutoOwnershipModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ChoiceModels\Default\Models\Fresno_OtherHomeBasedTourModeModel.cs" />
<Compile Include="ChoiceModels\Default\Models\Fresno_OtherTourDestinationModel.cs" />
Expand Down
Loading
Loading