{"id":32153406,"url":"https://github.com/welthulk/sparlectra.jl","last_synced_at":"2026-04-15T11:00:56.998Z","repository":{"id":213116438,"uuid":"725230565","full_name":"Welthulk/Sparlectra.jl","owner":"Welthulk","description":"power flow calculation, state estimation","archived":false,"fork":false,"pushed_at":"2026-04-10T15:56:36.000Z","size":1621,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-10T16:26:26.211Z","etag":null,"topics":["estimation","lastflussrechnung","network-analysis","network-calculations","newton-raphson","state"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Welthulk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-11-29T17:54:53.000Z","updated_at":"2026-04-10T14:40:12.000Z","dependencies_parsed_at":"2024-02-22T17:27:54.348Z","dependency_job_id":"41e91f1c-6f63-4d50-9fb1-d529f7c3bf1a","html_url":"https://github.com/Welthulk/Sparlectra.jl","commit_stats":null,"previous_names":["welthulk/sparlectra.jl"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/Welthulk/Sparlectra.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Welthulk%2FSparlectra.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Welthulk%2FSparlectra.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Welthulk%2FSparlectra.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Welthulk%2FSparlectra.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Welthulk","download_url":"https://codeload.github.com/Welthulk/Sparlectra.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Welthulk%2FSparlectra.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31837947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T10:26:52.245Z","status":"ssl_error","status_checked_at":"2026-04-15T10:26:51.649Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["estimation","lastflussrechnung","network-analysis","network-calculations","newton-raphson","state"],"created_at":"2025-10-21T11:30:15.053Z","updated_at":"2026-04-15T11:00:56.989Z","avatar_url":"https://github.com/Welthulk.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation](https://github.com/Welthulk/Sparlectra.jl/actions/workflows/jekyll-gh-pages.yml/badge.svg)](https://welthulk.github.io/Sparlectra.jl/)\n\n\n# SPARLECTRA\n\u003ca href=\"https://github.com/Welthulk/Sparlectra.jl/tree/main/\"\u003e\u003cimg align=\"left\" width=\"100\" src=\"docs/src/assets/logo.png\" style=\"margin-right: 20px\" /\u003e\u003c/a\u003e\n\nThis package contains tools for subsequent network calculations. It primarily features programs for calculating load flow and state estimation. The focus is to provide valuable insights into power-system calculations for both students and ambitious professionals.\n\n---\n\n## Features\n\n- AC power flow with rectangular complex-state Newton-Raphson as default (`:rectangular`); legacy `:polar_full` / `:classic` are deprecated.\n- State Estimation (WLS) as an **experimental** feature\n- Canonical external solver interface (`PFModel`/`PFSolution`) to integrate third-party solvers.\n- PV-to-PQ bus switching.\n- MATPOWER-compatible import/export utilities and local casefile helper workflow.\n- Loss calculations and power flow results reporting.\n- Network Modeling: \n    - Buses with prosumer-derived PF typing (PQ, PV, Slack)\n    - Transmission lines\n    - Transformers (2-winding and 3-winding)\n    - Generators and loads\n    - Shunts\n    - Topological impedanceless bus links (`addLink!`) \n- Transmission lines and transformers can be represented using π-equivalent models,\nallowing direct use of CIM and manufacturer data without additional model conversions.    \n\n---\n\n## Installation\n\nFor installation, run the following command in the Julia REPL:\n```julia\nusing Pkg\nPkg.add(\"Sparlectra\")\n```\n\n## Quick Start\n\nHere's a simple example to get you started:\n\n```julia\nusing Sparlectra\n\n# Ensure case file exists locally (downloads on demand into data/mpower)\ncase_path = ensure_casefile(\"case14.m\")\n\n# Build network and run AC power flow (including post-processing)\nnet = createNetFromMatPowerFile(case_path, false)\nite, erg = run_net_acpflow(net; iter_max = 10, tol = 1e-6, print = 0)\n\nif erg == 0\n    printACPFlowResults(net, 0.0, ite, 1e-6)\nend\n```\n\n## Documentation Structure\n\n- **[Changelog](docs/src/changelog.md)**: Version history and updates\n- **[Networks](docs/src/networks.md)**: Creating and manipulating network models\n- **[Branch Model](docs/src/branchmodel.md)**: Details of the network branch model\n- **[Import/Export](docs/src/import.md)**: Importing and exporting network configurations\n- **[Component Removal](docs/src/remove_functions.md)**: Conceptual notes on topology-aware removal workflows\n- **[Workshop](docs/src/workshop.md)**: Guided exercises and examples\n- **[State Estimation](docs/src/state_estimation.md)**: Theory, observability, and practical SE workflow\n- **[Network Reports](docs/src/netreports.md)**: Create and use machine-readable `ACPFlowReport` output\n- **[Function Reference](docs/src/reference.md)**: Complete API documentation\n- **[Powerlimit Guide](docs/src/powerlimits.md)**: Handling of power limits\n- **[Solver Guide](docs/src/solver.md)**: Numerical solver formulations and FD Jacobians\n\n\n\n### Network Creation\nThis package supports the import and export of Matpower .m files, although currently it only reads bus, generator, and branch data from these files. Please note that additional Matlab functions within the .m file are not supported. Additionally, you can modify the imported Matpower files or you can create your own network using easy-to-use functions provided by the package.\n\n### Bus typing in power flow\n\n`addBus!` defines the electrical node data (`busName`, `vn_kV`, optional `vm_pu`, `va_deg`).\nThe operational PF bus type is resolved from attached prosumers:\n\n- Slack: at least one slack-defining prosumer (`referencePri` set, e.g. `EXTERNALNETWORKINJECTION`).\n- PV: at least one regulating generator prosumer (`isRegulated = true`, or controller metadata, or generator with `vm_pu` setpoint).\n- PQ: default fallback (loads only, non-regulating generation, or mixed non-regulating injections).\n\nThe legacy `busType` argument in `addBus!` is still accepted for compatibility, but ignored for PF typing.\n\n### Release status of State Estimation\n\nThe current State Estimation functionality should be considered **experimental**.\nThe present implementation provides a first nonlinear WLS workflow with\nobservability helpers, convenient measurement-building utilities, and support\nfor passive buses via zero-injection pseudo measurements. At the moment,\nzero-injection buses are modeled through pseudo measurements with small\nvariances rather than a dedicated hard-constraint block, and bad-data detection\nis not yet exposed as a full public API. The current scripts and result fields\nsupport residual inspection, but a dedicated diagnostics workflow remains part\nof the roadmap.\n\n### Test Cases and Benchmarks\n\nSparlectra does not ship third-party power system test cases by default.\n\nInstead, MATPOWER-compatible case files (e.g. `case14`, `case118`) can be\ndownloaded **on demand** using helper scripts provided with the package.\nDownloaded files are stored locally and are not part of the Sparlectra source\ndistribution.\n\nThis approach keeps the repository lightweight and avoids bundling external\ndata while still allowing reproducible experiments and benchmarks.\n\n\n### License\nThis project is licensed under the Apache License, Version 2.0.\n[The license file](https://github.com/welthulk/Sparlectra.jl/blob/main/LICENSE) contains the complete licensing information.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelthulk%2Fsparlectra.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwelthulk%2Fsparlectra.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwelthulk%2Fsparlectra.jl/lists"}