Skip to content

Commit

Permalink
implimented partial left turn north south
Browse files Browse the repository at this point in the history
  • Loading branch information
geoyogesh committed Oct 4, 2020
1 parent 80f48cd commit 4470b6f
Show file tree
Hide file tree
Showing 5 changed files with 213 additions and 140 deletions.
Original file line number Diff line number Diff line change
@@ -1,130 +1,198 @@
<table class="no-border centered-child" [formGroup]="form">
<tr>
<td></td>
<td>
<table>
<tr>
<td><img src="assets/capx/south-left-turn.png" /></td>
<td><img src="assets/capx/south-thru.png" /></td>
<td><img src="assets/capx/south-right-turn.png" /></td>
<td><img src="assets/capx/south-u-turn.png" /></td>
</tr>
<tr>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_u}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_left}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_thru}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_right}}</div></td>
</tr>
<tr>
<td class="editable"><div><input type="number" min="0" max="9" value="1" formControlName="south_bound_left"></div></td>
<td class="editable"><div><input type="number" min="0" max="9" value="1" formControlName="south_bound_thru"></div></td>
<td colspan="2" class="editable"><div><input type="number" value="0" formControlName="south_bound_right"></div></td>
</tr>
</table>
</td>
<td></td>
</tr>
<tr>
<td>

<div>
<table class="config-table">
<div fxLayout="column" fxLayoutAlign="space-around center" fxLayoutGap="50px">
<table class="no-border centered-child" [formGroup]="form">
<tr>
<td>
<table>
<tr>
<td><img src="assets/capx/east-u-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_u}} <br/> PEPCH</div></td>
<td rowspan="2" class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_left"></div></td>
<td><img src="assets/capx/south-left-turn.png" /></td>
<td><img src="assets/capx/south-thru.png" /></td>
<td><img src="assets/capx/south-right-turn.png" /></td>
<td><img src="assets/capx/south-u-turn.png" /></td>
</tr>
<tr>
<td><img src="assets/capx/east-left-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_left}} <br/> PEPCH</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_right}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_thru}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_left}}</div></td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_u}}</div></td>
</tr>

<tr>
<td><img src="assets/capx/east-thru.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_thru}} <br/> PEPCH</div></td>
<td class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_thru"></div></td>
<td class="editable"><div><input type="number" min="0" max="9" value="1" formControlName="south_bound_right"></div></td>
<td class="editable"><div><input type="number" min="0" max="9" value="1" formControlName="south_bound_thru"></div></td>
<td class="editable"><div><input type="number" value="0" formControlName="south_bound_left"></div></td>
<td></td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="height: 100px;border: 0.05rem solid #e8e8e8;">
<div>
<table style="margin: 0 auto;">
<tr>
<td>Zone 1</td>
</tr>
<tr>
<td [ngStyle]="{'color': 'black', 'background-color': (capxStateService.getClvRangeColor((capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone1_north_clv))}">{{(capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone1_north_clv}}</td>
</tr>
</table>
</div>

</td>
<td>
<table>
<tr>
<td class="readonly">{{form.get('north_bound_thru').value}}</td>
</tr>
<tr>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.east_bound_left + (capxStateService.masterParameters$ | async)!.north_bound_thru}} <br/> PEPCH</td>
</tr>
<tr>
<td><img src="assets/capx/east-right-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_right}} <br/> PEPCH</div></td>
<td class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_right"></div></td>
<td><img src="assets/capx/north-thru.png" /></td>
</tr>
</table>
</div>
</td>
</tr>
</table>


<table class="no-border centered-child" [formGroup]="form">
<tr>
<td>

<div>
<table class="config-table">
<tr>
<td><img src="assets/capx/east-u-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_u}} <br/> PEPCH</div></td>
<td></td>
</tr>
<tr>
<td><img src="assets/capx/east-left-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_left}} <br/> PEPCH</div></td>
<td class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_left"></div></td>
</tr>

