Skip to content

Commit

Permalink
Merge branch 'develop' into competitions-pin_dev_merge
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/beam/analysis/summary/VehicleMilesTraveledAnalysis.java
#	src/main/scala/beam/agentsim/agents/choice/mode/ModeChoiceMultinomialLogit.scala
#	src/main/scala/beam/agentsim/infrastructure/ZonalParkingManager.scala
#	src/main/scala/beam/router/r5/R5RoutingWorker.scala
#	src/main/scala/beam/sim/BeamHelper.scala
#	src/main/scala/beam/sim/BeamPrepareForSim.scala
#	src/main/scala/beam/sim/population/PopulationAdjustment.scala
#	src/main/scala/beam/utils/plan/sampling/AvailableModeUtils.scala
#	src/main/scala/beam/utils/plan/sampling/PlansSamplerApp.scala
  • Loading branch information
sfwatergit committed Sep 19, 2019
2 parents ae4ea47 + ad17ad1 commit 72ee3d1
Show file tree
Hide file tree
Showing 408 changed files with 22,500 additions and 12,242 deletions.
5 changes: 1 addition & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# fallback on built-in heuristics
# this must be first so later entries will override it
* text=auto

# check out text files with lf, not crlf, on Windows. (especially
# important for Scala source files, since """ preserves line endings)
text eol=lf

# These files are text and should be normalized (convert crlf => lf)
*.c eol=lf
*.check eol=lf
Expand All @@ -20,12 +18,10 @@ text eol=lf
*.sh eol=lf
*.txt eol=lf
*.xml eol=lf

# Windows-specific files get windows endings
*.bat eol=crlf
*.cmd eol=crlf
*-windows.tmpl eol=crlf

*.osm filter=lfs diff=lfs merge=lfs -text
*.pbf filter=lfs diff=lfs merge=lfs -text
*.csv filter=lfs diff=lfs merge=lfs -text
Expand All @@ -38,3 +34,4 @@ text eol=lf
*.txt filter=lfs diff=lfs merge=lfs -text
test/**/*.xml filter=lfs diff=lfs merge=lfs -text
production/**/*.xml filter=lfs diff=lfs merge=lfs -text
test/input/sf-light/TechTakeover_longTerm_lowTech/ filter=lfs diff=lfs merge=lfs -text
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ libs
!.idea/runConfigurations/Run*
.cache*
target/
beam.iml
*.iml
out/
beam.ipr
beam.iws
Expand Down Expand Up @@ -54,3 +54,4 @@ physsim-network.xml
src/main/scala/beam/sandbox
test/scala/beam/sandbox
log-path_IS_UNDEFINED/
.Rproj.user
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

