diff --git a/spec/structure/parallel_structure.spec.ts b/spec/structure/parallel_structure.spec.ts index 414da7e10cecf2b9792ab7723ac99cd016f15829..a0119897ddb44f89f83da796b02f942e158625e3 100644 --- a/spec/structure/parallel_structure.spec.ts +++ b/spec/structure/parallel_structure.spec.ts @@ -134,5 +134,3 @@ describe("Class ParallelStructure: ", () => { }); }); }); - - diff --git a/spec/structure/structure_cem88v.spec.ts b/spec/structure/structure_cem88v.spec.ts index f450d2b56e155f0cf98ff14892d534ddb8d9d5b5..b0cc8d453192106d265906de8fcd1bc1ef5e9d41 100644 --- a/spec/structure/structure_cem88v.spec.ts +++ b/spec/structure/structure_cem88v.spec.ts @@ -63,7 +63,7 @@ describe("Class StructureWeirCem88v: ", () => { s.prms.Q.singleValue = 6; s.calculatedParam = s.prms.W; const res: Result = s.CalcSerie(); - expect(res.code).toBe(MessageCode.ERROR_DICHO_TARGET_TOO_HIGH) + expect(res.code).toBe(MessageCode.ERROR_DICHO_TARGET_TOO_HIGH); }); }); }); diff --git a/spec/value_ref/value_ref_variable.spec.ts b/spec/value_ref/value_ref_variable.spec.ts index 7f8ae2c62ae4bcc44de915009cfd1a26a92df20e..e04ae24cb05822378087806c3fd57579ad7229a2 100644 --- a/spec/value_ref/value_ref_variable.spec.ts +++ b/spec/value_ref/value_ref_variable.spec.ts @@ -1,5 +1,5 @@ -import { ParamValueMode, Session } from "../../src/index"; import { ConduiteDistrib, ConduiteDistribParams } from "../../src/cond_distri"; +import { ParamValueMode, Session } from "../../src/index"; import { Result } from "../../src/util/result"; /** diff --git a/spec/value_ref/value_ref_variable_result.spec.ts b/spec/value_ref/value_ref_variable_result.spec.ts index 8d6f7252407a566f37aa1c1050ee5dc3081baca7..c0124736b7d6d6e71ad499395e1dfb9b612f3880 100644 --- a/spec/value_ref/value_ref_variable_result.spec.ts +++ b/spec/value_ref/value_ref_variable_result.spec.ts @@ -1,6 +1,6 @@ import { ConduiteDistrib, ConduiteDistribParams } from "../../src/cond_distri"; -import { Result } from "../../src/util/result"; import { Session } from "../../src/index"; +import { Result } from "../../src/util/result"; /** * IMPORTANT ! diff --git a/src/pab/pab.ts b/src/pab/pab.ts index 2be8b0f1aa5f4b935d5f6831ab27b3622d5160f0..77259ba0440c07c9dd623a50fbebf1d01054dd5e 100644 --- a/src/pab/pab.ts +++ b/src/pab/pab.ts @@ -9,10 +9,10 @@ import { ParallelStructure } from "../structure/parallel_structure"; import { StructureTriangularTruncWeirFree } from "../structure/structure_triangular_trunc_weir"; import { Message, MessageCode } from "../util/message"; import { Result } from "../util/result"; +import { ResultElement } from "../util/resultelement"; import { CloisonAval, ParallelStructureParams } from "./cloison_aval"; import { Cloisons } from "./cloisons"; import { PabParams } from "./pab_params"; -import { ResultElement } from "../util/resultelement"; export { PabParams }; diff --git a/src/remous.ts b/src/remous.ts index 56f4744175a0bcb3af1cbed32921c24f282b4f43..5893351ccd8366d990f8a11a51c0b30d2a8595ea 100644 --- a/src/remous.ts +++ b/src/remous.ts @@ -590,7 +590,8 @@ export class CourbeRemous extends SectionNub { */ private Calc_dYdX(Y: number): Result { // L'appel à Calc('J') avec Y en paramètre réinitialise toutes les données dépendantes de la ligne d'eau - // return - (this.section.prms.If.v - this.Sn.CalcSection('J', Y)) / (1 - Math.pow(this.Sn.CalcSection('Fr', Y), 2)); + // return - (this.section.prms.If.v - this.Sn.CalcSection('J', Y)) + // / (1 - Math.pow(this.Sn.CalcSection('Fr', Y), 2)); const rJ = this.Sn.CalcSection("J", Y); if (!rJ.ok) { diff --git a/src/section/hauteur.ts b/src/section/hauteur.ts index c43869e406710279c3515a7d9e941a286e7b1199..2b3a8d41c79bf62473226111eaa9bfa15068ec07 100644 --- a/src/section/hauteur.ts +++ b/src/section/hauteur.ts @@ -183,7 +183,8 @@ export class cHautNormale extends acNewton { // L'initialisation a été faite lors de l'appel à CalcFn - // let Der = 2 / 3 * this.Sn.CalcSection("dR") * Math.pow(this.Sn.CalcSection("R"), -1 / 3) * this.Sn.CalcSection("S"); + // let Der = 2 / 3 * this.Sn.CalcSection("dR") * Math.pow(this.Sn.CalcSection("R"), -1 / 3) + // * this.Sn.CalcSection("S"); // tslint:disable-next-line:variable-name let Der = 2 / 3 * rDR.vCalc * Math.pow(rR.vCalc, -1 / 3) * rS.vCalc; diff --git a/src/section/section_parametree.ts b/src/section/section_parametree.ts index b23093de7fc245a6f66b9b318c1f65b2154b2e77..9a5afe2f55523f2fc6723e8da22e80e3afcda528 100644 --- a/src/section/section_parametree.ts +++ b/src/section/section_parametree.ts @@ -151,7 +151,8 @@ export class SectionParametree extends SectionNub { } // does nothing or else tests break !? - protected copySingleValuesToSandboxValues() { } + // tslint:disable-next-line:no-empty + protected copySingleValuesToSandboxValues() {} // tslint:disable-next-line:no-empty protected setParametersCalculability(): void {} diff --git a/src/session.ts b/src/session.ts index fedf49a7b5764843619bd501eb5357f3e271e573..fdaed2ed6dc928138a2fea1f798d015bcb306eb9 100644 --- a/src/session.ts +++ b/src/session.ts @@ -211,8 +211,7 @@ export class Session { let prms: any; switch (calcType) { - case CalculatorType.ConduiteDistributrice: - { + case CalculatorType.ConduiteDistributrice: { prms = new ConduiteDistribParams( 3, // débit Q 1.2, // diamètre D @@ -224,8 +223,7 @@ export class Session { break; } - case CalculatorType.LechaptCalmon: - { + case CalculatorType.LechaptCalmon: { prms = new LechaptCalmonParams( 3, // débit 1.2, // diamètre @@ -239,20 +237,17 @@ export class Session { break; } - case CalculatorType.SectionParametree: - { + case CalculatorType.SectionParametree: { nub = new SectionParametree(undefined, dbg); break; } - case CalculatorType.RegimeUniforme: - { + case CalculatorType.RegimeUniforme: { nub = new RegimeUniforme(undefined, dbg); break; } - case CalculatorType.CourbeRemous: - { + case CalculatorType.CourbeRemous: { prms = new CourbeRemousParams( 0.15, // Yamont = tirant amont 0.4, // Yaval = tirant aval @@ -263,8 +258,7 @@ export class Session { break; } - case CalculatorType.PabDimensions: - { + case CalculatorType.PabDimensions: { prms = new PabDimensionParams( 2, // Longueur L 1, // Largeur W @@ -275,8 +269,7 @@ export class Session { break; } - case CalculatorType.PabPuissance: - { + case CalculatorType.PabPuissance: { prms = new PabPuissanceParams( 0.3, // Chute entre bassins DH (m) 0.1, // Débit Q (m3/s) @@ -287,15 +280,13 @@ export class Session { break; } - case CalculatorType.Structure: - { + case CalculatorType.Structure: { const loiDebit: LoiDebit = params.getPropValue("loiDebit"); nub = CreateStructure(loiDebit, (parentNub as ParallelStructure)); break; } - case CalculatorType.ParallelStructure: - { + case CalculatorType.ParallelStructure: { prms = new ParallelStructureParams( 0.5, // Q 102, // Z1 @@ -305,8 +296,7 @@ export class Session { break; } - case CalculatorType.Dever: - { + case CalculatorType.Dever: { const deverPrms = new DeverParams( 0.5, // Q 102, // Z1 @@ -317,8 +307,7 @@ export class Session { break; } - case CalculatorType.Cloisons: - { + case CalculatorType.Cloisons: { nub = new Cloisons( new CloisonsParams( 1.5, // Débit total (m3/s) @@ -332,8 +321,7 @@ export class Session { break; } - case CalculatorType.MacroRugo: - { + case CalculatorType.MacroRugo: { nub = new MacroRugo( new MacrorugoParams( 12.5, // ZF1 @@ -352,8 +340,7 @@ export class Session { break; } - case CalculatorType.PabChute: - { + case CalculatorType.PabChute: { nub = new PabChute( new PabChuteParams( 2, // Z1 @@ -364,8 +351,7 @@ export class Session { break; } - case CalculatorType.PabNombre: - { + case CalculatorType.PabNombre: { nub = new PabNombre( new PabNombreParams( 6, // DHT @@ -376,8 +362,7 @@ export class Session { break; } - case CalculatorType.Section: - { + case CalculatorType.Section: { const nodeType: ComputeNodeType = params.getPropValue("nodeType"); nub = this.createSection(nodeType, dbg); break; @@ -393,8 +378,7 @@ export class Session { ); break; - case CalculatorType.CloisonAval: - { + case CalculatorType.CloisonAval: { prms = new ParallelStructureParams( 0.5, // Q 102, // Z1 @@ -404,8 +388,7 @@ export class Session { break; } - default: - { + default: { throw new Error( // tslint:disable-next-line:max-line-length `Session.createNub() : type de module '${CalculatorType[calcType]}' non pris en charge` @@ -480,8 +463,7 @@ export class Session { public createSection(nt: ComputeNodeType, dbg: boolean = false): acSection { switch (nt) { case ComputeNodeType.None: // pour les paramètres communs, n'importe quelle section convient - case ComputeNodeType.SectionTrapeze: - { + case ComputeNodeType.SectionTrapeze: { const prms = new ParamsSectionTrapez(2.5, // largeur de fond 0.56, // fruit 0.8, // tirant d'eau @@ -494,8 +476,7 @@ export class Session { return new cSnTrapez(prms, dbg); } - case ComputeNodeType.SectionRectangle: - { + case ComputeNodeType.SectionRectangle: { const prms = new ParamsSectionRectang(0.8, // tirant d'eau 2.5, // largeur de fond 40, // Ks=Strickler @@ -506,8 +487,7 @@ export class Session { return new cSnRectang(prms, dbg); } - case ComputeNodeType.SectionCercle: - { + case ComputeNodeType.SectionCercle: { const prms = new ParamsSectionCirc(2, // diamètre 0.8, // tirant d'eau 40, // Ks=Strickler @@ -518,8 +498,7 @@ export class Session { return new cSnCirc(prms, dbg); } - case ComputeNodeType.SectionPuissance: - { + case ComputeNodeType.SectionPuissance: { const prms = new ParamsSectionPuiss(0.5, // coefficient 0.8, // tirant d'eau 4, // largeur de berge diff --git a/src/structure/factory_structure.ts b/src/structure/factory_structure.ts index 342d7245761b7f53b46647d78f7ecd9951075d19..8ee6dfe466106e112a05d4194a7b19e884971862 100755 --- a/src/structure/factory_structure.ts +++ b/src/structure/factory_structure.ts @@ -16,10 +16,10 @@ import { StructureRectangularOrificeSubmerged } from "./structure_rectangular_or // tslint:disable-next-line:max-line-length import { StructureTriangularTruncWeirFree, TriangularTruncStructureParams } from "./structure_triangular_trunc_weir"; import { StructureTriangularWeir, TriangularStructureParams } from "./structure_triangular_weir"; +import { StructureVanLevLarinier, StructureVanLevParams, StructureVanLevVillemonte } from "./structure_vanlev"; import { StructureWeirFree } from "./structure_weir_free"; import { StructureWeirSubmergedLarinier } from "./structure_weir_submerged_larinier"; import { StructureWeirVillemonte } from "./structure_weir_villemonte"; -import { StructureVanLevParams, StructureVanLevVillemonte, StructureVanLevLarinier } from "./structure_vanlev"; export function CreateStructure(loiDebit: LoiDebit, parentNub?: ParallelStructure, dbg: boolean = false