Skip to content

Fix bugs for large cases#34

Merged
Zetison merged 9 commits intomainfrom
fix/topo_axis_graphics
Nov 10, 2025
Merged

Fix bugs for large cases#34
Zetison merged 9 commits intomainfrom
fix/topo_axis_graphics

Conversation

@Zetison
Copy link
Collaborator

@Zetison Zetison commented Nov 9, 2025

This PR fixes a bug that made Nodes/Areas disappear when plotting too many objects (max z_level is 10000) and another bug for the square_intersection function that return strange behavior when Transmissions/Links-lines does not intersect with Areas/Nodes (which happens with a sufficiently large number of Modes or Resources, respectively.

Also enhanced the repo with the following

  • Use Float32 instead of Number/Real/Float64 for coordinate related computations in topo (also Point2f instead of Tuple and Vector).
  • Remove redundant notify_component function and Observables (use the @lift macro instead).
  • Improve performance of updates to ax_info.
  • Add missing tests for show-function on the types AbstractSystem and ProcInvData, and improve code structure.

@Zetison Zetison requested a review from dqpinel November 9, 2025 14:13
@Zetison Zetison self-assigned this Nov 9, 2025
@codecov-commenter
Copy link

codecov-commenter commented Nov 9, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 94.80519% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/utils_GUI/topo_axis_utils.jl 95.86% 5 Missing ⚠️
src/utils_GUI/info_axis_utils.jl 81.81% 4 Missing ⚠️
src/utils_gen/utils.jl 0.00% 3 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Files with missing lines Coverage Δ
src/datastructures.jl 92.79% <ø> (+2.70%) ⬆️
src/setup_GUI.jl 98.82% <100.00%> (+0.02%) ⬆️
src/setup_topology.jl 98.21% <100.00%> (-0.04%) ⬇️
src/utils_GUI/GUI_utils.jl 91.17% <100.00%> (-2.47%) ⬇️
src/utils_GUI/event_functions.jl 98.84% <ø> (-0.69%) ⬇️
src/utils_gen/structures_utils.jl 93.44% <100.00%> (+0.81%) ⬆️
src/utils_gen/topo_utils.jl 99.11% <100.00%> (+0.15%) ⬆️
src/utils_gen/utils.jl 84.90% <0.00%> (-2.00%) ⬇️
src/utils_GUI/info_axis_utils.jl 90.74% <81.81%> (ø)
src/utils_GUI/topo_axis_utils.jl 93.33% <95.86%> (-0.85%) ⬇️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

`θ`, and a square with half side lengths `Δ` centered at center `c`. If the line does not
intersect the square, the extension of the two facing sides to `x` will be used instead.
"""
function square_intersection(c::Point2f, x::Point2f, θ::Float32, Δ::Float32)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use e.g. LibGeos.intersects here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess you mean LibGEOS.intersection. I think one should investigate what performs best before incorporating another dependency. To use this function one would need to create new object to use this function, which probably requires some computational time. Moreover, it is not clear if it provides the required generality we want here (e.g., handling what happens if line misses square). Currently that package is not on v1.0 yet, so I suggest at least to wait for that to happen.

Copy link
Collaborator

@dqpinel dqpinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No specific comments on the code except maybe review posibility to use LibGeos intersect instead of defining it. Tested on my case and the issues are fixed.

@Zetison Zetison merged commit 2e14ac9 into main Nov 10, 2025
3 checks passed
@Zetison Zetison deleted the fix/topo_axis_graphics branch November 10, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants