Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: flownet
Type: Package
Title: Transport Modeling: Network Processing, Route Enumeration, and Traffic Assignment
Version: 0.2.1
Version: 0.2.1.9000
Authors@R: c(person("Sebastian", "Krantz", email = "sebastian.krantz@graduateinstitute.ch", role = c("aut", "cre")),
person("Kamol", "Roy", role = "ctb"))
Description: High-performance tools for transport modeling - network processing, route
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ importFrom(collapse,ckmatch)
importFrom(collapse,collap)
importFrom(collapse,colorder)
importFrom(collapse,colorderv)
importFrom(collapse,copyv)
importFrom(collapse,dapply)
importFrom(collapse,descr)
importFrom(collapse,fduplicated)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# flownet 0.2.1.9000

- Fixed issue in `consolidate_graph()` which used to modify columns (`from` and `to` in-place). Users in older versions are advised to input a `data.table::copy()` of the graph to retain it.

# flownet 0.2.1

- `angle.max` constraint in `run_assignment()` is now two-sided (angle measured from origin and destination node against the straight line between them), rather than just one-sided (from origin). Also, the implementation is slightly more efficient.
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ normalize_graph <- function(graph_df) {
#' c(original = nrow(graph), consolidated = nrow(graph_cons))
#'
#' @export
#' @importFrom collapse fnrow get_vars anyv setv ss seq_row fduplicated fmatch whichv whichNA allNA ffirst GRP collap %iin% %!in% %!iin% join colorderv funique.default %!=% %==% missing_cases qtab varying radixorderv groupv na_rm
#' @importFrom collapse fnrow get_vars anyv setv copyv ss seq_row fduplicated fmatch whichv whichNA allNA ffirst GRP collap %iin% %!in% %!iin% join colorderv funique.default %!=% %==% missing_cases qtab varying radixorderv groupv na_rm
#' @importFrom kit countOccur
#' @importFrom stats setNames
consolidate_graph <- function(graph_df, directed = FALSE,
Expand Down Expand Up @@ -541,7 +541,7 @@ consolidate_graph_core <- function(graph_df, directed = FALSE,
reci, nam_keep, verbose = TRUE) {

keep <- seq_row(graph_df) # Global variable tracking utilized edges
gft <- get_vars(graph_df, c("from", "to", by)) |> unclass() # Local variable representing the current graph worked on
gft <- get_vars(graph_df, c("from", "to", by)) |> unclass() |> copyv(NA, NA) # Local variable representing the current graph worked on

if(length(by)) {
by_id <- groupv(get_vars(graph_df, by))
Expand Down