Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MES_Wind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Debolskiy Andrey
MES_Wind
Commits
c5d0adfc
Commit
c5d0adfc
authored
8 years ago
by
Антон Кудряшов
Browse files
Options
Downloads
Patches
Plain Diff
- minor changes
- iList public using
parent
5fd1ba2a
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
MES_Wind/frmMain.cs
+3
-8
3 additions, 8 deletions
MES_Wind/frmMain.cs
WindStressPRM/WindStressPRM.cs
+8
-6
8 additions, 6 deletions
WindStressPRM/WindStressPRM.cs
with
11 additions
and
14 deletions
MES_Wind/frmMain.cs
+
3
−
8
View file @
c5d0adfc
...
@@ -19,13 +19,9 @@ namespace MES_Wind
...
@@ -19,13 +19,9 @@ namespace MES_Wind
{
{
[
Export
(
"Shell"
,
typeof
(
ContainerControl
))]
[
Export
(
"Shell"
,
typeof
(
ContainerControl
))]
private
static
ContainerControl
Shell
;
private
static
ContainerControl
Shell
;
#
region
"Control variables"
double
distThreshold
=
500
;
#
endregion
public
frmMain
()
public
frmMain
()
{
{
InitializeComponent
();
InitializeComponent
();
if
(
DesignMode
)
return
;
if
(
DesignMode
)
return
;
Shell
=
this
;
Shell
=
this
;
...
@@ -67,7 +63,6 @@ namespace MES_Wind
...
@@ -67,7 +63,6 @@ namespace MES_Wind
public
IFeatureSet
brokenpoints
(
List
<
CheckPoint
>
chklist
)
public
IFeatureSet
brokenpoints
(
List
<
CheckPoint
>
chklist
)
{
{
IFeatureSet
points
=
new
FeatureSet
(
FeatureType
.
Point
);
IFeatureSet
points
=
new
FeatureSet
(
FeatureType
.
Point
);
Coordinate
chkcords
=
new
Coordinate
();
return
points
;
return
points
;
}
}
...
@@ -171,7 +166,7 @@ namespace MES_Wind
...
@@ -171,7 +166,7 @@ namespace MES_Wind
Coordinate
dummyCellCoords
=
clim15RasterLayer
.
Bounds
.
CellCenter_ToProj
(
i
,
j
);
Coordinate
dummyCellCoords
=
clim15RasterLayer
.
Bounds
.
CellCenter_ToProj
(
i
,
j
);
WindStressPRM
.
Coordinate
dummyClimCoords
=
new
WindStressPRM
.
Coordinate
(
dummyCellCoords
.
X
,
dummyCellCoords
.
Y
);
WindStressPRM
.
Coordinate
dummyClimCoords
=
new
WindStressPRM
.
Coordinate
(
dummyCellCoords
.
X
,
dummyCellCoords
.
Y
);
//add or substruct in range 0 - 27 to change what lines will be broken
//add or substruct in range 0 - 27 to change what lines will be broken
double
clim5
=
j
;
//
clim5RasterLayer.DataSet.Value[i, j];
double
clim5
=
clim5RasterLayer
.
DataSet
.
Value
[
i
,
j
];
double
clim10
=
clim10RasterLayer
.
DataSet
.
Value
[
i
,
j
]
-
10
;
double
clim10
=
clim10RasterLayer
.
DataSet
.
Value
[
i
,
j
]
-
10
;
double
clim15
=
clim15RasterLayer
.
DataSet
.
Value
[
i
,
j
];
double
clim15
=
clim15RasterLayer
.
DataSet
.
Value
[
i
,
j
];
if
(
Math
.
Abs
(
clim5
-
RasterMissingValue
)
<
eps
)
if
(
Math
.
Abs
(
clim5
-
RasterMissingValue
)
<
eps
)
...
...
This diff is collapsed.
Click to expand it.
WindStressPRM/WindStressPRM.cs
+
8
−
6
View file @
c5d0adfc
...
@@ -258,7 +258,7 @@ namespace WindStressPRM
...
@@ -258,7 +258,7 @@ namespace WindStressPRM
/// Line vertices coordinate list
/// Line vertices coordinate list
/// список координат вершин ЛЭП как линейного объекта
/// список координат вершин ЛЭП как линейного объекта
/// </summary>
/// </summary>
public
List
<
Coordinate
>
Coordinates
{
get
;
set
;
}
public
I
List
<
Coordinate
>
Coordinates
{
get
;
set
;
}
/// <summary>
/// <summary>
/// assigned powerstation/pole
/// assigned powerstation/pole
/// идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)
/// идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)
...
@@ -296,7 +296,7 @@ namespace WindStressPRM
...
@@ -296,7 +296,7 @@ namespace WindStressPRM
/// <param name="ison"></param>
/// <param name="ison"></param>
/// <param name="toID"></param>
/// <param name="toID"></param>
/// <param name="fromID"></param>
/// <param name="fromID"></param>
public
Powerline
(
List
<
Coordinate
>
coordinates
,
int
id
,
int
year
,
double
height
,
int
power
,
int
toID
,
int
fromID
)
public
Powerline
(
I
List
<
Coordinate
>
coordinates
,
int
id
,
int
year
,
double
height
,
int
power
,
int
toID
,
int
fromID
)
{
{
this
.
Coordinates
=
coordinates
;
this
.
Coordinates
=
coordinates
;
this
.
Identifier
=
id
;
this
.
Identifier
=
id
;
...
@@ -376,7 +376,7 @@ namespace WindStressPRM
...
@@ -376,7 +376,7 @@ namespace WindStressPRM
/// asigned powerlines list
/// asigned powerlines list
/// список оканчивающихся/начинающихся на подстанции ЛЭП
/// список оканчивающихся/начинающихся на подстанции ЛЭП
/// </summary>
/// </summary>
public
List
<
Powerline
>
LineList
{
get
;
set
;
}
public
I
List
<
Powerline
>
LineList
{
get
;
set
;
}
public
PowerStation
()
public
PowerStation
()
{
{
//default constructor
//default constructor
...
@@ -630,7 +630,7 @@ namespace WindStressPRM
...
@@ -630,7 +630,7 @@ namespace WindStressPRM
foreach
(
Powerline
powerCurve
in
Input
.
PowerLines
)
foreach
(
Powerline
powerCurve
in
Input
.
PowerLines
)
{
{
// get coordinates list
// get coordinates list
List
<
Coordinate
>
points
=
powerCurve
.
Coordinates
;
I
List
<
Coordinate
>
points
=
powerCurve
.
Coordinates
;
List
<
bool
>
checkList
=
new
List
<
bool
>();
List
<
bool
>
checkList
=
new
List
<
bool
>();
// cycle throw all points in line
// cycle throw all points in line
...
@@ -744,14 +744,16 @@ namespace WindStressPRM
...
@@ -744,14 +744,16 @@ namespace WindStressPRM
// here line is broken
// here line is broken
res
=
true
;
res
=
true
;
}
}
}
}
checkbool
.
Add
(
res
);
checkbool
.
Add
(
res
);
}
}
bool
result
=
false
;
bool
result
=
false
;
foreach
(
bool
lastcheck
in
checkbool
)
foreach
(
bool
lastcheck
in
checkbool
)
{
{
if
(
lastcheck
==
true
)
{
result
=
true
;
}
if
(
lastcheck
==
true
)
{
result
=
true
;
}
}
}
return
result
;
return
result
;
}
}
...
...
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