Skip to content

generateinputs module

t3co.run.generateinputs

generate(vocation: str, dst: str = gl.OPTIMIZATION_AND_TCO_RCRS)

This function aggregates specifications from users for powertrains, desired ranges, component costs etc. into two csv files - FASTSimInputs and OtherInputs

Parameters:

Name Type Description Default
vocation str

Vocation type description

required
dst str

results directory file path. Defaults to gl.OPTIMIZATION_AND_TCO_RCRS.

gl.OPTIMIZATION_AND_TCO_RCRS
Source code in t3co/run/generateinputs.py
Python
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
def generate(vocation: str, dst: str = gl.OPTIMIZATION_AND_TCO_RCRS):
    """
    This function aggregates specifications from users for powertrains, desired ranges, component costs etc. into two
    csv files - FASTSimInputs and OtherInputs

    Args:
        vocation (str): Vocation type description
        dst (str, optional): results directory file path. Defaults to gl.OPTIMIZATION_AND_TCO_RCRS.
    """

    print("generating inputs")

    vehiclesdir = "vehicles"
    srcdir = "resources"

    BaselineVehicle_path = (
        Path(__file__).parent
        / srcdir
        / vehiclesdir
        / vocation
        / "specifications/BaselineVehicle.csv"
    )
    OptimizerInitializationValues_path = (
        Path(__file__).parent
        / srcdir
        / vehiclesdir
        / vocation
        / "specifications/OptimizerInitializationValues.csv"
    )
    PowertrainTechTargets_path = (
        Path(__file__).parent
        / srcdir
        / vehiclesdir
        / vocation
        / "specifications/PowertrainTechTargets.csv"
    )
    VocationRequirements_path = (
        Path(__file__).parent
        / srcdir
        / vehiclesdir
        / vocation
        / "specifications/VocationRequirements.csv"
    )
    FastsimHeader_path = (
        Path(__file__).parent / "resources" / "auxiliary" / "FASTSimInputsHeader.csv"
    )
    Other_Inputs_Header_path = (
        Path(__file__).parent / "resources" / "auxiliary" / "OtherInputsHeader.csv"
    )

    BaselineVehicleSpec = pd.read_csv(BaselineVehicle_path)
    OptimizerInitializationValues = pd.read_csv(OptimizerInitializationValues_path)
    PowertrainTechTargets = pd.read_csv(PowertrainTechTargets_path)
    VocationRequirements = pd.read_csv(VocationRequirements_path)

    TechYears = BaselineVehicleSpec.loc[:, "Year"].values
    Nyears = len(TechYears)

    Ranges = np.array(ast.literal_eval(VocationRequirements.at[1, "MinRangeMiles"]))
    Nranges = len(Ranges)
    Npowertrains = max(PowertrainTechTargets["PowertrainNumber"].values)

    FASTSimInputsDf = pd.read_csv(FastsimHeader_path)
    OtherInputsDf = pd.read_csv(Other_Inputs_Header_path)

    OtherInputsDf["vmt"] = OtherInputsDf.vmt.astype(str)

    v = 0
    for pt in range(0, Npowertrains):
        for y in range(0, Nyears):
            for r in range(0, Nranges):
                # FASTSimInputsDf.at[v, "scenario_name"] = f"{v/3} {v}"
                FASTSimInputsDf.at[v, "selection"] = v + 1
                FASTSimInputsDf.at[v, "scenario_name"] = (
                    f"{PowertrainTechTargets[PowertrainTechTargets.PowertrainNumber > pt].iloc[0]['PowertrainName']} "
                    f"{BaselineVehicleSpec.at[y, 'Year']} tech, "
                    f" {Ranges[r]} mi range"
                )
                FASTSimInputsDf.at[v, "veh_pt_type"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "veh_pt_type",
                ].values[0]
                FASTSimInputsDf.at[v, "drag_coef"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "drag_coef",
                ]
                FASTSimInputsDf.at[v, "frontalAreaM2"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "frontalAreaM2",
                ]
                FASTSimInputsDf.at[v, "glider_kg"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "glider_kg",
                ]
                FASTSimInputsDf.at[v, "vehCgM"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "vehCgM",
                ]
                FASTSimInputsDf.at[v, "driveAxleWeightFrac"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "driveAxleWeightFrac",
                ]
                FASTSimInputsDf.at[v, "wheelBaseM"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "wheelBaseM",
                ]
                FASTSimInputsDf.at[v, "cargo_kg"] = VocationRequirements.loc[
                    y, "cargo_kg"
                ]
                FASTSimInputsDf.at[v, "vehOverrideKg"] = 0
                FASTSimInputsDf.at[v, "fs_max_kw"] = OptimizerInitializationValues.loc[
                    (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                    & (
                        OptimizerInitializationValues["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fs_max_kw",
                ].values[0]
                FASTSimInputsDf.at[v, "fuelStorSecsToPeakPwr"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fuelStorSecsToPeakPwr",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "fs_kwh"] = OptimizerInitializationValues.loc[
                    (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                    & (
                        OptimizerInitializationValues["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fs_kwh",
                ].values[0]
                FASTSimInputsDf.at[v, "fs_kwhPerKg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fs_kwhPerKg",
                ].values[0]
                FASTSimInputsDf.at[v, "fc_max_kw"] = OptimizerInitializationValues.loc[
                    (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                    & (
                        OptimizerInitializationValues["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fc_max_kw",
                ].values[0]
                FASTSimInputsDf.at[v, "fc_eff_type"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fc_eff_type",
                ].values[0]
                FASTSimInputsDf.at[v, "fcAbsEffImpr"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fcAbsEffImpr",
                ].values[0]
                FASTSimInputsDf.at[v, "fuelConvSecsToPeakPwr"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fuelConvSecsToPeakPwr",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "fuelConvBaseKg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fuelConvBaseKg",
                ].values[0]
                FASTSimInputsDf.at[v, "fuelConvKwPerKg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fuelConvKwPerKg",
                ].values[0]
                FASTSimInputsDf.at[v, "mc_max_kw"] = OptimizerInitializationValues.loc[
                    (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                    & (
                        OptimizerInitializationValues["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "mc_max_kw",
                ].values[0]
                # FASTSimInputsDf.at[v, "motorPeakEff"] =                 PowertrainTechTargets.loc[(PowertrainTechTargets['PowertrainNumber'] == (pt+1)) & (PowertrainTechTargets['Year'] == BaselineVehicleSpec.at[y, 'Year']), 'motorPeakEff'].values[0]
                FASTSimInputsDf.at[v, "motorSecsToPeakPwr"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "motorSecsToPeakPwr",
                ].values[0]
                FASTSimInputsDf.at[v, "mcPeKgPerKw"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "mcPeKgPerKw",
                ].values[0]
                FASTSimInputsDf.at[v, "mcPeBaseKg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "mcPeBaseKg",
                ].values[0]
                FASTSimInputsDf.at[v, "ess_max_kw"] = OptimizerInitializationValues.loc[
                    (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                    & (
                        OptimizerInitializationValues["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "ess_max_kw",
                ].values[0]
                FASTSimInputsDf.at[v, "ess_max_kwh"] = (
                    OptimizerInitializationValues.loc[
                        (OptimizerInitializationValues["PowertrainNumber"] == (pt + 1))
                        & (
                            OptimizerInitializationValues["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "ess_max_kwh",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "essKgPerKwh"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essKgPerKwh",
                ].values[0]
                FASTSimInputsDf.at[v, "essBaseKg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essBaseKg",
                ].values[0]
                FASTSimInputsDf.at[v, "essRoundTripEff"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essRoundTripEff",
                ].values[0]
                FASTSimInputsDf.at[v, "essLifeCoefA"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essLifeCoefA",
                ].values[0]
                FASTSimInputsDf.at[v, "essLifeCoefB"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essLifeCoefB",
                ].values[0]
                FASTSimInputsDf.at[v, "wheelInertiaKgM2"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "wheelInertiaKgM2",
                ]
                FASTSimInputsDf.at[v, "numWheels"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "numWheels",
                ]
                FASTSimInputsDf.at[v, "wheelRrCoef"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "wheelRrCoef",
                ]
                FASTSimInputsDf.at[v, "wheelRadiusM"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "wheelRadiusM",
                ]
                FASTSimInputsDf.at[v, "wheelCoefOfFric"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "wheelCoefOfFric",
                ]
                FASTSimInputsDf.at[v, "min_soc"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "min_soc",
                ].values[0]
                FASTSimInputsDf.at[v, "max_soc"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "max_soc",
                ].values[0]
                FASTSimInputsDf.at[v, "essDischgToFcMaxEffPerc"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "essDischgToFcMaxEffPerc",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "essChgToFcMaxEffPerc"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "essChgToFcMaxEffPerc",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "maxAccelBufferMph"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "maxAccelBufferMph",
                ].values[0]
                FASTSimInputsDf.at[v, "maxAccelBufferPercOfUseableSoc"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "maxAccelBufferPercOfUseableSoc",
                    ].values[0]
                )
                FASTSimInputsDf.at[v, "percHighAccBuf"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "percHighAccBuf",
                ].values[0]
                FASTSimInputsDf.at[v, "mphFcOn"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "mphFcOn",
                ].values[0]
                FASTSimInputsDf.at[v, "kwDemandFcOn"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "kwDemandFcOn",
                ].values[0]
                FASTSimInputsDf.at[v, "altEff"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "altEff",
                ].values[0]
                FASTSimInputsDf.at[v, "chgEff"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "chgEff",
                ].values[0]
                FASTSimInputsDf.at[v, "auxKw"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "auxKw",
                ]
                FASTSimInputsDf.at[v, "forceAuxOnFC"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "forceAuxOnFC",
                ].values[0]
                FASTSimInputsDf.at[v, "transKg"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "transKg",
                ]
                FASTSimInputsDf.at[v, "transEff"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "transEff",
                ]
                FASTSimInputsDf.at[v, "comp_mass_multiplier"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "comp_mass_multiplier",
                ]
                FASTSimInputsDf.at[v, "essToFuelOkError"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "essToFuelOkError",
                ].values[0]
                FASTSimInputsDf.at[v, "maxRegen"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "maxRegen",
                ].values[0]
                FASTSimInputsDf.at[v, "minFcTimeOn"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "minFcTimeOn",
                ].values[0]
                FASTSimInputsDf.at[v, "idleFcKw"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "idleFcKw",
                ].values[0]
                FASTSimInputsDf.at[v, "fc_eff_map"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "engineMap",
                ].values[0]
                FASTSimInputsDf.at[v, "mcPwrOutPerc"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "mcPwrOutPerc",
                ].values[0]
                FASTSimInputsDf.at[v, "largeBaselineEff"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "largeBaselineEff",
                ].values[0]  # I'm not sure what this is
                FASTSimInputsDf.at[v, "smallBaselineEff"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "smallBaselineEff",
                ].values[0]  # I'm not sure what this is
                FASTSimInputsDf.at[v, "modernMax"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "modernMax",
                ].values[0]  # I'm not sure what this is
                FASTSimInputsDf.at[v, "stopStart"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "stopStart",
                ].values[0]  # I'm not sure what this is

                FASTSimInputsDf.at[v, "valUddsMpgge"] = 0
                FASTSimInputsDf.at[v, "valHwyMpgge"] = 0
                FASTSimInputsDf.at[v, "valCombMpgge"] = 0
                FASTSimInputsDf.at[v, "valUddsKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valHwyKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valCombKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valCdRangeMi"] = 0
                FASTSimInputsDf.at[v, "valConst65MphKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valConst60MphKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valConst55MphKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valConst45MphKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valUnadjUddsKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "valUnadjHwyKwhPerMile"] = 0
                FASTSimInputsDf.at[v, "val0To60Mph"] = 0
                FASTSimInputsDf.at[v, "valEssLifeMiles"] = 0
                FASTSimInputsDf.at[v, "valRangeMiles"] = 0
                FASTSimInputsDf.at[v, "valVehBaseCost"] = 0
                FASTSimInputsDf.at[v, "valMsrp"] = 0

                # Values to send to OtherInputs file

                OtherInputsDf.at[v, "selection"] = v + 1
                OtherInputsDf.at[v, "vmt"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "vmt",
                ].values[0]
                OtherInputsDf.at[v, "drive_cycle"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "rangeDriveCycleFilePath",
                ].values[0]
                OtherInputsDf.at[v, "segment_name"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "segment_name",
                ].values[0]
                OtherInputsDf.at[v, "gvwr_kg"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "gvwr_kg",
                ].values[0]
                OtherInputsDf.at[v, "gvwr_credit_kg"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "gvwr_credit_kg",
                ].values[0]
                OtherInputsDf.at[v, "fuel_type"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fuel_type",
                ].values[0]
                OtherInputsDf.at[v, "maint_oper_cost_dol_per_mi"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "maint_oper_cost_dol_per_mi",
                    ].values[0]
                )
                OtherInputsDf.at[v, "constant_trip_distance_mi"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "constant_trip_distance_mi",
                    ].values[0]
                )
                OtherInputsDf.at[v, "vehicle_life_yr"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "vehicle_life_yr",
                ].values[0]
                OtherInputsDf.at[v, "desired_ess_replacements"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "desired_ess_replacements",
                    ].values[0]
                )
                OtherInputsDf.at[v, "discount_rate_pct_per_yr"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "discount_rate_pct_per_yr",
                    ]
                )
                OtherInputsDf.at[v, "ess_cost_dol_per_kw"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "ess_cost_dol_per_kw",
                ].values[0]
                OtherInputsDf.at[v, "ess_cost_dol_per_kwh"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "ess_cost_dol_per_kwh",
                ].values[0]
                OtherInputsDf.at[v, "ess_base_cost_dol"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "ess_base_cost_dol",
                ].values[0]
                OtherInputsDf.at[v, "ess_cost_reduction_dol_per_yr"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "ess_cost_reduction_dol_per_yr",
                    ].values[0]
                )
                OtherInputsDf.at[v, "ess_salvage_value_dol"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "ess_salvage_value_dol",
                    ].values[0]
                )
                OtherInputsDf.at[v, "pe_mc_cost_dol_per_kw"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "pe_mc_cost_dol_per_kw",
                    ].values[0]
                )
                OtherInputsDf.at[v, "pe_mc_base_cost_dol"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "pe_mc_base_cost_dol",
                ].values[0]
                OtherInputsDf.at[v, "fc_ice_cost_dol_per_kw"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fc_ice_cost_dol_per_kw",
                    ].values[0]
                )
                OtherInputsDf.at[v, "fc_ice_base_cost_dol"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fc_ice_base_cost_dol",
                ].values[0]
                OtherInputsDf.at[v, "fc_fuelcell_cost_dol_per_kw"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fc_fuelcell_cost_dol_per_kw",
                    ].values[0]
                )
                OtherInputsDf.at[v, "fs_cost_dol_per_kwh"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "fs_cost_dol_per_kwh",
                ].values[0]
                OtherInputsDf.at[v, "fs_h2_cost_dol_per_kwh"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fs_h2_cost_dol_per_kwh",
                    ].values[0]
                )
                OtherInputsDf.at[v, "plug_base_cost_dol"] = PowertrainTechTargets.loc[
                    (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                    & (
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"]
                    ),
                    "plug_base_cost_dol",
                ].values[0]
                OtherInputsDf.at[v, "markup_pct"] = BaselineVehicleSpec.loc[
                    PowertrainTechTargets["Year"] == BaselineVehicleSpec.at[y, "Year"],
                    "markup_pct",
                ]
                OtherInputsDf.at[v, "fc_cng_ice_cost_dol_per_kw"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fc_cng_ice_cost_dol_per_kw",
                    ].values[0]
                )
                OtherInputsDf.at[v, "fs_cng_cost_dol_per_kwh"] = (
                    PowertrainTechTargets.loc[
                        (PowertrainTechTargets["PowertrainNumber"] == (pt + 1))
                        & (
                            PowertrainTechTargets["Year"]
                            == BaselineVehicleSpec.at[y, "Year"]
                        ),
                        "fs_cng_cost_dol_per_kwh",
                    ].values[0]
                )
                OtherInputsDf.at[v, "vehicle_glider_cost_dol"] = (
                    BaselineVehicleSpec.loc[
                        PowertrainTechTargets["Year"]
                        == BaselineVehicleSpec.at[y, "Year"],
                        "vehicle_glider_cost_dol",
                    ]
                )
                OtherInputsDf.at[v, "tax_rate_pct"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "tax_rate_pct",
                ]
                OtherInputsDf.at[v, "vocation"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "vocation",
                ].values[0]
                OtherInputsDf.at[v, "model_year"] = BaselineVehicleSpec.at[y, "Year"]
                OtherInputsDf.at[v, "region"] = VocationRequirements.loc[
                    VocationRequirements["Year"] == VocationRequirements.at[y, "Year"],
                    "region",
                ].values[0]
                OtherInputsDf.at[v, "target_range_mi"] = Ranges[r]
                OtherInputsDf.at[v, "min_speed_at_6pct_grade_in_5min_mph"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "min_speed_at_6pct_grade_in_5min_mph",
                    ].values[0]
                )
                OtherInputsDf.at[v, "min_speed_at_1p25pct_grade_in_5min_mph"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "min_speed_at_1p25pct_grade_in_5min_mph",
                    ].values[0]
                )
                OtherInputsDf.at[v, "max_time_0_to_60mph_at_gvwr_s"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "max_time_0_to_60mph_at_gvwr_s",
                    ].values[0]
                )
                OtherInputsDf.at[v, "max_time_0_to_30mph_at_gvwr_s"] = (
                    VocationRequirements.loc[
                        VocationRequirements["Year"]
                        == VocationRequirements.at[y, "Year"],
                        "max_time_0_to_30mph_at_gvwr_s",
                    ].values[0]
                )
                # OtherInputsDf.at[v, "Powertrain"] =                  PowertrainTechTargets.loc[(PowertrainTechTargets['PowertrainNumber'] == (pt+1)) & (PowertrainTechTargets['Year'] == BaselineVehicleSpec.at[y, 'Year']), 'PowertrainName'].values[0]

                v += 1

    FASTSimInputsDf.set_index(
        pd.Series(range(1, len(FASTSimInputsDf) + 1)), inplace=True
    )
    FASTSimInputsDf.to_csv(
        dst / gl.FASTSIM_INPUTS_FILE, index=False
    )  # ####Make this into a results folder

    OtherInputsDf.set_index(pd.Series(range(1, len(OtherInputsDf) + 1)), inplace=True)
    OtherInputsDf.to_csv(
        dst / gl.OTHER_INPUTS_FILE, index=False
    )  # ####Make this into a results folder