Project Configuration and Management - ORBIT.manager
- class ORBIT.manager.ProjectManager(config, library_path=None, weather=None)
Base Project Manager Class.
- property start_date
Return start date for the analysis. If weather is configured, the first date in the weather profile is used. If weather is not configured, an arbitary start date is assumed and used to index phase times.
- run(**kwargs)
Main project run method.
- Parameters:
self.config[‘design_phases’] (list) – Defines which design phases are ran. These phases are ran before install phases and merge the result of the design into self.config.
self.config[‘install_phases’] (list | dict) – Defines which installation phases are ran.
If
self.config['install_phases']
is a list, phases are ran sequentially usingself.run_multiple_phases_in_serial()
.If
self.config['install_phases']
is a dict, phases are ran usingself.run_multiple_phases_overlapping()
. The expected format for the dictionary is{'phase_name': '%m/%d/%Y'}
.
- property phases
Returns dict of phases that have been ran.
- classmethod register_design_phase(phase)
Add a custom design phase to the ProjectManager class.
- Parameters:
phase (ORBIT.phases.DesignPhase)
- classmethod register_install_phase(phase)
Add a custom install phase to the ProjectManager class.
- Parameters:
phase (ORBIT.phases.InstallPhase)
- property project_params
Returns defined project parameters, if found.
- classmethod compile_input_dict(phases)
Returns a compiled input dictionary given a list of phases to run.
- Parameters:
phases (list) – A collection of offshore design or installation phases.
- resolve_project_capacity()
Resolves the relationship between ‘project_capacity’, ‘num_turbines’ and ‘turbine_rating’ and verifies that input and calculated values match. Adds missing values that can be calculated to the ‘self.config’.
- classmethod find_key_match(target)
Searches cls.phase_dict() for a key that matches text in ‘target’.
- Parameters:
target (str) – Phase name to search for a match with.
- Returns:
phase_class – Matched module class or None if no match is found.
- Return type:
BasePhase | None
- classmethod phase_dict()
Returns dictionary of all phases with format {‘name’: ‘class’}.
- classmethod merge_dicts(left, right, overwrite=True, add_keys=True)
Merges two dicts (right into left) with an option to add keys of right.
- Parameters:
left (dict)
right (dict)
add_keys (bool)
- Returns:
new – Merged dictionary.
- Return type:
dict
- classmethod remove_keys(left, right)
Recursively removes keys from left that are found in right.
- Parameters:
left (dict)
right (dict)
- Returns:
new – Left dictionary with keys of right removed.
- Return type:
dict
- create_config_for_phase(phase)
Produces a configuration input dictionary for ‘phase’.
This method will pick the most specific definition of each parameter. For example, if self.master_config[‘site’][‘distance’] and self.config[‘PhaseName’][‘site’][‘distance’] are both defined, the latter will be chosen as it is more specific. This allows for phase specific definitions, eg. distance to port dependent on phase.
- Parameters:
phase (str) – Name of phase. Phase specific information will be pulled from self.config[‘PhaseName’] if this key exists.
- Returns:
phase_config – Configuration dictionary with phase specific information merged in.
- Return type:
dict
- property phase_ends
Calculates hte end date for all phases.
- run_install_phase(name, start, **kwargs)
Compiles the phase specific configuration input dictionary for input ‘name’, checks the input against _class.expected_config and runs the phase calculations with ‘phase.run()’.
- Parameters:
name (str) – Phase to run.
weather (None | np.ndarray)
- Returns:
time (int | float) – Total phase time.
logs (list) – List of phase logs.
- get_phase_class(phase)
Returns the class object for input ‘phase’.
- Parameters:
phase (str) – Name of phase. Must match a class name in either ‘self._install_phases’ or ‘self._design_phases’.
- Returns:
phase_class – Class of base type Phase that represents input ‘phase’.
- Return type:
Phase
- run_all_design_phases(phase_list, **kwargs)
Runs the design phases and adds ‘.design_result’ to self.config.
- run_design_phase(name, **kwargs)
Runs a design phase defined by ‘name’ and merges the ‘.design_result’ into self.config.
- Parameters:
name (str) – Name of design phase that partially matches a key in phase_dict.
- run_multiple_phases_in_serial(phase_list, **kwargs)
Runs multiple phases listed in self.config[‘install_phases’] in serial.
- Parameters:
phase_list (list) – List of installation phases to run.
- run_multiple_phases_overlapping(phases, **kwargs)
Runs multiple phases overlapping using a mixture of dates, indices or dependencies.
- Parameters:
phases (dict) – Dictionary of phases to run.
- run_dependent_phases(_phases, zero, **kwargs)
Runs remaining phases that depend on other phase times.
- Parameters:
_phases (dict) – Dictionary of phases to run.
zero (int | float) – Zero time for the simulation. Used to aggregate total logs.
- get_dependency_start_time(target, perc)
Returns start time based on the perc complete of target phase.
- Parameters:
target (str) – Phase that start time is dependent on.
perc (int | float) – Percentage of the target phase completion time. 0: starts at the same time. 1: starts when target phase is completed.
- static transform_weather_input(weather)
Checks that an input weather profile matches the required format and converts the index to a datetime index if necessary.
- Parameters:
weather (pd.DataFrame)
- get_weather_profile(start)
Pulls weather profile from ‘self.weather’ starting at ‘start’, raising any errors if needed.
- Parameters:
start (datetime) – Starting index for output weather profile.
- Returns:
profile – Weather profile with first index at ‘start’.
- Return type:
np.ndarray.
- outputs(include_logs=False, npv_detailed=False)
Returns dict of all available outputs.
- property capacity
Returns project capacity in MW.
- property num_turbines
Returns number of turbines in the project.
- property turbine_rating
Returns turbine rating in MW.
- property logs
Returns list of all logs in the project.
- property project_time
Returns total project time as the time of the last log.
- property month_bins
Returns bins representing project months.
- property monthly_expenses
Returns the monthly expenses of the project from development through construction.
- property monthly_opex
Returns the monthly OpEx expenditures based on project size.
- property monthly_revenue
Returns the monthly revenue based on when array system strings can be energized, eg. ‘self.progress.energize_points’.
- property cash_flow
Returns the net cash flow based on self.monthly_expenses and self.monthly_revenue.
- property npv
Returns the net present value of the project based on self.cash_flow.
- property progress_logs
Returns logs of progress points.
- property progress_summary
Returns a summary of progress by month.
- property actions
Returns list of all actions in the project.
- static create_input_xlsx()
A wrapper around self.compile_input_dict that produces an excel input file instead of a .json file.
- property phase_dates
Returns a combination of phase start dates and timing.
- property installation_time
Returns sum of installation module times. This does not consider overlaps if phase dates are supplied.
- property project_days
Returns days elapsed during installation phases accounting for overlapping phases.
- property overnight_capex_per_kw
Returns overnight CAPEX/kW.
- property system_capex
Returns total system procurement CapEx.
- property system_capex_per_kw
Returns system CapEx/kW.
- property installation_capex
Returns total installation related CapEx.
- property installation_capex_per_kw
Returns installation CapEx/kW.
- property capex_breakdown
Returns CapEx breakdown by category.
- property capex_breakdown_per_kw
Returns CapEx per kW breakdown by category.
- property bos_capex
Returns total balance of system CapEx.
- property bos_capex_per_kw
Returns balance of system CapEx/kW.
- property turbine_capex
Returns the total turbine CAPEX.
- property turbine_capex_per_kw
Returns the turbine CapEx/kW.
- property overnight_capex
Returns the overnight capital cost of the project.
- property soft_capex
Returns total project cost costs.
- property soft_capex_per_kw
Returns project soft costs per kW. Default numbers are based on the Cost of Energy Review (Stehly and Beiter 2018).
- property project_capex
Returns project related CapEx line items. To override the defaults, the keys below should be passed to the ‘project_parameters’ subdict.
- property project_capex_per_kw
Returns project related CapEx per kW.
- property total_capex
Returns total project CapEx including soft costs.
- property total_capex_per_kw
Returns total CapEx/kW.
- export_configuration(file_name)
Exports the configuration settings for the project to library_path/project/config/file_name.yaml.
- Parameters:
file_name (str) – Name to use for the file.
- export_project_logs(filepath, level='ACTION')
Exports the project logs to a .csv file.
- Parameters:
filepath (str) – Filepath to save logs at.
level (str, optional) – Log level to save. Options: ‘ACTION’ | ‘DEBUG’ Default: ‘ACTION’