-
Notifications
You must be signed in to change notification settings - Fork 22
Allow to lock ports in nodes #634
Copy link
Copy link
Labels
area:data-modelData models and structuresData models and structuresarea:servicesServices, helpers, utils and i18n ("logical" stuff)Services, helpers, utils and i18n ("logical" stuff)design-documentThis is the main document that a developer uses to implement a featureThis is the main document that a developer uses to implement a feature
Milestone
Description
Description
| Type | Size (weeks) |
|---|---|
| Enabler | 3 |
Meta issue: #551
Enabler for:
- Automatically re-order trainruns in nodes (crossings reduction) #635
- Manually re-order trainruns in nodes #636
- Automatically re-order trainruns in nodes (transition distance reduction) #637
The idea is to provide this data model evolution for Port.locked (boolean).
The second step is to make the existing ports sorting automated algorithm take the potential locked ports into account and order all the other ports of the network graphic while ignoring the already assigned places.
Acceptance Criteria
- New attribute:
Port.locked- Import / export take this new attribute into account
- Existing ports sorting algorithm ignores the already assigned ports
Implementation Plan
- Data model (Port model):
export interface PortDto {
id: number; // unique identifier
positionIndex: number; // position index starts at 0, ... for each PortAlignment group
positionAlignment: PortAlignment; // defines corresponding PortAlignment group within the node
trainrunSectionId: number; // reference to the connected trainrun section
locked: boolean; // !! NEW FIELD !! default value is false
} "nodes": [
{
"id": 128,
"betriebspunktName": "Lausanne",
"fullName": "Lausanne",
"positionX": -3072,
"positionY": 544,
"ports": [
{
"id": 1207,
"trainrunSectionId": 596,
"positionIndex": 0,
"positionAlignment": 2,
"locked": true
},- Update the existing algorithm to ignore all the already assigned
lockedports- some ideas (dunno if good or bad): filter the ports on
.lockedvalue and sort only the remaining ports ; or if port islocked, try shift the next ports etc.
- some ideas (dunno if good or bad): filter the ports on
- Update import / export method to take
Port.lockedinto account - Update copy / duplicate features to take
Port.lockedinto account - Update tests files (import -> export -> replace)
Definition of Ready
-
PO/UX-UI
- ACs are clear and have been reviewed by another refiner
-
Technical
- Implementation plan has been written and validated by another maintainer
-
General
- Validated by Adrian
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:data-modelData models and structuresData models and structuresarea:servicesServices, helpers, utils and i18n ("logical" stuff)Services, helpers, utils and i18n ("logical" stuff)design-documentThis is the main document that a developer uses to implement a featureThis is the main document that a developer uses to implement a feature