-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation of priority sectors #240
Conversation
// TODO: Should these be a part of protobuf? | ||
public int Priority { get; init; } = 0; | ||
public string? Discipline { get; init; } = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Protobuf is for everything you want to have working in the "Fast-Split resume" functionality, so this should possibly be there.
Should maybe consider "compressing" discipline to a reference object instead of repeating 10 different strings X1000 times. Edit: I think dotnet may handle string duplication augomagically for us, so may not be needed.
using System.Linq; | ||
using Newtonsoft.Json; | ||
|
||
public static class StidTagMapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave the StidTagMapper stuff to another PR, this needs to come in separately
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few TODO's left in comments. Not sure if they should be addressed now, removed or kept for future improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, i think 🤔 just some "highlight" => "prioritized" remaining
Maybe we should take a look a the CadRevealComposerRunner file, to see if some methods/code can be moved to a different file
CadRevealComposer/Operations/SectorSplitting/PrioritySplittingUtils.cs
Outdated
Show resolved
Hide resolved
CadRevealComposer.Tests/Operations/Splitting/PrioritySplittingUtilsTests.cs
Outdated
Show resolved
Hide resolved
CadRevealComposer/Operations/SectorSplitting/PrioritySectorSplitter.cs
Outdated
Show resolved
Hide resolved
CadRevealComposer/Operations/SectorSplitting/PrioritySectorSplitter.cs
Outdated
Show resolved
Hide resolved
CadRevealComposer/Operations/SectorSplitting/PrioritySectorSplitter.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
(Renamed stuff from "highlighting" to "priority" to make the functionality itself less specific.)
Creating of prioritized sectors and adding a table for "treeindex - priority sector" in the hierarchyDB.
Creation of sectors
Includes a custom splitter for priority sectors, which is simpler than the usual splitter. It also has an independent budget, making it possible to smaller sectors.
Budget might need some tweaking, but generally be as small as possible without creating too many sectors. Hence, dependent on how many parts are included in the "prioritized parts".
=> Including more disciplines, etc. also requires modifying the budget accordingly
HierarchyDB
The current solution breaks parallelization by needing to wait for both splitting and hierarchy before adding the new data. Adding the new data is luckily quite quick (~1 second on Troll A), so the total time is not noticably different. It's more a question of code quality and increased complexity..
Note: Some TODOs are still present and in progress.