<tr>
<td><img src="assets/capx/east-thru.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_thru}} <br/> PEPCH</div></td>
<td class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_thru"></div></td>
</tr>

<tr>
<td><img src="assets/capx/east-right-turn.png" /></td>
<td class="readonly"><div class="east-rotation">{{(capxStateService.masterParameters$ | async)!.east_bound_right}} <br/> PEPCH</div></td>
<td class="editable"><div class="east-rotation"><input type="number" min="0" max="9" value="1" formControlName="east_bound_right"></div></td>
</tr>
</table>
</div>


</td>
<td style="width: 210px;border: 0.05rem solid #e8e8e8;">

<div>
<table style="margin: 0 auto;">
<tr>
<td>Zone 5</td>
</tr>
<tr>
<td [ngStyle]="{'color': 'black', 'background-color': (capxStateService.getClvRangeColor((capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone5_center_clv))}">{{(capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone5_center_clv}}</td>
</tr>
</table>
</div>

</td>
<td>
<div>
<table>
<tr>
<td class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_right"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_right}}</div></td>
<td><img src="assets/capx/west-right-turn.png" /></td>
</tr>
<tr>
<td class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_thru"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_thru}}</div></td>
<td><img src="assets/capx/west-thru.png" /></td>
</tr>

</td>
<td>
<tr>
<td class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_left"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_left}}</div></td>
<td><img src="assets/capx/west-left-turn.png" /></td>
</tr>

<div>
<table style="margin: 0 auto;">
<tr>
<td></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_u}}</div></td>
<td><img src="assets/capx/west-u-turn.png" /></td>
</tr>
</table>
</div>


</td>
</tr>
</table>


<table class="no-border centered-child" [formGroup]="form">
<tr>
<td>
<table>
<tr>
<td><img src="assets/capx/south-thru.png" /></td>
</tr>
<tr>
<td>Zone 5</td>
<td class="readonly"><div>PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.south_bound_thru + (capxStateService.masterParameters$ | async)!.west_bound_left}}</div></td>
</tr>
<tr>
<td [ngStyle]="{'color': 'black', 'background-color': (capxStateService.getClvRangeColor((capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone5_center_clv))}">{{(capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone5_center_clv}}</td>
<td class="readonly"><div>{{form.get('south_bound_thru').value}}</div></td>
</tr>
</table>
</div>
</td>
<td style="height: 100px;border: 0.05rem solid #e8e8e8;">

<div>
<table style="margin: 0 auto;">
<tr>
<td>Zone 2</td>
</tr>
<tr>
<td [ngStyle]="{'color': 'black', 'background-color': (capxStateService.getClvRangeColor((capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone2_south_clv))}">{{(capxStateService.state.get(junctions.PartialDisplacedLeftTurnIntersectionNorthSouth).intersectionResult | async).zone2_south_clv}}</td>
</tr>
</table>
</div>

</td>
</tr>
<tr>
<td></td>
<td>

</td>
<td>
<div>
<table>
<tr>
<td class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_right"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_right}}</div></td>
<td><img src="assets/capx/west-right-turn.png" /></td>
<td></td>
<td class="editable"><input type="number" min="0" max="9" value="1" formControlName="north_bound_left"></td>
<td class="editable"><input type="number" value="0" formControlName="north_bound_thru"></td>
<td class="editable"><input type="number" min="0" max="9" value="1" formControlName="north_bound_right"></td>
</tr>
<tr>
<td class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_thru"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_thru}}</div></td>
<td><img src="assets/capx/west-thru.png" /></td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_u}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_left}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_thru}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_right}} <br/> PEPCH</td>
</tr>

<tr>
<td rowspan="2" class="editable"><div class="west-rotation"><input type="number" min="0" max="9" value="1" formControlName="west_bound_left"></div></td>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_left}}</div></td>
<td><img src="assets/capx/west-left-turn.png" /></td>
</tr>

