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

Merge master into develop #1816

Merged
merged 47 commits into from
May 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
06bea41
throw exception in case no bike
Mar 12, 2019
e1cd658
remove default bike type
Mar 12, 2019
f8ab1bb
Merge branch 'master' into zb/default-bike-removal-4ci
JustinPihony Mar 13, 2019
452b43e
scalafmt
Mar 13, 2019
89a2bcd
Merge branch 'master' into zb/default-bike-removal-4ci
JustinPihony Mar 13, 2019
36d1c17
fix mode choice warnings (#1679)
zishanbilal Apr 17, 2019
b6e91fe
Use `R5` from `com.github.LBNL-UCB-STI`
REASY Apr 17, 2019
6266011
Merge pull request #1695 from LBNL-UCB-STI/REASY-patch-1
wrashid Apr 17, 2019
d4b873a
Merge branch 'master' into zb/default-bike-removal-4ci
Apr 18, 2019
2aba090
scala fmt
Apr 18, 2019
7aa98a0
- Fix links with the same `fromNode` and `toNode`: set length, capaci…
REASY Apr 17, 2019
1bcbee1
Updated `beam-utilities` to `v0.2.1`
REASY Apr 18, 2019
90cde8c
Merge pull request #1478 from LBNL-UCB-STI/zb/default-bike-removal-4ci
zishanbilal Apr 18, 2019
ad0ca7c
Merge branch 'master' into art/adjust-speeds-4ci
REASY Apr 18, 2019
de6f9a5
Merge pull request #1707 from LBNL-UCB-STI/art/adjust-speeds-4ci
wrashid Apr 18, 2019
b440293
- `injector` is a field of `BeamServices` (it's already god object, w…
REASY Apr 18, 2019
3a5c35f
Merge branch 'master' into art/scatter-plot-should-include-only-car-t…
wrashid Apr 18, 2019
e51a5a7
Merge pull request #1708 from LBNL-UCB-STI/art/scatter-plot-should-in…
wrashid Apr 18, 2019
75217b9
Log number of times when min speed has been used during the iteration
REASY Apr 19, 2019
7109def
Merge pull request #1717 from LBNL-UCB-STI/art/min-speed-usage-4ci
wrashid Apr 19, 2019
99a4189
Fix TravelTimeObserved related tests
JustinPihony Apr 21, 2019
39de9af
fmt
JustinPihony Apr 22, 2019
b7aa6a9
Fix compilation for publicity and naming
JustinPihony Apr 22, 2019
b0012e6
Add all modes to excerpt skims
REASY Apr 22, 2019
423b8bd
Fix trait due to circular pain
JustinPihony Apr 22, 2019
03915d1
fmt
JustinPihony Apr 22, 2019
8118a8f
Prepare data in parallel
REASY Apr 22, 2019
387f05c
Move to handle timing
JustinPihony Apr 22, 2019
89157df
Fixed broken tests
REASY Apr 22, 2019
8ed4fb3
Merge pull request #1722 from LBNL-UCB-STI/jp/fix-tests
wrashid Apr 23, 2019
5fba219
Merge branch 'master' into art/#1724-include-all-modes-4ci
REASY Apr 23, 2019
29499d1
Provide `BeamSkimmer` and `TravelTimeObserved`
REASY Apr 23, 2019
c550009
Merge pull request #1736 from LBNL-UCB-STI/art/#1735-fix-master-attem…
wrashid Apr 23, 2019
842d35a
Merge branch 'master' into art/#1724-include-all-modes-4ci
REASY Apr 23, 2019
fad3b93
Merge pull request #1725 from LBNL-UCB-STI/art/#1724-include-all-mode…
wrashid Apr 23, 2019
5c361dd
Done (#1739)
REASY Apr 23, 2019
2fb4560
fix beam sim lambda merge issues (#1737)
zishanbilal Apr 24, 2019
595de34
fix iteration script
Apr 24, 2019
e4e19b2
Merge branch 'master' into ab/fix_zip_iteration_script
wrashid Apr 24, 2019
d8fc065
Merge pull request #1746 from LBNL-UCB-STI/ab/fix_zip_iteration_script
wrashid Apr 24, 2019
1c6aa89
Merge develop to master (#1791)
REASY May 16, 2019
e9f1b02
Revert "Merge develop to master (#1791)"
REASY May 18, 2019
58011e3
Merge pull request #1823 from LBNL-UCB-STI/revert-1791-art/develop-to…
wrashid May 18, 2019
e62cc1c
Merge remote-tracking branch 'origin/develop' into art/merge-develope…
REASY May 18, 2019
f23cdf5
Merge remote-tracking branch 'origin/develop' into art/merge-develope…
REASY May 18, 2019
bd8426b
Merge remote-tracking branch 'origin/develop' into art/merge-develope…
REASY May 19, 2019
7255d94
Merge pull request #1827 from LBNL-UCB-STI/art/merge-develope-to-mast…
REASY May 19, 2019
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
7 changes: 4 additions & 3 deletions aws/src/main/python/beam_lambda/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

S3_PUBLISH_SCRIPT = '''
- sleep 10s
- opth="output/$(basename $(dirname $cf))"
- echo opth
- opth="output"
- echo $opth
- for file in glob.iglob($opth/*); do sudo cp /var/log/cloud-init-output.log "$file" && sudo zip -r "${file%.*}_$UID.zip" "$file"; done;
- for file in glob.iglob($opth/*.zip); do s3p="$s3p, https://s3.us-east-2.amazonaws.com/beam-outputs/$(os.path.basename($file))"; done;
- sudo aws --region "$S3_REGION" s3 cp $opth/*.zip s3://beam-outputs/'''
Expand Down Expand Up @@ -109,6 +109,7 @@
'r5.large', 'r5.xlarge', 'r5.2xlarge', 'r5.4xlarge', 'r5.12xlarge', 'r5.24xlarge',
'r5d.large', 'r5d.xlarge', 'r5d.2xlarge', 'r5d.4xlarge', 'r5d.12xlarge', 'r5d.24xlarge',
'm5d.large', 'm5d.xlarge', 'm5d.2xlarge', 'm5d.4xlarge', 'm5d.12xlarge', 'm5d.24xlarge',
'm5a.24xlarge',
'z1d.large', 'z1d.xlarge', 'z1d.2xlarge', 'z1d.3xlarge', 'z1d.6xlarge', 'z1d.12xlarge']

regions = ['us-east-1', 'us-east-2', 'us-west-2']
Expand Down Expand Up @@ -233,7 +234,7 @@ def deploy_handler(event):
if shutdown_behaviour not in shutdown_behaviours:
shutdown_behaviour = os.environ['SHUTDOWN_BEHAVIOUR']

if volume_size < 64 or volume_size > 256:
if volume_size < 64 or volume_size > 512:
volume_size = 64

selected_script = CONFIG_SCRIPT
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ shutdownWait=15
shutdownBehaviour=stop
s3Backup=true
maxRAM=140g
#storageSize (in GiB) = any number between 64 and 256. default 64
#storageSize (in GiB) = any number between 64 and 512. default 64
storageSize=64
region=us-east-2
systemProp.org.gradle.internal.http.connectionTimeout=180000
Expand Down
8 changes: 4 additions & 4 deletions src/main/bash/zipRootAndLastIterationAndUploadToS3.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
#!/usr/bin/env bash

if [ "$#" -ne 2 ]; then
if [ "$#" -ne 3 ]; then
echo "Illegal number of parameters";
exit 1;
fi
Expand All @@ -11,5 +11,5 @@ zipfile="$filename-it.$2"
zip -r "$zipfile.zip" $filename -x "$filename/ITERS/*"
zip -ur "$zipfile.zip" $filename/ITERS/it.$2

aws --region "us-east-2" s3 cp "$zipfile.zip" s3://beam-outputs/
echo "S3 URL: https://s3.us-east-2.amazonaws.com/beam-outputs/$zipfile.zip";
aws --region "us-east-2" s3 cp "$zipfile.zip" s3://$3/
echo "S3 URL: https://s3.us-east-2.amazonaws.com/$3/$zipfile.zip"
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package beam.agentsim.agents.choice.mode

import beam.agentsim.agents.household.HouseholdActor
import beam.agentsim.agents.modalbehaviors.ModeChoiceCalculator
import beam.router.Modes
import beam.router.Modes.BeamMode.CAR
import beam.router.model.EmbodiedBeamTrip
import beam.sim.BeamServices
import beam.sim.population.AttributesOfIndividual
import org.matsim.api.core.v01.Id
import org.matsim.api.core.v01.population.{Activity, Person}

import scala.collection.mutable.ListBuffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ class ModeChoiceLCCM(
trips: ListBuffer[EmbodiedBeamTrip],
person: Person,
attributesOfIndividual: AttributesOfIndividual
) = {
): Double = {
// Compute and log all-day score w.r.t. all modality styles
// One of them has many suspicious-looking 0.0 values. Probably something which
// should be minus infinity or exception instead.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ import beam.router.BeamRouter._
import beam.router.Modes
import beam.router.Modes.BeamMode
import beam.router.Modes.BeamMode._
import beam.router.model.{BeamLeg, BeamPath, EmbodiedBeamLeg, EmbodiedBeamTrip}
import beam.router.model.{BeamLeg, EmbodiedBeamLeg, EmbodiedBeamTrip}
import beam.router.r5.R5RoutingWorker
import beam.sim.population.AttributesOfIndividual
import beam.utils.plan.sampling.AvailableModeUtils._
import org.matsim.api.core.v01.population.{Activity, Leg}
import org.matsim.api.core.v01.{Coord, Id}
import org.matsim.core.population.routes.{NetworkRoute, RouteUtils}
import org.matsim.core.population.routes.NetworkRoute
import org.matsim.vehicles.Vehicle

import scala.collection.JavaConverters._
import scala.collection.mutable.ArrayBuffer
import scala.concurrent.duration._
import scala.concurrent.{ExecutionContext, Future}

Expand All @@ -53,7 +51,7 @@ trait ChoosesMode {

def bodyVehiclePersonId = VehiclePersonId(body.id, id, self)

def currentTourBeamVehicle =
def currentTourBeamVehicle: BeamVehicle =
beamVehicles(stateData.asInstanceOf[ChoosesModeData].personData.currentTourPersonalVehicle.get)
.asInstanceOf[ActualVehicle]
.vehicle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import beam.router.Modes.BeamMode._
import beam.router.model.{EmbodiedBeamLeg, EmbodiedBeamTrip}
import beam.sim.population.AttributesOfIndividual
import beam.sim.{BeamServices, HasServices}
import org.matsim.api.core.v01.population.Activity
import org.matsim.api.core.v01.population.Person
import org.matsim.api.core.v01.population.{Activity, Person}

import scala.collection.mutable
import scala.collection.mutable.ListBuffer
import scala.util.Random

Expand All @@ -20,8 +18,6 @@ import scala.util.Random
*/
trait ModeChoiceCalculator extends HasServices {

import ModeChoiceCalculator._

implicit lazy val random: Random = new Random(
beamServices.beamConfig.matsim.modules.global.randomSeed
)
Expand Down
11 changes: 0 additions & 11 deletions src/main/scala/beam/agentsim/agents/vehicles/BeamVehicleType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,6 @@ object BeamVehicleType {
automationLevel = 1
)

val defaultBikeBeamVehicleType: BeamVehicleType = BeamVehicleType(
Id.create("BIKE-TYPE-DEFAULT", classOf[BeamVehicleType]),
2,
0,
1.5,
Gasoline,
defaultHumanBodyBeamVehicleType.primaryFuelConsumptionInJoulePerMeter / 5.0, // 5x more efficient than walking
defaultHumanBodyBeamVehicleType.primaryFuelCapacityInJoule, // same capacity as human body
vehicleCategory = Bike
)

def isHumanVehicle(beamVehicleId: Id[Vehicle]): Boolean =
beamVehicleId.toString.startsWith("body")

Expand Down
1 change: 0 additions & 1 deletion src/main/scala/beam/replanning/ReplanningUtil.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import org.matsim.api.core.v01.population._
import org.matsim.core.config.groups.PlanCalcScoreConfigGroup
import org.matsim.core.population.PopulationUtils
import org.matsim.core.replanning.selectors.RandomPlanSelector
import org.slf4j.LoggerFactory

import scala.collection.JavaConverters._

Expand Down
15 changes: 9 additions & 6 deletions src/main/scala/beam/utils/scenario/ScenarioLoader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package beam.utils.scenario
import java.util.Random

import beam.agentsim.agents.vehicles.EnergyEconomyAttributes.Powertrain
import beam.agentsim.agents.vehicles.{BeamVehicle, BeamVehicleType, VehicleCategory}
import beam.agentsim.agents.vehicles.{BeamVehicle, VehicleCategory}
import beam.router.Modes.BeamMode
import beam.sim.BeamServices
import beam.sim.vehicles.VehiclesAdjustment
Expand Down Expand Up @@ -148,13 +148,16 @@ class ScenarioLoader(
)
.toBuffer

vehicleTypes.append(
beamServices.vehicleTypes.values
.find(_.vehicleCategory == VehicleCategory.Bike)
.getOrElse(BeamVehicleType.defaultBikeBeamVehicleType)
)
beamServices.vehicleTypes.values
.find(_.vehicleCategory == VehicleCategory.Bike) match {
case Some(vehType) =>
vehicleTypes.append(vehType)
case None =>
throw new RuntimeException("Bike not found in vehicle types.")
}
initialVehicleCounter += householdInfo.cars
totalCarCount += vehicleTypes.count(_.vehicleCategory.toString == "Car")

val vehicleIds = new java.util.ArrayList[Id[Vehicle]]
vehicleTypes.foreach { beamVehicleType =>
val vt = VehicleUtils.getFactory.createVehicleType(Id.create(beamVehicleType.id, classOf[VehicleType]))
Expand Down