Skip to content

Commit

Permalink
Merge pull request #54 from BayAreaMetro/transit-ccr
Browse files Browse the repository at this point in the history
Merge TM2.1 development from transit-ccr into develop
  • Loading branch information
lmz authored Sep 2, 2022
2 parents cadf917 + 95d5e36 commit d776ee8
Show file tree
Hide file tree
Showing 352 changed files with 101,942 additions and 15,207 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Push Workflow

on: [push]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Document branch
run: echo ${{ github.ref_name }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Build docs
run: |
mike deploy --push --rebase ${{ github.ref_name }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ core/release/
*.exe
model-files/runtime/config/pskill.exe
utilities/vta_expresslane_feed_saver/vta_expresslanes_2018*
site/
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ public interface MatrixDataServerIf {
public String testRemote();
public void clear();
public void writeMatrixFile(String fileName, Matrix[] m);
public void writeMatrixFile(String fileName, Matrix[] m, MatrixType mt);
}

Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public final class AccessibilitiesTable
private static final int DISCR_ACCESSIBILITY_SOV_SUFFICIENT_INDEX = 41;
private static final int DISCR_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX = 42;
private static final int TOTAL_EMPLOYMENT_ACCESSIBILITY_INDEX = 45;
private static final int HH_ACCESSIBILITY_WLKTRANSIT_INDEX = 47;



// accessibilities by mgra, accessibility alternative
Expand Down Expand Up @@ -132,59 +134,60 @@ public void writeAccessibilityTableToFile( String accFileName, int[] mgraColumnV



public float getAggregateAccessibility(String type, int homeMgra)
public float getAggregateAccessibility(String type, int mgra)
{
float returnValue = 0;

if (type.equalsIgnoreCase("auto")) returnValue = accessibilities[homeMgra][NONMANDATORY_AUTO_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("transit")) returnValue = accessibilities[homeMgra][NONMANDATORY_TRANSIT_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("nonmotor")) returnValue = accessibilities[homeMgra][NONMANDATORY_NONMOTOR_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov0")) returnValue = accessibilities[homeMgra][NONMANDATORY_SOV_0_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov1")) returnValue = accessibilities[homeMgra][NONMANDATORY_SOV_1_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov2")) returnValue = accessibilities[homeMgra][NONMANDATORY_SOV_2_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov0")) returnValue = accessibilities[homeMgra][NONMANDATORY_HOV_0_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov1")) returnValue = accessibilities[homeMgra][NONMANDATORY_HOV_1_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov2")) returnValue = accessibilities[homeMgra][NONMANDATORY_HOV_2_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("shop0")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shop1")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shop2")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint0")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint1")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint2")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut0")) returnValue = accessibilities[homeMgra][EAT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut1")) returnValue = accessibilities[homeMgra][EAT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut2")) returnValue = accessibilities[homeMgra][EAT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit0")) returnValue = accessibilities[homeMgra][VISIT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit1")) returnValue = accessibilities[homeMgra][VISIT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit2")) returnValue = accessibilities[homeMgra][VISIT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr0")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr1")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr2")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort0")) returnValue = accessibilities[homeMgra][ESCORT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort1")) returnValue = accessibilities[homeMgra][ESCORT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort2")) returnValue = accessibilities[homeMgra][ESCORT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("totEmp")) returnValue = accessibilities[homeMgra][TOTAL_EMPLOYMENT_ACCESSIBILITY_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov0")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov1")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov2")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov0")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov1")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov2")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov0")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov1")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov2")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov0")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov1")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov2")) returnValue = accessibilities[homeMgra][SHOP_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov0")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov1")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov2")) returnValue = accessibilities[homeMgra][MAINT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov0")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov1")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov2")) returnValue = accessibilities[homeMgra][DISCR_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
if (type.equalsIgnoreCase("auto")) returnValue = accessibilities[mgra][NONMANDATORY_AUTO_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("transit")) returnValue = accessibilities[mgra][NONMANDATORY_TRANSIT_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("nonmotor")) returnValue = accessibilities[mgra][NONMANDATORY_NONMOTOR_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov0")) returnValue = accessibilities[mgra][NONMANDATORY_SOV_0_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov1")) returnValue = accessibilities[mgra][NONMANDATORY_SOV_1_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("sov2")) returnValue = accessibilities[mgra][NONMANDATORY_SOV_2_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov0")) returnValue = accessibilities[mgra][NONMANDATORY_HOV_0_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov1")) returnValue = accessibilities[mgra][NONMANDATORY_HOV_1_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("hov2")) returnValue = accessibilities[mgra][NONMANDATORY_HOV_2_ACCESSIBILITY_FIELD_NUMBER - 1];
else if (type.equalsIgnoreCase("shop0")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shop1")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shop2")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint0")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint1")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maint2")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut0")) returnValue = accessibilities[mgra][EAT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut1")) returnValue = accessibilities[mgra][EAT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("eatOut2")) returnValue = accessibilities[mgra][EAT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit0")) returnValue = accessibilities[mgra][VISIT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit1")) returnValue = accessibilities[mgra][VISIT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("visit2")) returnValue = accessibilities[mgra][VISIT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr0")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr1")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discr2")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort0")) returnValue = accessibilities[mgra][ESCORT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort1")) returnValue = accessibilities[mgra][ESCORT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("escort2")) returnValue = accessibilities[mgra][ESCORT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("totEmp")) returnValue = accessibilities[mgra][TOTAL_EMPLOYMENT_ACCESSIBILITY_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov0")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov1")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopSov2")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov0")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov1")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintSov2")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov0")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_SOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov1")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_SOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrSov2")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_SOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov0")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov1")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("shopHov2")) returnValue = accessibilities[mgra][SHOP_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov0")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov1")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("maintHov2")) returnValue = accessibilities[mgra][MAINT_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov0")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_INSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov1")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_SUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("discrHov2")) returnValue = accessibilities[mgra][DISCR_ACCESSIBILITY_HOV_OVERSUFFICIENT_INDEX - 1];
else if (type.equalsIgnoreCase("hhWlkTrn")) returnValue = accessibilities[mgra][HH_ACCESSIBILITY_WLKTRANSIT_INDEX - 1];
else
{
logger.error("argument type = " + type + ", is not valid. Must be either 'auto', 'transit', 'nonmotor', or hov0, hov1, or hov2.");
logger.error("argument type = " + type + ", is not valid.");
throw new RuntimeException();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.pb.mtctm2.abm.ctramp.Constants;
import com.pb.mtctm2.abm.ctramp.CtrampApplication;
import com.pb.mtctm2.abm.ctramp.MgraDataManager;
import com.pb.mtctm2.abm.ctramp.TransitWalkAccessUEC;
import com.pb.mtctm2.abm.ctramp.ModelStructure;
import com.pb.mtctm2.abm.ctramp.Util;
import com.pb.common.newmodel.UtilityExpressionCalculator;

Expand All @@ -27,14 +27,15 @@
public class AutoAndNonMotorizedSkimsCalculator
implements Serializable
{

private static final int EA = TransitWalkAccessUEC.EA;
private static final int AM = TransitWalkAccessUEC.AM;
private static final int MD = TransitWalkAccessUEC.MD;
private static final int PM = TransitWalkAccessUEC.PM;
private static final int EV = TransitWalkAccessUEC.EV;
private static final String[] PERIODS = TransitWalkAccessUEC.PERIODS;
private static final int NUM_PERIODS = TransitWalkAccessUEC.PERIODS.length;


private static final int EA = ModelStructure.EA_SKIM_PERIOD_INDEX;
private static final int AM = ModelStructure.AM_SKIM_PERIOD_INDEX;
private static final int MD = ModelStructure.MD_SKIM_PERIOD_INDEX;
private static final int PM = ModelStructure.PM_SKIM_PERIOD_INDEX;
private static final int EV = ModelStructure.EV_SKIM_PERIOD_INDEX;
private static final int NUM_PERIODS = ModelStructure.SKIM_PERIOD_STRINGS.length;
private static final String[] PERIODS = ModelStructure.SKIM_PERIOD_STRINGS;

// set the indices used for the non-motorized names array and the return skims
// array
Expand Down
Loading

0 comments on commit d776ee8

Please sign in to comment.