@@ -1001,10 +1001,16 @@ private void RunStopAreaGeneralTransitModel(int skimMode, int accessMode, int eg
10011001 accessTerminalParcelID = parkAndRideParcel . Id ;
10021002 accessTerminalZoneID = ( int ) parkAndRideParcel . ZoneKey ;
10031003 WalkBikePath accessPath = GetWalkBikePath ( accessMode , pathTypeAccEgr , votValue , useZones , _outboundTime , _returnTime , 0 , 0 , originParcelUsed , parkAndRideParcel ) ;
1004- double parkingCost = node . CostDaily ;
1004+ double parkingCost = node . CostAnnual / Global . Configuration . COMPASS_BikeParkAndRideAccessAnnualCostDivisor ;
1005+ parkCapacitySizeTerm = Math . Log ( Math . Max ( node . Capacity , 1.0E-30 ) ) * Global . Configuration . COMPASS_BikeParkAndRideAccessCapacitySizeWeight ;
10051006 accessTime = accessPath . Time * roundTripFactor ;
10061007 accessCost = parkingCost ;
1008+ accessPath . Utility += parkingCost * _tourCostCoefficient ;
10071009 accessUtility = accessPath . Utility * roundTripFactor ;
1010+ if ( Global . Configuration . COMPASS_IncludeBikeParkAndRideLotCapacityEffectInModeChoice ) {
1011+ accessUtility = accessUtility + parkCapacitySizeTerm ;
1012+ parkCapacitySizeTerm = 0 ;
1013+ }
10081014 } else if ( sovAccess ) {
10091015 int nodeId = Global . ParcelToAutoParkAndRideNodeIds [ indexAccess ] ;
10101016 ParkAndRideNodeWrapper node = autoParkAndRideNodes . First ( x => x . ZoneId == nodeId ) ;
@@ -1045,7 +1051,12 @@ private void RunStopAreaGeneralTransitModel(int skimMode, int accessMode, int eg
10451051
10461052 accessTime = accessPath . Time * roundTripFactor ;
10471053 accessCost = accessPath . Cost + parkingCost ;
1054+ accessPath . Utility += parkingCost * _tourCostCoefficient ;
10481055 accessUtility = accessPath . Utility * roundTripFactor ;
1056+ if ( Global . Configuration . COMPASS_IncludeAutoParkAndRideLotCapacityEffectInModeChoice ) {
1057+ accessUtility = accessUtility + parkCapacitySizeTerm ;
1058+ parkCapacitySizeTerm = 0 ;
1059+ }
10491060 } else if ( hovAccess || shareAccess ) {
10501061 accessTerminalKey = Global . ParcelToAutoKissAndRideTerminalKeys [ indexAccess ] ;
10511062 accessTerminalIndex = Global . ParcelToAutoKissAndRideTerminalIndices [ indexAccess ] ;
@@ -1109,9 +1120,16 @@ private void RunStopAreaGeneralTransitModel(int skimMode, int accessMode, int eg
11091120 egressTerminalParcelID = parkAndRideParcel . Id ;
11101121 egressTerminalZoneID = ( int ) parkAndRideParcel . ZoneKey ;
11111122 WalkBikePath egressPath = GetWalkBikePath ( egressMode , pathTypeAccEgr , votValue , useZones , _outboundTime , _returnTime , 0 , 0 , parkAndRideParcel , destinationParcelUsed ) ;
1123+ double parkingCost = node . CostAnnual / Global . Configuration . COMPASS_BikeParkAndRideEgressAnnualCostDivisor ;
1124+ parkCapacitySizeTerm += Math . Log ( Math . Max ( node . Capacity , 1.0E-30 ) ) * Global . Configuration . COMPASS_BikeParkAndRideEgressCapacitySizeWeight ;
11121125 egressTime = egressPath . Time * roundTripFactor ;
1113- egressCost = 0 ;
1126+ egressCost = parkingCost ;
1127+ egressPath . Utility += parkingCost * _tourCostCoefficient ;
11141128 egressUtility = egressPath . Utility * roundTripFactor ;
1129+ if ( Global . Configuration . COMPASS_IncludeBikeParkAndRideLotCapacityEffectInModeChoice ) {
1130+ accessUtility = accessUtility + parkCapacitySizeTerm ;
1131+ parkCapacitySizeTerm = 0 ;
1132+ }
11151133 } else if ( shareEgress ) {
11161134 egressTerminalKey = Global . ParcelToAutoKissAndRideTerminalKeys [ indexEgress ] ;
11171135 egressTerminalIndex = Global . ParcelToAutoKissAndRideTerminalIndices [ indexEgress ] ;
@@ -1584,6 +1602,19 @@ private TransitPath GetTransitPath(int skimMode, int pathType, double votValue,
15841602 path . Cost += fare ;
15851603 }
15861604 }
1605+ //mb code for bike on board fare
1606+ if ( skimMode == Global . Settings . Modes . BikeOnTransit ) {
1607+ varname = commuter ? "bikefare-co" : "bikefare" ;
1608+ skimValue =
1609+ ImpedanceRoster . GetValue ( varname , skimMode , pathType , votValue , outboundTime , originZoneId , destinationZoneId ) ;
1610+ path . Cost += skimValue . Variable ;
1611+
1612+ if ( _returnTime > 0 ) {
1613+ skimValue =
1614+ ImpedanceRoster . GetValue ( varname , skimMode , pathType , votValue , returnTime , destinationZoneId , originZoneId ) ;
1615+ path . Cost += skimValue . Variable ;
1616+ }
1617+ }
15871618
15881619 path . Utility = path . GenTime * _tourTimeCoefficient
15891620 + path . Cost * _tourCostCoefficient ;
0 commit comments