fpowerkit 0.0.9__tar.gz → 0.0.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fpowerkit
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A Distflow PDN solver based on Gurobi.
5
5
  Author: fmy_xfk
6
6
  Classifier: Programming Language :: Python :: 3
@@ -53,6 +53,6 @@ B0->B1->B2
53
53
  ## 配电网文件格式
54
54
  目前,我们提供了2种方式记录配电网的结构和负荷信息,分别为ZIP格式和XML格式,我们推荐使用XML格式记录数据,因为其更加灵活。以下是两种方式的说明链接:
55
55
 
56
- [ZIP格式](docs/zip_file.md)
57
-
58
56
  [XML格式](docs/xml_file.md) (推荐!)
57
+
58
+ [ZIP格式](docs/zip_file.md)
@@ -39,6 +39,6 @@ B0->B1->B2
39
39
  ## 配电网文件格式
40
40
  目前,我们提供了2种方式记录配电网的结构和负荷信息,分别为ZIP格式和XML格式,我们推荐使用XML格式记录数据,因为其更加灵活。以下是两种方式的说明链接:
41
41
 
42
- [ZIP格式](docs/zip_file.md)
42
+ [XML格式](docs/xml_file.md) (推荐!)
43
43
 
44
- [XML格式](docs/xml_file.md) (推荐!)
44
+ [ZIP格式](docs/zip_file.md)
@@ -251,7 +251,7 @@ _IEEE69_LINE = [
251
251
 
252
252
  _DEFAULT_GEN_POS = [1,2,3,6,8]
253
253
 
254
- _DEFAULT_GENERATOR = GeneratorModel(0, 1, -1, 1, 0.0001, 0.3, 10)
254
+ _DEFAULT_GENERATOR = GeneratorModel(0, 30, -30, 30, 0.0001, 0.3, 10)
255
255
 
256
256
  def _create_load(s:float, scales:'list[tuple[int, float]]'):
257
257
  return SegFunc([(p[0],p[1]*s) for p in scales])
@@ -588,23 +588,25 @@ class Grid:
588
588
  fixed = rt.attrib.get("fixed-load","") == "true"
589
589
  except:
590
590
  raise ValueError("Invalid grid-repeat or load-repeat or fixed-load")
591
- from .cases import _get_buses, _get_lines, _DEFAULT_LOAD_SCALE
591
+ from .cases import _get_buses, _get_lines, _get_gens, _DEFAULT_LOAD_SCALE, _DEFAULT_GENERATOR, _DEFAULT_GEN_POS
592
592
  if bm.lower() == "ieee33":
593
593
  from .cases import _IEEE33_LOAD, _IEEE33_LINE
594
594
  buses:list[Bus] = _get_buses(Sb * 1000, grpt, _IEEE33_LOAD, not fixed, _DEFAULT_LOAD_SCALE, lrpt, 86400)
595
595
  lines:list[Line] = _get_lines(Ub * Ub / Sb, _IEEE33_LINE, grpt)
596
+ gens:list[Generator] = _get_gens(_DEFAULT_GENERATOR, _DEFAULT_GEN_POS, grpt)
596
597
  elif bm.lower() == "ieee69":
597
598
  from .cases import _IEEE69_LOAD, _IEEE69_LINE
598
599
  buses:list[Bus] = _get_buses(Sb * 1000, grpt, _IEEE69_LOAD, not fixed, _DEFAULT_LOAD_SCALE, lrpt, 86400)
599
600
  lines:list[Line] = _get_lines(Ub * Ub / Sb, _IEEE69_LINE, grpt)
601
+ gens:list[Generator] = _get_gens(_DEFAULT_GENERATOR, _DEFAULT_GEN_POS, grpt)
600
602
  else:
601
603
  raise ValueError(f"Undefined base model: {bm}")
602
604
  else:
603
605
  buses:list[Bus] = []
604
606
  lines:list[Line] = []
607
+ gens:list[Generator] = []
605
608
  #Read buses, lines and generators
606
-
607
- gens:list[Generator] = []
609
+
608
610
  gen_models:dict[str, GeneratorModel] = {}
609
611
  for e in rt:
610
612
  if e.tag == "bus":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fpowerkit
3
- Version: 0.0.9
3
+ Version: 0.0.10
4
4
  Summary: A Distflow PDN solver based on Gurobi.
5
5
  Author: fmy_xfk
6
6
  Classifier: Programming Language :: Python :: 3
@@ -53,6 +53,6 @@ B0->B1->B2
53
53
  ## 配电网文件格式
54
54
  目前,我们提供了2种方式记录配电网的结构和负荷信息,分别为ZIP格式和XML格式,我们推荐使用XML格式记录数据,因为其更加灵活。以下是两种方式的说明链接:
55
55
 
56
- [ZIP格式](docs/zip_file.md)
57
-
58
56
  [XML格式](docs/xml_file.md) (推荐!)
57
+
58
+ [ZIP格式](docs/zip_file.md)
@@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf8") as f:
5
5
 
6
6
  setup(
7
7
  name="fpowerkit",
8
- version="0.0.9",
8
+ version="0.0.10",
9
9
  author="fmy_xfk",
10
10
  packages=find_packages(),
11
11
  description="A Distflow PDN solver based on Gurobi.",
File without changes
File without changes