Skip to content

Commit 42cd0da

Browse files
committed
Add instructions to readme, make bug fixes and path fixes and add input files to get exmaples to run, added TODOs
1 parent 7707f59 commit 42cd0da

27 files changed

+21550
-38
lines changed

famodel/installation/01_unload4installation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""
22
Script to unload a project class from a ConceptDesign class.
33
4+
This just sets up a project, does not test the install model.
5+
46
Steps
57
-----
68
1. Load the ConceptDesign object.
@@ -28,7 +30,7 @@
2830
# ILIA | 3_ILIA_1P2C_grd_mini (caseI for installation)
2931

3032
category = "ILIA"
31-
conceptName = "3_ILIA_1P2C_grd_mini"
33+
conceptName = "3_ILIA_al[cr]_grd"
3234

3335
# FILE LOCATIONS
3436
filePath = os.path.dirname(os.path.abspath(__file__))

famodel/installation/02_load4installation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""
22
This example loads a project class and conducts some analysis and performance metrics.
33
4+
This just sets up a project, does not test the install model.
5+
46
NOTE: If the project yaml file does not exist, please run 01_unload_driver.py before this
57
so you have a project that you can load here in this example. The project yaml file generated
68
by the unload driver is named proj_{<concept name>}. Insert that in the inputFile in this script.
@@ -25,7 +27,7 @@
2527

2628
# CONCEPT CATEGORY & NAME
2729
category = "ILIA" # ILIA | ILSA | SLIA | SLSA | hybrid
28-
conceptName = "3_ILIA_1P2C_grd_mini"
30+
conceptName = "3_ILIA_al[cr]_grd"
2931

3032
# FILE LOCATIONS
3133
filePath = os.path.dirname(os.path.abspath(__file__))

famodel/installation/03_step1_materialItems.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ def create_mtrlPkg(moor):
8585

8686
# CONCEPT CATEGORY & NAME
8787
category = "ILIA" # ILIA | ILSA | SLIA | SLSA | hybrid
88-
conceptName = "3_ILIA_1P2C_grd_mini"
88+
conceptName = "3_ILIA_al[cr]_grd"
89+
8990
# FILE LOCATIONS
9091
filePath = os.path.dirname(os.path.abspath(__file__))
9192
inputFile = os.path.join(filePath, category, f"proj_{conceptName}.yaml")

famodel/installation/04_step2_actionItems.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Script to generate action items for transport, mobilization, and installation.
2+
loads material package saved in step1, loads vessel description, and creates action items for transport, mobilization, and installation.
33
44
Steps
55
-----
@@ -11,7 +11,7 @@
1111
None
1212
"""
1313

14-
'''loads material package saved in step1, loads vessel description, and creates action items for transport, mobilization, and installation.'''
14+
1515
import matplotlib.pyplot as plt
1616
import os
1717
from fadesign.conceptual.conceptDesign import ConceptDesign
@@ -22,7 +22,7 @@
2222
import yaml
2323
import networkx as nx
2424
import pickle
25-
import install_helpers as inst
25+
from . import install_helpers as inst
2626

2727

2828
# FILE LOCATIONS
@@ -55,6 +55,9 @@
5555
# Mobilization
5656
pkg = pkgs[0] # example
5757
mobilize_V1, vessel = inst.mobilizeM_actionItem(vessel, pkg)
58+
59+
# TODO: This seems like the same as vessel.mobilize? Are these two different approaches that are duplicates? How do we map this out?
60+
5861
print(vessel['state'])
5962
# Installation
6063
pkg = pkgs[0] # example
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
2-
Script to integrate all steps into a complete installation simulation.
2+
an example of how install manager is used to register a vessel and port, and schedule an event and run (not finished yet).
3+
This is independent of 04_step2_actionItems.py and 03_step1_materialItems.py
34
45
Steps
56
-----
@@ -11,28 +12,27 @@
1112
None
1213
"""
1314

14-
'''an example of how install manager is used to register a vessel and port, and schedule an event and run (not finished yet).'''
1515
# from fadesign.conceptual.installation.vessel import Vessel
1616
# from fadesign.conceptual.installation.port import Port
17-
from fadesign.installation.install_manager import InstallManager as IM
17+
from .install_manager import InstallManager as IM
1818
from pyproj import Proj, Transformer
1919
import pandas as pd
2020
import os
2121

2222
# FILE LOCATIONS
2323
filePath = os.path.dirname(os.path.abspath(__file__))
2424
vessel1_file = os.path.join(filePath, "ahts.yaml")
25-
port1_file = os.path.join(filePath, "port_of_humboldt.yaml")
25+
port1_file = os.path.join(filePath, "humboldt_bay.yaml")
2626

2727
# Initialize
2828
im = IM()
2929

3030
# Register Port
31-
im.registerPort()
31+
im.registerPort(port1_file)
3232
# Register Vessels
3333
im.registerVessel(vessel1_file)
3434

3535
# Register vessel mob activity
36-
im.scheduleEvent(im.now, im.vessels['ahts1'], action='mob', params={"portLocation": [0, 0]})
36+
im.scheduleEvent(im.now, im.vesselList['3gs'], action='mob', params={"portLocation": [0, 0]}) # TODO: how does this relate to 04? In 04 you create actions. Here you schedule events and it seems like the action is defined as a method of the class (not a separate object).
3737
# Register
3838
im.run()
576 KB
Binary file not shown.
1.69 MB
Binary file not shown.
2.58 KB
Binary file not shown.
1.23 KB
Binary file not shown.
11.1 MB
Binary file not shown.

0 commit comments

Comments
 (0)