WIP: Evolutionary network design branch#1600
Draft
tahini wants to merge 115 commits into
Draft
Conversation
2a054d3 to
4028711
Compare
1221c70 to
d51a1d8
Compare
d51a1d8 to
5e6d988
Compare
This was referenced Jan 7, 2026
8bfa962 to
cac37ff
Compare
4013509 to
6e332e1
Compare
9dda198 to
100d441
Compare
e623079 to
9a493e6
Compare
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
8cc48d1 to
8f0171c
Compare
2b7bb4f to
c1f4dcf
Compare
The network design form now supports an optional node weight file (node UUID + weight columns) alongside the existing demand file. When provided, weights will be used to allocate vehicles to lines proportionally to total line weight and cycle time. - Add NodeWeightFromCsvMapper and field descriptors reusing the existing csvFile descriptor pattern (OdTripSimulationMethod) - Reorder simulation method options so file inputs render last - Show help text for nested/csvFile options in OptionsDescriptorWidgets - Handle node weight file upload and replay in TransitNetworkJobController Note: the line weighting process from node weights is not yet implemented.
Replace ExecutableJobComponent table with compact ButtonList/ButtonCell rows with action icons (cancel, pause/resume, edit, duplicate, delete) and expandable job details section. Add edit button that opens the 4-step form in read-only mode for existing jobs (disabled state derived from jobId presence). Fix disabled prop propagation in OptionsDescriptorWidgets for select, multiselect, nested, and CSV file option types.
Allow users to save the current network design form configuration (excluding CSV file data) to user preferences and reload it later. - Save config: persists form parameters to preferences via socket, stripping CSV file fields before storage - Load config: if form is untouched, applies saved config directly; if user has made changes, shows a conflict modal with options to replace all or only fill unchanged sections - Uses configVersion key to force step form remount on load, ensuring input widgets re-initialize with loaded values - Adds success/error notifications for both save and load operations
Load optional node weights from the job's CSV into a private map on the job wrapper, keeping them scoped to the job and out of the shared node collection. The GA now uses these weights (defaulting to 1) in the line weight formula: (sum of node weights) × cycle time. Path data is resolved from the wrapper's collection manager via path_ids rather than line.paths, fixing line weights returning null on jobs resumed from cache. Add a one-time line weights breakdown log at simulation start for debugging.
Export the weighted trip count (totalCount) and per-trip user cost (usersHourlyCost / totalCount) in the simulation results output file, making the GA's internal normalized fitness visible for analysis.
Replace raw JSON display in expanded job view with a structured generations table showing best candidate fitness, normalized fitness, line count and vehicle count per generation. Clicking a row opens a modal listing each line's assigned vehicles, cycle time and headway.
in node accessibility and network design, auto select mapping for lat and lon fields when easy to guess
show fitness, routed and non-routed count
and fix path ids not being saved between restart of jobs
no longer useful and would clutter the console logs during jobs
Add method fitness to compare with normalized fitness
Make no-route error log suppression opt-in via a new suppressExpectedRouteErrors parameter on Routing.calculate, so only the OdTripSimulation code path silences expected routing failures while all other callers retain full error logging. Rename TRROUTING_NOT_ROUTING_* error codes to TRROUTING_NO_ROUTING_* for consistency across the codebase. Add parametric tests covering suppression behaviour for expected and unexpected error codes.
Investigating why the memory explodes
The line objects are modified when fetching the schedules from the database. When saving the individual lines to the database, this means it keeps the schedules in memory even after the object is saved. It should be deleted after saving to avoid out of memory exceptions.
Pass the scenario when constructing next generation's candidates from elites such that the new scenario can be prepared using the previous' services.
The source explains where each candidate comes from: either and `elite` , `random`, `selected` from a single parent, the result of a `crossover` between multiple parents. The 2 latter can also be mutated. This information is added in the simulation result file, where the scenario name is for easier identification of the candidate names.
This reverts commit b8af814. The label received as props is often already translated by the calling components, translating it once again just puts a translation string in the main locale prefix. It breaks the previous behavior. The label received in params should already be translated. If not set, then we should fallback to a translated "Yes".
Show line-based logs ("Routing odTrip N/total", "calc/sec") on pipes/CI;
keep the interactive carriage-return progress bar when stdout is a TTY.
The new TrRoutingBatchLogger module exposes a BatchRoutingLogProgress
interface and a createBatchRoutingLogProgress factory that selects the
variant based on process.stdout.isTTY. Variant implementations are
module-private. TrRoutingBatch invokes beforeOdTrip/afterOdTrip in the
same scope (try/finally of the promise queue task) so both hooks evolve
together and afterOdTrip always runs even when odTripTask throws.
Made-with: Cursor
BatchRoutingLogProgressParams is reduced to { odTripsCount, startIndex }.
Each variant now captures its own performance.now() as benchmarkStart and
the non-interactive variant derives its own progressStep (1% of the batch,
capped at 500 trips between two log lines to avoid spam on huge batches).
The caller keeps its own benchmarkStart and progressStep for unrelated
concerns (final summary, progress emit cadence) but no longer needs to
share them with the logger. Tests use mockReturnValueOnce to set up time
mocks upfront and parametrize beforeOdTrip cases by odTripsCount, which
exercises the internal step policy (including the cap at 500).
This allows to keep some data in candidates during simulation and cleanup all candidates at the same time at the end of the generation's simulation. It will allow to save simulation results to file for the best candidates at the end of the job.
In the job's `getFiles` socket route, the return `title` is now of type `TranslatableMessage` where the `filename` is a parameter. To be able to support various output files not known in advance, and translate their titles correctly, instead of putting the file key as translation key, the file key is now a context, that can be used in individual translations instead of an object with each key. The default key can thus have a generic title, with the filename in it. The translation string is now `transit:jobs:<jobName>:files`, with params `filename` and `context`. The 'a' file of job named `b` can thus be translated with a `jobs:b:files_a` key in the `transit.json` file.
The file result visitor, instead of receiving only a job in parameter, now receives - a job, which represents where the files will be outputted, it does not have to be batch routing job - the batch routing parameter, these allow to define which files should be saved - a file suffix, which will be appended to the filename, so that a job like the evolutionary transit network design can save multiple job output files for multiple jobs.
For each candidate for which the scenario is saved at the end of the simulation, the results of the simulation jobs are also saved in the main job's file storage, so it is available through the job's data.
The `OdTripSimulation` should not save the executorof the job, because the object keeps some data in memory, like the odTrips, which may load the memory when many candidates need to be run. We save the job instead and simply recreate the executor when/if we need to handle the results.
155d2cb to
ec8cafe
Compare
With the ODTripSimulation, there is additional information in the results data about the number of transfers, walking/travel/waiting times, so these fields are added to the output file result.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feature branch for the evolutionary transit network design algorithm implementation.
Current status: It compiles!!!... 👯
TODO:
frontend:
Suivantsoit actif seulement si tout est valide. Tous les champs n'ont pas encore été validésbackend:
resourcesde la tâche. Hypothèse: race condition, manque un await en qq part.