[![Documentation Status](https://readthedocs.org/projects/beam/badge/?version=latest)](http://beam.readthedocs.io/en/latest/?badge=latest)

[![Waffle.io - Columns and their card count](https://badge.waffle.io/LBNL-UCB-STI/beam.svg?columns=all)](https://waffle.io/LBNL-UCB-STI/beam)

BEAM stands for Behavior, Energy, Autonomy, and Mobility. The model is being developed as a framework for a series of research studies in sustainable transportation at Lawrence Berkeley National Laboratory and the UC Berkeley Institute for Transportation Studies.
BEAM stands for Behavior, Energy, Autonomy, and Mobility. The model is being developed as a framework for a series of research studies in sustainable transportation at Lawrence Berkeley National Laboratory.


BEAM extend the [Multi-Agent Transportation Simulation Framework](https://github.com/matsim-org/matsim) (MATSim) to enable powerful and scalable analysis of urban transportation systems.
Expand Down
80 changes: 64 additions & 16 deletions aws/src/main/python/beam_lambda/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,15 @@
- sleep 10s
- 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/'''
- finalPath=""
- for file in $opth/*; do
- for path2 in $file/*; do
- finalPath="$path2";
- done;
- done;
- sudo cp /var/log/cloud-init-output.log "$finalPath"
- sudo aws --region "$S3_REGION" s3 cp "$finalPath" s3://beam-outputs/"$finalPath" --recursive;
- s3p="$s3p, https://s3.us-east-2.amazonaws.com/beam-outputs/index.html#$finalPath"'''

END_SCRIPT_DEFAULT = '''echo "End script not provided."'''

Expand All @@ -40,36 +46,72 @@

CONFIG_DEFAULT = 'production/application-sfbay/base.conf'

initscript = (('''#cloud-config
initscript = (('''
#cloud-config
write_files:
- content: |
#!/bin/bash
data="{\\"text\\":\\""
data+=$1
data+="\\"}"
printf "%s" "$data" > /tmp/slack.json
curl -X POST -H 'Content-type: application/json' --data-binary @/tmp/slack.json $SLACK_HOOK_WITH_TOKEN
path: /tmp/slack.sh
- content: |
0 * * * * curl -X POST -H "Content-type: application/json" --data '"'"'{"$(ec2metadata --instance-type) instance $(ec2metadata --instance-id) running... \\n Batch [$UID] completed and instance of type $(ec2metadata --instance-type) is still running in $REGION since last $(($(($(date +%s) - $(cat /tmp/.starttime))) / 3600)) Hour $(($(($(date +%s) - $(cat /tmp/.starttime))) / 60)) Minute."}'"'"
path: /tmp/slack_notification
runcmd:
- echo "-------------------Starting Beam Sim----------------------"
- echo $(date +%s) > /tmp/.starttime
- cd /home/ubuntu/git/beam
- rm -rf /home/ubuntu/git/beam/test/input/sf-light/r5/network.dat
- ln -sf /var/log/cloud-init-output.log ./cloud-init-output.log
- /home/ubuntu/git/glip.sh -i "http://icons.iconarchive.com/icons/uiconstock/socialmedia/32/AWS-icon.png" -a "Run Started" -b "Run Name** $TITLED** \\n Instance ID $(ec2metadata --instance-id) \\n Instance type **$(ec2metadata --instance-type)** \\n Host name **$(ec2metadata --public-hostname)** \\n Web browser **http://$(ec2metadata --public-hostname):8000** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT"
- curl -X POST -H 'Content-type: application/json' --data '{"text":"Run Started \\n Run Name** $TITLED** \\n Instance ID $(ec2metadata --instance-id) \\n Instance type **$(ec2metadata --instance-type)** \\n Host name **$(ec2metadata --public-hostname)** \\n Web browser **http://$(ec2metadata --public-hostname):8000** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT"}' https://hooks.slack.com/services/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
- hello_msg=$(printf "Run Started \\n Run Name** $TITLED** \\n Instance ID %s \\n Instance type **%s** \\n Host name **%s** \\n Web browser ** http://%s:8000 ** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT" $(ec2metadata --instance-id) $(ec2metadata --instance-type) $(ec2metadata --public-hostname) $(ec2metadata --public-hostname))
- chmod +x /tmp/slack.sh
- echo "notification sent..."
- echo '0 * * * * /home/ubuntu/git/glip.sh -i "http://icons.iconarchive.com/icons/uiconstock/socialmedia/32/AWS-icon.png" -a "$(ec2metadata --instance-type) instance $(ec2metadata --instance-id) running..." -b "Batch [$UID] completed and instance of type $(ec2metadata --instance-type) is still running in $REGION since last $(($(($(date +%s) - $(cat /tmp/.starttime))) / 3600)) Hour $(($(($(date +%s) - $(cat /tmp/.starttime))) / 60)) Minute."' > /tmp/glip_notification
- echo '0 * * * * curl -X POST -H "Content-type: application/json" --data '"'"'{"$(ec2metadata --instance-type) instance $(ec2metadata --instance-id) running... \\n Batch [$UID] completed and instance of type $(ec2metadata --instance-type) is still running in $REGION since last $(($(($(date +%s) - $(cat /tmp/.starttime))) / 3600)) Hour $(($(($(date +%s) - $(cat /tmp/.starttime))) / 60)) Minute."}'"'"'' > /tmp/slack_notification
- echo "notification saved..."
- crontab /tmp/glip_notification
- crontab /tmp/slack_notification
- crontab -l
- echo "notification scheduled..."
- git fetch
- echo "git checkout ..."
- GIT_LFS_SKIP_SMUDGE=1 sudo git checkout $BRANCH
- echo "git checkout -qf ..."
- GIT_LFS_SKIP_SMUDGE=1 sudo git checkout -qf $COMMIT
- sudo git pull
- sudo git lfs pull
- echo "git checkout -qf ..."
- GIT_LFS_SKIP_SMUDGE=1 sudo git checkout -qf $COMMIT
- echo "preparing for python analysis"
- sudo dpkg --configure -a
- sudo dpkg --remove --force-remove-reinstreq unattended-upgrades
- sudo apt-get install unattended-upgrades
- sudo dpkg --configure -a
- sudo apt update
- sudo apt install npm -y
- sudo apt install nodejs-legacy -y
- sudo apt install python-pip -y
- pip install --upgrade pip
- sudo pip install pandas
- sudo pip install plotly
- sudo pip install psutil requests
- sudo npm cache clean -f
- sudo npm install -g n
- sudo n stable
- sudo npm install -g npm
- sudo apt-get install curl
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install nodejs -y
- sudo apt-get install libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev -y
- sudo npm install -g [email protected] orca --unsafe-perm=true --alow-root -y
- sudo apt-get install xvfb -y
- echo "gradlew assemble ..."
- ./gradlew assemble
- echo "looping config ..."
- export MAXRAM=$MAX_RAM
- export SIGOPT_CLIENT_ID="$SIGOPT_CLIENT_ID"
- export SIGOPT_DEV_ID="$SIGOPT_DEV_ID"
- echo $MAXRAM
- /tmp/slack.sh "$hello_msg"
- /home/ubuntu/git/glip.sh -i "http://icons.iconarchive.com/icons/uiconstock/socialmedia/32/AWS-icon.png" -a "Run Started" -b "Run Name** $TITLED** \\n Instance ID $(ec2metadata --instance-id) \\n Instance type **$(ec2metadata --instance-type)** \\n Host name **$(ec2metadata --public-hostname)** \\n Web browser **http://$(ec2metadata --public-hostname):8000** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT"
- s3p=""
- for cf in $CONFIG
- do
Expand All @@ -81,8 +123,10 @@
- then
- s3glip="\\n S3 output url ${s3p#","}"
- fi
- bye_msg=$(printf "Run Completed \\n Run Name** $TITLED** \\n Instance ID %s \\n Instance type **%s** \\n Host name **%s** \\n Web browser ** http://%s:8000 ** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT %s \\n Shutdown in $SHUTDOWN_WAIT minutes" $(ec2metadata --instance-id) $(ec2metadata --instance-type) $(ec2metadata --public-hostname) $(ec2metadata --public-hostname) "$s3glip")
- echo "$bye_msg"
- /tmp/slack.sh "$bye_msg"
- /home/ubuntu/git/glip.sh -i "http://icons.iconarchive.com/icons/uiconstock/socialmedia/32/AWS-icon.png" -a "Run Completed" -b "Run Name** $TITLED** \\n Instance ID $(ec2metadata --instance-id) \\n Instance type **$(ec2metadata --instance-type)** \\n Host name **$(ec2metadata --public-hostname)** \\n Web browser **http://$(ec2metadata --public-hostname):8000** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT $s3glip \\n Shutdown in $SHUTDOWN_WAIT minutes"
- curl -X POST -H 'Content-type: application/json' --data '{"text":"Run Completed \\n Run Name** $TITLED** \\n Instance ID $(ec2metadata --instance-id) \\n Instance type **$(ec2metadata --instance-type)** \\n Host name **$(ec2metadata --public-hostname)** \\n Web browser **http://$(ec2metadata --public-hostname):8000** \\n Region $REGION \\n Batch $UID \\n Branch **$BRANCH** \\n Commit $COMMIT $s3glip \\n Shutdown in $SHUTDOWN_WAIT minutes"}' https://hooks.slack.com/services/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
- $END_SCRIPT
- sudo shutdown -h +$SHUTDOWN_WAIT
'''))
Expand All @@ -109,7 +153,6 @@
'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 @@ -234,7 +277,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 > 512:
if volume_size < 64 or volume_size > 256:
volume_size = 64

selected_script = CONFIG_SCRIPT
Expand Down Expand Up @@ -272,7 +315,12 @@ def deploy_handler(event):
runName = titled
if len(params) > 1:
runName += "-" + `runNum`
script = initscript.replace('$RUN_SCRIPT',selected_script).replace('$REGION',region).replace('$S3_REGION',os.environ['REGION']).replace('$BRANCH',branch).replace('$COMMIT', commit_id).replace('$CONFIG', arg).replace('$MAIN_CLASS', execute_class).replace('$UID', uid).replace('$SHUTDOWN_WAIT', shutdown_wait).replace('$TITLED', runName).replace('$MAX_RAM', max_ram).replace('$S3_PUBLISH', s3_publish).replace('$SIGOPT_CLIENT_ID', sigopt_client_id).replace('$SIGOPT_DEV_ID', sigopt_dev_id).replace('$END_SCRIPT', end_script)
script = initscript.replace('$RUN_SCRIPT',selected_script).replace('$REGION',region).replace('$S3_REGION',os.environ['REGION']) \
.replace('$BRANCH',branch).replace('$COMMIT', commit_id).replace('$CONFIG', arg) \
.replace('$MAIN_CLASS', execute_class).replace('$UID', uid).replace('$SHUTDOWN_WAIT', shutdown_wait) \
.replace('$TITLED', runName).replace('$MAX_RAM', max_ram).replace('$S3_PUBLISH', s3_publish) \
.replace('$SIGOPT_CLIENT_ID', sigopt_client_id).replace('$SIGOPT_DEV_ID', sigopt_dev_id).replace('$END_SCRIPT', end_script) \
.replace('$SLACK_HOOK_WITH_TOKEN', os.environ['SLACK_HOOK_WITH_TOKEN'])
instance_id = deploy(script, instance_type, region.replace("-", "_")+'_', shutdown_behaviour, runName, volume_size)
host = get_dns(instance_id)
txt = txt + 'Started batch: {batch} with run name: {titled} for branch/commit {branch}/{commit} at host {dns} (InstanceID: {instance_id}). '.format(branch=branch, titled=runName, commit=commit_id, dns=host, batch=uid, instance_id=instance_id)
Expand Down Expand Up @@ -320,4 +368,4 @@ def lambda_handler(event, context):
if command_id in instance_operations:
return instance_handler(event)

return "Operation {command} not supported, please specify one of the supported operations (deploy | start | stop | terminate | log). ".format(command=command_id)
return "Operation {command} not supported, please specify one of the supported operations (deploy | start | stop | terminate | log). ".format(command=command_id)
49 changes: 43 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import com.amazonaws.services.lambda.model.InvocationType
import jp.classmethod.aws.gradle.lambda.AWSLambdaInvokeTask
import com.bmuschko.gradle.docker.tasks.image.*

import java.time.Instant
import java.time.ZoneOffset
Expand All @@ -17,6 +18,7 @@ buildscript {
classpath "jp.classmethod.aws:gradle-aws-plugin:0.35"
classpath "com.github.viswaramamoorthy:gradle-util-plugins:0.1.0-RELEASE"
classpath 'cz.alenkacz:gradle-scalafmt:1.7.0'
classpath 'com.bmuschko:gradle-docker-plugin:3.6.1'
}
}

Expand All @@ -39,9 +41,10 @@ apply plugin: 'kr.motd.sphinx'
apply plugin: 'application'
apply plugin: 'ManifestClasspath'
apply plugin: 'scalafmt'
apply plugin: 'com.bmuschko.docker-java-application'

group = 'beam'
version = '0.6.0'
version = '0.8.0'

description = """"""

Expand Down Expand Up @@ -111,9 +114,9 @@ allprojects {

dependencies {

//beam-utilities
compile(group: 'com.github.LBNL-UCB-STI', name: 'beam-utilities', version: 'v0.2.1') {
exclude group: 'com.github.michaz', module: 'r5'
compile(group: 'com.github.LBNL-UCB-STI', name: 'beam-utilities', version: 'v0.2.4') {
exclude group: 'com.github.LBNL-UCB-STI', module: 'r5'
exclude group: 'org.matsim', module: 'matsim'
}

////////////////////////////
Expand Down Expand Up @@ -178,7 +181,7 @@ dependencies {
compile "com.sigopt:sigopt-java:4.9.0"

testCompile group: 'junit', name: 'junit', version: '4.8'
testCompile group: 'org.mockito', name: 'mockito-inline', version: '2.+'
testCompile group: 'org.mockito', name: 'mockito-inline', version: '2.27.0'
testCompile group: "org.mockito", name: "mockito-core", version: "2.+"

/////////////////////////////////
Expand All @@ -194,6 +197,7 @@ dependencies {

// TEST Scala //
testCompile group: 'org.scalatest', name: "scalatest_${scalaBinaryVersion}", version: '3.0.1'
testRuntime "org.pegdown:pegdown:1.4.2" // HTML report for scalatest

// 3rd Party Scala //

Expand Down Expand Up @@ -264,6 +268,10 @@ dependencies {

compile 'org.apache.commons:commons-compress:1.18'

compile group: 'de.lmu.ifi.dbs.elki', name: 'elki', version:'0.7.5'

compile group: 'com.zaxxer', name: 'nuprocess', version: '1.2.4'

def parquet = "1.10.0"
compile group: 'org.apache.parquet', name: 'parquet-hadoop', version: parquet
compile group: 'org.apache.parquet', name: 'parquet-avro', version: parquet
Expand Down Expand Up @@ -300,7 +308,7 @@ configurations.all {
// Task to run scala tests, as Scala tests not picked up by Gradle by default.
task spec(dependsOn: ['testClasses'], type: JavaExec) {
main = 'org.scalatest.tools.Runner'
args = ['-R', 'build/classes/scala/test', '-oD', '-l', 'beam.tags.ExcludeRegular']
args = ['-R', 'build/classes/scala/test', '-h', 'build/scalatest-report', '-oD', '-l', 'beam.tags.ExcludeRegular']
classpath = sourceSets.test.runtimeClasspath
}
build.dependsOn spec
Expand Down Expand Up @@ -615,12 +623,15 @@ task execute(type: JavaExec) {
}
}


task matsimConversion(type: JavaExec) {
main = 'beam.utils.matsim_conversion.MatsimConversionTool'
classpath = sourceSets.main.runtimeClasspath
environment "PWD", "na"
if (project.hasProperty("confPath")) {
args Eval.me(confPath)
// if this triggers an error, try
// args "${confPath}"
}
}

Expand Down Expand Up @@ -655,3 +666,29 @@ And that would only happen if the committed code is not formatted as expected.""
}
}
}

docker{

registryCredentials {
url = 'https://index.docker.io/v1/'
username = System.getenv("DOCKER_USER")
password = System.getenv("DOCKER_PASSWORD")
}

javaApplication {
baseImage = 'continuumio/miniconda3'
maintainer = 'LBNL Beam Team'
tag = "beammodel/beam:$version"
}
}

dockerDistTar {
instruction 'RUN apt-get update && apt-get -y install openjdk-8-jdk && rm -rf /var/lib/apt/lists/*'
addFile 'test/', 'test/'
}

dockerCopyDistResources {
from('test/') {
into('test/')
}
}
Binary file added docs/_static/uml/ChoosesMode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/ChoosesParking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/DrivesVehicle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/HouseholdCAVDriverAgentFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/PersonAgent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/RideHailAgentFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/TransistDriverFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/uml/UnifiedStateFSM.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,14 @@ File: :code:`~/Library/LaunchAgents/setenv.BEAM_OUTPUT.plist`::
</dict>
</plist>

GIT-LFS timeout - how to proceed
GIT-LFS - known issues
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
** IntelliJ IDEA credentials issue **

Sometimes it might be possible that IntelliJ IDEA integration struggles with the credentials of git-lfs if they are different from your regular git credentials (which is most probably the case for beam). Hence if you changed files in beam that are tracked by git-lfs (e.g. vehicles.csv.gz) you should use command line git for pushing them to the server.

** timeout **

Sometimes it is possible to face a timeout issue when trying to push huge files. The steps below can be followed:

#. Connect to some EC2 server inside the same Amazon S3 region: us-east-2
Expand Down
24 changes: 24 additions & 0 deletions docs/uml/ChoosesModeFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state ChoosingMode #eb1921

state FinishingModeChoice #eb1921

'Transition State'

FinishingModeChoice -[#blue,dotted]-> WaitingForDeparture : IntermediateTransition
ChoosingMode --> ChoosingMode : MobilityStatusResponse
ChoosingMode --> ChoosingMode : RoutingResponse
ChoosingMode --> ChoosingMode : RideHailResponse
ChoosingMode --> ChoosingMode : ParkingInquiryResponse
ChoosingMode --> ChoosingMode : CavTripLegsResponse
ChoosingMode --> FinishingModeChoice


@enduml
20 changes: 20 additions & 0 deletions docs/uml/ChoosesParkingFSM.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml

scale 1000 width
skinparam stateBorderColor #black
skinparam stateFontStyle bold
skinparam arrowColor #black

' BeamAgent: States '
state ReleasingParkingSpot #eb1921

state ChoosingParkingSpot #eb1921

'Transition State'
ReleasingParkingSpot --> ReleasingParkingSpot: StartLegTrigger
ReleasingParkingSpot -[#blue,dotted]-> WaitingToDrive: IntermediateTransition
ChoosingParkingSpot --> ChoosingParkingSpot : ParkingInquiryResponse
ChoosingParkingSpot --> WaitingToDrive : RoutingResponse


@enduml
Loading

0 comments on commit 72ee3d1

Please sign in to comment.