<tr>
<td class="readonly"><div class="west-rotation">PEPCH <br/> {{(capxStateService.masterParameters$ | async)!.west_bound_u}}</div></td>
<td><img src="assets/capx/west-u-turn.png" /></td>
<td><img src="assets/capx/north-u-turn.png" /></td>
<td><img src="assets/capx/north-left-turn.png" /></td>
<td><img src="assets/capx/north-thru.png" /></td>
<td><img src="assets/capx/north-right-turn.png" /></td>
</tr>
</table>
</div>


</td>
</tr>
<tr>
<td></td>
<td>

<table>
<tr>
<td colspan="2" class="editable"><input type="number" min="0" max="9" value="1" formControlName="north_bound_left"></td>
<td class="editable"><input type="number" value="0" formControlName="north_bound_thru"></td>
<td class="editable"><input type="number" min="0" max="9" value="1" formControlName="north_bound_right"></td>
</tr>
<tr>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_u}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_left}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_thru}} <br/> PEPCH</td>
<td class="readonly">{{(capxStateService.masterParameters$ | async)!.north_bound_right}} <br/> PEPCH</td>
</tr>
<tr>
<td><img src="assets/capx/north-u-turn.png" /></td>
<td><img src="assets/capx/north-left-turn.png" /></td>
<td><img src="assets/capx/north-thru.png" /></td>
<td><img src="assets/capx/north-right-turn.png" /></td>
</tr>
</table>


</td>
<td></td>
</tr>
</table>


</td>
</tr>
</table>
</div>
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@

<capx-critical-lane-volume-sum [vc]="vc$ | async" [clv]="clv$ | async"></capx-critical-lane-volume-sum>
<div fxLayout="column" fxLayoutAlign="space-around stretch" >
<div fxLayout="column" fxLayoutAlign="space-around stretch">
<div>
<clr-icon shape="angle left"></clr-icon><a [routerLink]="['/results']" class="p3 back-to-results-text">Back to Results</a> <span class="p2" style="margin-left: 25px;">{{title$ | async}}</span>
<clr-icon shape="angle left"></clr-icon><a [routerLink]="['/results']" class="p3 back-to-results-text">Back to
Results</a> <span class="p2" style="margin-left: 25px;">{{title$ | async}}</span>
</div>
<clr-tabs fxFlex>
<clr-tab>
<button clrTabLink>Design</button>
<clr-tab-content>
<div class="junction-content centered-parent">
<ng-template [cdkPortalOutlet]="(design$ | async)" class="centered-child"></ng-template>
</div>
</clr-tab-content>
<button clrTabLink>Configuration</button>
<clr-tab-content>
<div class="junction-content centered-parent">
<ng-template [cdkPortalOutlet]="(configuration$ | async)" class="centered-child"></ng-template>
</div>
</clr-tab-content>
</clr-tab>
<clr-tab>
<button clrTabLink>Configuration</button>
<clr-tab-content>
<div class="junction-content centered-parent">
<ng-template [cdkPortalOutlet]="(configuration$ | async)" class="centered-child"></ng-template>
</div>
</clr-tab-content>
<button clrTabLink>Design</button>
<clr-tab-content>
<div class="junction-content centered-parent">
<ng-template [cdkPortalOutlet]="(design$ | async)" class="centered-child"></ng-template>
</div>
</clr-tab-content>
</clr-tab>
</clr-tabs>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ export class JunctionComponent implements OnInit, OnDestroy {

if (junction.type === JunctionTypes.Intersection) {
this.vc$.next(junction.intersectionResult.value.all_vc);
this.clv$.next(junction.intersectionResult.value.zone5_center_vc);
this.clv$.next(junction.intersectionResult.value.all_clv);
junction.intersectionResult.subscribe(result => {
this.vc$.next(result.all_vc);
this.clv$.next(result.zone5_center_clv);
this.clv$.next(result.all_clv);
});
} else if (junction.type === JunctionTypes.Interchange) {
this.vc$.next(junction.interchangeResult.value.all_vc);
Expand Down
Loading

0 comments on commit 4470b6f

Please sign in to comment.