Wombat

Latest version: v0.9.5

Safety actively analyzes 678576 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.8.1

- Fixes a bug where servicing equipment waiting for the next operational period at the end of a simulation get stuck in an infinite loop because the timeout is set for just prior to the end of the simulation, and not just after the end of the simulation's maximum run time.

0.8.0

Bug Fixes

- Most of the ` type: ignore` comments have been removed, or the past errors have been resolved
- Failure and maintenance logic in the `Cable` and `Subassembly` models have been wrapped in `if`/`else` blocks to ensure previously unreachable code still can't be reached under limited conditions
- Fixes a bug in where the mobilization duration is logged. Previously, the mobilization duration was logged upon completion, but now is logged while during the actual mobilizing, with costs still being logged upon completion.
- Fixes an uncommon error where repairs are made twice causing the simulation to fail. This was caused by a control mismatch in the unscheduled repair process, and was fixed by better tracking and controlling when a repair moves from "pending" (submitted), to "processing" (handed off to the servicing equipment for repair or to the port for a tow-to-port repair cycle), to "completed" (the repair is registered as complete). Additionally, the servicing equipment no longer relies on receiving the first repair from the repair manager on dispatch, and follows the same `get_next_request()` logic that will occur following the initial dispatch and repair.
- Fixes an error where a repair has `replacement=True` and `operation_reduction` < 1 both resets the `operating_level` back to 1 and readjusts for the `operation_reduction`, which can cause `operating_level` > 100%
- `ServiceEquipment.crew_transfer()` uses a while loop in place of an `if` with recursion strategy to handle unsafe transfer conditions to continuously wait until the next shift's available window.

Features

- Adds a `non_stop_shift` attribute to `ServiceEquipmentData`, `UnscheduledServiceEquipmentData`, `ScheduledServiceEquipmentData`, and `PortConfig` that is set in the post-initialization hook or through `DateLimitsMixin._set_environment_shift()` to ensure it is updated appropriately. Additionally, all checks for a 24 hour shift now check for the `non_stop_shift` attribute.
- `Metrics.emissions()` has been added to the list of available metrics to calculate the emissions from idling at port or sea, tranisiting, and maneuvering. Co-authored by and inspired by analysis work from hemezz.
- `Simulation` now accepts a `random_seed` or `random_generator` variable to seed the random number generators for Weibull failure timeouts and wait timing between event completions. Setting the `random_seed` to the same value from one simulation to the next will net the same results between different simulations, whereas the `random_generator` can be used to use the same generator for a batch of simulations.

General

- All `assert` statements are now only called when type checking is performed
- Replaces all `.get(lamda x: x == request)` with a 10x faster `.get(lambda x: x is request)` to more efficiently filter out the desired event to be removed from the repair manager and port repair management.
- `WombatEnvironment.weather` is now a Polars DataFrame to improve efficiency and indexing bottlenecks introduced in Pandas 2.0.
- All subassembly cable files are read in once, and stored in a dictionary to provide a modest speed up for the simulation initialization.

0.7.1

- Features
- `Metrics.process_times()` now includes the time_to_start, representing the time between when a request is submitted, and when the repairs officially start.
- Expand the acceptable date formats for the weather profiles to allow for year-first.

0.7.0

- Replace Flake8 and Pylint in the pre-commit workflow with ruff, and fix/ignore the resulting errors as appropriate
- Features:
- Weather data now has the ability to contain more than just the required "windspeed" and "waveheight" columns. This will allow for easier expansion of the weather model in the future, and increase compatibility with other NREL techno economic modeling frameworks.
- Bug fixes:
- Maintenance and failure simulation process interruptions were occuring prior to starting the process timing, and causing simulation failures.
- Duplicated parameters were being processed in `WombatEnvironment.log_action` stemming from improper handling of varying parameters in some of the more complex control flow logic in *in situ* repairs.
- Another edge case of negative delays during crew transfers where there is insufficient time remaining in the shift after account for weather, so the method was called recursively, but not exiting the original loop.
- `Port` management of *in situ* and tow-to-port capable tugboats wasn't properly accounting for tugboats of varying capabilities, and assuming all tugboats could do both. The vessel management and repair processing were out of sync causing duplicated turbine servicing/towing.
- `RepairManager` has consolidated the dispatching of servicing equipment to be the following categories instead of the previously complex logic:
- If a request is a tow-to-port category, have the port initiate the process
- If the dispatching thresholds are met, then have the port initiate a repair for port-based servicing equipment, otherwise the repair manager will dispatch the appropriate servicing equipment.
- `ServiceEquipment.weather_delay()` no longer silently processes a second weather delay.
- Intra-site travel is now correctly logging the distance and duration of traveling between systems at the site by moving the location setting logic out of `crew_transfer` method and being entirely maintained within, or next to, the `travel` method of `ServiceEquipment`.
- `RepairManager` now properly waits to dispatch servicing equipment until they are no longer under service from another servicing equipment unit.
- Servicing equipment are no longer simultaneously dispatched from both the `Port` and `RepairManager` causing simulations to potentially error out when the `System.servicing` or `Cable.servicing` statuses are overridden by the second-in-line servicing equipment. This was resolved by the port waiting for the turbine, a tugboat, and a spot at port to become available, then immediately halting the turbine, and starting the tow-in logic.
- Missing `ServiceEquipment.dispatched` status updates have been amended, so no matter the operation, a piece of servicing equipment should be set to `dispatched = True` until the crew is back and repair is completed.
- To avoid multiple dispatches to a single turbine, cable, or substation, or multiple dispatches of a single vessel/onsite equipment, a random timeout between 0 and 30 seconds (in simulation time) is processed, then a status double-checking occurs.
- `Metrics.process_times()` now includes the "N" column to indicate the number of processes that fall into each category.

0.6.2

- Warnings from Pandas `.groupby()` calls have been silenced by shifting the column filtering to before the groupby method call.
- Fixed the towing to port logging message, and subsequent `Metrics.number_of_tows()` search criteria to correctly calculate the number of tows in each direction.
- Fixes a bug in the crew transfer logic where the travel time back to port is longer than the weather delay itself, and a negative time delay is incorrectly attempted to be processed.

0.6.1

- A hot fix for the code comparison data not being found when installing from PyPI, which was caused by missing `__init__.py` files in the reconfigured library structure.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.