Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jalhyd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Cassiopée
jalhyd
Commits
27e9dfe6
Commit
27e9dfe6
authored
5 years ago
by
mathias.chouet
Browse files
Options
Downloads
Patches
Plain Diff
Adapted cloison_aval to new currentResult system
parent
6edd007d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pab/cloison_aval.ts
+7
-3
7 additions, 3 deletions
src/pab/cloison_aval.ts
src/pab/pab.ts
+1
-0
1 addition, 0 deletions
src/pab/pab.ts
with
8 additions
and
3 deletions
src/pab/cloison_aval.ts
+
7
−
3
View file @
27e9dfe6
import
{
ParamCalculability
}
from
"
../param/param-definition
"
;
import
{
ParallelStructure
}
from
"
../structure/parallel_structure
"
;
import
{
loiAdmissiblesCloisonAval
,
LoiDebit
}
from
"
../structure/structure_props
"
;
import
{
StructureVanLevLarinier
,
StructureVanLevVillemonte
}
from
"
../structure/structure_vanlev
"
;
import
{
Message
,
MessageCode
}
from
"
../util/message
"
;
import
{
Result
}
from
"
../util/result
"
;
import
{
ParamCalculability
}
from
"
../param/param-definition
"
;
export
{
ParallelStructureParams
}
from
"
../structure/parallel_structure_params
"
;
...
...
@@ -30,12 +30,16 @@ export class CloisonAval extends ParallelStructure {
if
(
sVarCalc
!==
"
Z1
"
)
{
throw
new
Error
(
"
CloisonAval sVarCalc should be Z1
"
);
}
// if Calc() is called outside of CalcSerie(), _result might not be initialized
if
(
!
this
.
_result
)
{
this
.
initNewResultElement
();
}
this
.
checkVanneLevante
();
let
m
:
Message
;
if
(
this
.
hasVanneLevante
())
{
const
s
=
this
.
structures
[
this
.
indexVanneLevante
]
as
StructureVanLevVillemonte
|
StructureVanLevLarinier
;
this
.
prms
.
Z1
.
v
=
this
.
prms
.
Z2
.
v
+
s
.
getParameter
(
"
DH
"
).
v
;
this
.
_r
esult
=
this
.
CalcStructPrm
(
this
.
indexVanneLevante
,
"
ZDV
"
);
this
.
currentR
esult
=
this
.
CalcStructPrm
(
this
.
indexVanneLevante
,
"
ZDV
"
);
if
(
this
.
result
.
ok
)
{
// Suppression des extraResults : ils sont complétés plus bas pour chaque ouvrage
this
.
result
.
resultElement
.
extraResults
=
{};
...
...
@@ -52,7 +56,7 @@ export class CloisonAval extends ParallelStructure {
}
if
(
this
.
_result
===
undefined
||
this
.
_result
.
ok
)
{
// Calculation of Z1 with the new ZDV in case of existing vanne levante
this
.
_r
esult
=
super
.
Calc
(
"
Z1
"
,
rInit
);
this
.
currentR
esult
=
super
.
Calc
(
"
Z1
"
,
rInit
);
if
(
this
.
result
.
ok
)
{
this
.
getParameter
(
sVarCalc
).
v
=
this
.
result
.
vCalc
;
// Recalcul du débit total pour récupérer les résultats des ouvrages dans les résultats complémentaires
...
...
This diff is collapsed.
Click to expand it.
src/pab/pab.ts
+
1
−
0
View file @
27e9dfe6
...
...
@@ -4,6 +4,7 @@ import { ParamCalculability, ParamDefinition } from "../param/param-definition";
import
{
IParamDefinitionIterator
,
ParamsEquation
,
ParamsEquationArrayIterator
}
from
"
../param/params-equation
"
;
import
{
Props
}
from
"
../props
"
;
import
{
Session
}
from
"
../session
"
;
import
{
ParallelStructure
}
from
"
../structure/parallel_structure
"
;
import
{
StructureTriangularTruncWeirFree
}
from
"
../structure/structure_triangular_trunc_weir
"
;
import
{
Result
}
from
"
../util/result
"
;
import
{
CloisonAval
,
ParallelStructureParams
}
from
"
./cloison_aval
"
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment