Skip to content
Snippets Groups Projects
Commit 45bf6823 authored by Антон Кудряшов's avatar Антон Кудряшов
Browse files

- fixed exceptions

- added ascessors for wind 5
parent 0b292827
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ namespace WindStressPRM
/// once-in-5-years frequency wind module, m/s
/// модуль скорости ветра с повторяемостью один раз в 5 лет, м/с
/// </summary>
public double Wind5;
public double Wind5 { get; private set; }
/// <summary>
/// once-in-10-years frequency wind module, m/s
/// модуль скорости ветра с повторяемостью один раз в 10 лет, м/с
......@@ -77,19 +77,19 @@ namespace WindStressPRM
// ветер по модулю не должен превышать 70м/с
if (w5 < 0 || w5 > 70)
{
throw new System.ArgumentOutOfRangeException("w5", w5, "Expected 0=<w5<70");
throw new System.ArgumentOutOfRangeException("w5", w5, "Expected 0=<w5<=70");
}
if (w10 < 0 || w10 > 70)
{
throw new System.ArgumentOutOfRangeException("w10", w10, "Expected 0=<w10<70");
throw new System.ArgumentOutOfRangeException("w10", w10, "Expected 0=<w10<=70");
}
if (w15 < 0 || w15 > 70)
{
throw new System.ArgumentOutOfRangeException("w15", w15, "Expected 0=<w15<70");
throw new System.ArgumentOutOfRangeException("w15", w15, "Expected 0=<w15<=70");
}
if (w25 < 0 || w25 > 70)
{
throw new System.ArgumentOutOfRangeException("w25", w25, "Expected 0=<w25<70");
throw new System.ArgumentOutOfRangeException("w25", w25, "Expected 0=<w25<=70");
}
}
}
......
......@@ -78,7 +78,7 @@ namespace WindStressPRM
/// asigned powerlines list
/// список оканчивающихся/начинающихся на подстанции ЛЭП
/// </summary>
public IList<Powerline> LineList { get; set; }
public List<Powerline> LineList { get; private set; }
/// <summary>
/// designated constructor
/// </summary>
......
......@@ -35,7 +35,7 @@ namespace WindStressPRM
/// Line vertices coordinate list
/// список координат вершин ЛЭП как линейного объекта
/// </summary>
public IList<Coordinate> Coordinates { get; set; }
public List<Coordinate> Coordinates { get; set; }
/// <summary>
/// assigned powerstation/pole
/// идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)
......@@ -66,7 +66,7 @@ namespace WindStressPRM
/// <param name="voltage"> voltage class kV for switches, Напряжение ЛЭП, кВ</param>
/// <param name="toID"> assigned powerstation/pole/идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)</param>
/// <param name="fromID"> assigned powerstation/pole/идентификатор соответсвующего конца/начала линии (столб, трансформаторная подстанция, понижающая подстанция)</param>
public Powerline(IList<Coordinate> coordinates, int id, int year, double height, int voltage, int toID, int fromID)
public Powerline(List<Coordinate> coordinates, int id, int year, double height, int voltage, int toID, int fromID)
{
this.Coordinates = coordinates;
this.Identifier = id;
......@@ -87,7 +87,7 @@ namespace WindStressPRM
{
if (Identifier < 0)
{
throw new System.ArgumentOutOfRangeException("Identifier", Identifier, "Expected >0");
throw new System.ArgumentOutOfRangeException("Identifier", Identifier, "Expected >=0");
}
if (Year > 2050 || Year < 1900)
{
......@@ -103,11 +103,11 @@ namespace WindStressPRM
}
if (PointFromID < 0)
{
throw new System.ArgumentOutOfRangeException("PointFromID", PointFromID, "Expected >0");
throw new System.ArgumentOutOfRangeException("PointFromID", PointFromID, "Expected >=0");
}
if (PointToID < 0)
{
throw new System.ArgumentOutOfRangeException("PointToID", PointToID, "Expected >0");
throw new System.ArgumentOutOfRangeException("PointToID", PointToID, "Expected >=0");
}
}
}
......
......@@ -13,12 +13,12 @@ namespace WindStressPRM
/// Outer index
/// Внешний индекс
/// </summary>
public int Row { get; set; }
public int Row { get; private set; }
/// <summary>
/// Inner index
/// Внутренний индекс
/// </summary>
public int Col { get; set; }
public int Col { get; private set; }
/// <summary>
/// designated constructor
/// </summary>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment