Code Monkey home page Code Monkey logo

abstract-power-supply-system-models's Introduction

abstract-power-supply-system-dag

Commitizen friendly

Documentation

供电系统抽象图,是供电系统分析的核心数据结构, 在给定真值表下, 该图将生成以各个电源为根节点的一组树。

注意,在生成森林的过程中,只有一条规则:

任意两个电源,以及电源和电源自己,不能存在闭合通路

Dc/Dc, 闭合开关正向二极管都认为是闭合通路的一部分。

test_graph.py下有若干对闭合通路的测试,可以查看单元测试进一步的了解如何 是一个合法的供电系统工作状态.

Sample

sample

Limitations

  • TREE的根一定是电源
  • 电源一定接开关
  • 开关接汇流条, DC/DC 或者负载
  • 汇流条下有 DC/DC 或者其他开关

Development & Test

Install rye, then:

rye sync
pytest

Benchmarks

  • Generate forest

gen forest benchmark

  • Find passages

find passages benchmark

FAQ

  • 为什么要用forest(森林)而不是dag(有向无环图)来描述供电系统的运行状态?

首先dag可以表达为逻辑上等价的forest, 只是forest的空间效率低于dag.

Alt text

严格来说,由于不能存在多路供电,供电系统的运行状态是forest, 但是由于我们没有实现表决算法,实际上供电系统 的运行状态也可以用dag描述。

所以,仅仅就目前而言, 用forest只是出于算法实现的简化, 但通过性能测试,forest也足以满足需求, 所以先用forest描述供电系统的运行状态。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.