generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Initial load of OS permittable data (#1572)
Co-authored-by: Derek Roberts <[email protected]>
- Loading branch information
1 parent
0f08c8d
commit ab872b9
Showing
40 changed files
with
11,370 additions
and
2,256 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import { Policy } from 'onroute-policy-engine'; | ||
import { completePolicyConfig } from '../_test/policy-config/complete-in-progress.sample'; | ||
|
||
function start() { | ||
const policy: Policy = new Policy(completePolicyConfig); | ||
console.log(JSON.stringify(policy.policyDefinition)); | ||
/* | ||
console.log('***ALL COMMODITIES***'); | ||
const allCommodities = policy.getCommodities(); | ||
console.log( | ||
JSON.stringify(Array.from(allCommodities.entries()), null, ' '), | ||
); | ||
console.log('***COMMODITIES FOR STOS***'); | ||
const stosCommodities = policy.getCommodities('STOS'); | ||
console.log( | ||
JSON.stringify(Array.from(stosCommodities.entries()), null, ' '), | ||
); | ||
console.log('***POWER UNITS PERMITTABLE FOR STOS AND EMPTY COMMODITY***'); | ||
const puTypesEmpty = policy.getPermittablePowerUnitTypes('STOS', 'EMPTYXX'); | ||
console.log(JSON.stringify(Array.from(puTypesEmpty.entries()), null, ' ')); | ||
console.log( | ||
'***POWER UNITS PERMITTABLE FOR STOS AND BRIDGE BEAMS COMMODITY***', | ||
); | ||
const puTypesBridgeBeams = policy.getPermittablePowerUnitTypes( | ||
'STOS', | ||
'BRGBEAM', | ||
); | ||
console.log( | ||
JSON.stringify(Array.from(puTypesBridgeBeams.entries()), null, ' '), | ||
); | ||
console.log( | ||
'***PERMITTABLE NEXT VEHICLES WITH EMPTY CONFIGURATION, STOS AND EMPTY***', | ||
); | ||
const vehicleTypes1 = policy.getNextPermittableVehicles( | ||
'STOS', | ||
'EMPTYXX', | ||
[], | ||
); | ||
console.log(JSON.stringify(Array.from(vehicleTypes1.entries()), null, ' ')); | ||
console.log( | ||
'***PERMITTABLE NEXT VEHICLES WITH TRUCK TRACTOR AND JEEP, STOS AND EMPTY***', | ||
); | ||
const vehicleTypes2 = policy.getNextPermittableVehicles('STOS', 'EMPTYXX', [ | ||
'TRKTRAC', | ||
'JEEPSRG', | ||
]); | ||
console.log(JSON.stringify(Array.from(vehicleTypes2.entries()), null, ' ')); | ||
console.log( | ||
'***MAX SIZE FOR TRUCK TRACTOR, JEEP, HIBOEXP, STOS AND EMPTYXX***', | ||
); | ||
const sizeDimension = policy.getSizeDimension('STOS', 'EMPTYXX', ['TRKTRAC', 'JEEPSRG', 'HIBOEXP']); | ||
console.log(JSON.stringify(sizeDimension, null, ' ')); | ||
console.log( | ||
'***MAX SIZE FOR TRUCK TRACTOR, JEEP, HIBOEXP, STOS AND EMPTYXX IN PEACE***', | ||
); | ||
const sizeDimensionPeace = policy.getSizeDimension('STOS', 'EMPTYXX', ['TRKTRAC', 'JEEPSRG', 'HIBOEXP'], ['PCE']); | ||
console.log(JSON.stringify(sizeDimensionPeace, null, ' ')); | ||
console.log( | ||
'***MAX SIZE FOR TRUCK TRACTOR, JEEP, HIBOEXP, STOS AND EMPTYXX IN PEACE,BC DEFAULT***', | ||
); | ||
const sizeDimensionPeaceBC = policy.getSizeDimension('STOS', 'EMPTYXX', ['TRKTRAC', 'JEEPSRG', 'HIBOEXP'], ['PCE','BCD']); | ||
console.log(JSON.stringify(sizeDimensionPeaceBC, null, ' ')); | ||
*/ | ||
} | ||
|
||
start(); |
This file contains 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
Oops, something went wrong.