Autonomous Machines & Society.

2023-02-04
Recreating Cloudpss

chats with our dearly chatgpt alternatives:

show me how to recreate cloudpss platform

Creating a cloud platform like CloudPss can be a daunting task, but it is achievable with the right knowledge and resources. Here are some general steps to help you get started:

Research CloudPss and other cloud platforms to understand their features, benefits, and drawbacks.

Define your goals and objectives for the platform. This can include features you need, target users, and any other important considerations.

Select a cloud provider and decide on the best hosting option for your platform.

Design the architecture and decide on a programming language.

Develop the platform using secure coding practices.

Test the platform for security and performance.

Deploy the platform and monitor usage.

Maintain and update the platform regularly.

Follow these steps and you will be able to create a cloud platform like CloudPss. Good luck!

what is cloudpss

CloudPss is a modeling and simulation platform for the energy internet. [1] It uses a completely self-developed electromagnetic transient simulation kernel and is designed to provide comprehensive analysis services for the energy internet. [2] It is based on cloud computing and focuses on solving the problem of modeling and simulation of power system. [3] CloudPss can be used for various purposes, including monitoring and optimization of electricity grids, power system dynamic simulation, and fault analysis.

References:

[1] Documentation - CloudPSS Documentation

[2] CloudPss-An Energy Internet Modeling and Simulation Tool in …

[3] A High-Performance Power System Simulator Based on Cloud …

how to rebuild the modeling and simulation part of cloudpss using open-source software

The modeling and simulation part of CloudPss can be rebuilt using open source software such as GridLAB-D, OpenModelica, and GridAPPS-D.

GridLAB-D is a free and open source software platform for modeling and simulation of electric power systems. It is designed to take advantage of high-performance computing resources for system analysis and optimization. [4]

OpenModelica is a free and open source modeling and simulation environment. It is designed for modeling, simulation, and optimization of complex systems. [5]

GridAPPS-D is an open-source software platform for modeling and simulation of the power system. It is designed to enable the integration of hardware and software components related to the energy internet. [6]

Using these open source software platforms is a great way to rebuild the modeling and simulation part of CloudPss.

Read More

2023-02-03
能源优化配置(购置,设计)计算投资收益 自动控制(能源调度)预测

to speed up numpy performance, either use multicore enabled BLAS library, intel MKL or use cupy (ROCm ready)

to check if numpy is not using multicore, run:

1
2
3
4
5
6
import numpy as np
size = 10000
a = np.random.random_sample((size, size))
b = np.random.random_sample((size, size))
n = np.dot(a,b) # run for a long time


use scipy.optimize


gurobi v9.0 cracked keygen

gurobi v9.0 破解版和使用教程


operations research (OR) is somehow related to machine learning and artificial intelligence. there’s a book for reference. however, a solid solver is the backbone of energy system optimization.

technical terms for operations research:

full name abbreviation
LP Linear Programming
MIP Mixed Integer Programming
NLP Non-linear Programming
MILP Mixed Integer Linear Programming
MINLP Mixed Integer Non-linear Programming

technical terms for integrated systems:

中文 English
燃气轮机 Gas Turbine
离心泵 Centrifugal Pumps
柔性负荷 Flexible Loads
供水管道 Water Pipelines
外部电源 External Power Sources
电源传输线 Power Transmission Lines
吸收式制冷机 Absorption Refrigerators
燃气锅炉 Gas Boilers
制冷制热设备 Cooling and Heating Equipment
储能设备 Energy Storage Equipment
热力传输设备 Thermal Transmission Equipment
电力传输设备 Power Transmission Equipment
电源设备 Power Supply Equipment

paid IES simulation & optimization code collection by 研学社, use for searching the names elseware to get for free

pyVISA is a Python package that enables you to control all kinds of measurement devices independently of the interface (e.g. GPIB, RS232, USB, Ethernet). VISA is a protocol (almost) shared by all modern hardware connection standards

a list of energy models including “domenestic hot water” on openmod.org

Open Energy System Models on wikipedia, including Electricity sector models and Energy system models

multiple SciML and neural network related differential equation projects were found on github topic ODE

图书: 能源互联系统的最优控制与安全运行 涉及到综合能源系统稳态与暂态建模

推荐购买图书 未来能源技术丛书 综合能源系统建模 从入门到实践 有多系统耦合调优的代码实践 mentioned CPLEX solver from IBM

Ai4Energy (浙江大学的项目) and 智慧能源系统导论—综合能源系统建模、仿真、优化与控制课程

wikipedia maintains a list of mathematical optimization software including modeling tools and various solvers

a huge collection of up-to-date tools called open sustainable technology by protontypes has been found.

in order to execute control in real time, either FPGA or RTOS like RT-Lab is used (maybe not needed?)

in simulation, unlike real-world systems, can be quite “chess-like”. you can pause the system, revert the operation, revert the time, in order to manually control all components to guide the system to optimal.

微电网 (microgrid) 耦合优化调度 综合能源系统 优化调度 电气热耦合

CCHP: Combined Cooling, Heat and Power

weibull distribution

differential equations: ODE (Ordinary Differential Equation), SDE (Stochastic Differential Equation), DDE (Delay Differential Equation), DAE (Differential Algebraic Equation)

what they are talking is SCADA: supervisory control and data acquisition. SCADAS by siemens is for signal processing and recording. is it the system used in the current project? nope. is SCADAS similar to SCADA? yes.

tutorials and code

综合能源系统分析的统一能路理论系列:

综合能源系统分析的统一能路理论(一):气路

综合能源系统分析的统一能路理论(二):水路与热路

综合能源系统分析的统一能路理论(三):《稳态与动态潮流计算》 &Python代码 & 讲解 (研学社?卖能管系统调优的代码)

Data and codes for energy circuit method-based optimal energy flow

reinforcement learning (PPO) for NeurIPS Competition 2020: Learning to Run a Power Network (L2RPN)


基于改进DaNN的综合能源系统多能负荷预测, DaNN (Domain Adversarial Neural Network, Unsupervised Domain Adaptation by Backpropagation (for digital twins?)) or DDAN (Deep Domain Adaptation Networks)

综合能源系统(冷、热、电 (CCHP))案例/论文/数据整理分享


王子豪提供的综合能源系统优化运行专题

Section 1: 开篇:综合能源系统基本模型和gurobi基本语法

Section 2: 综合能源系统目标函数建立

Section 3: 综合能源系统最优电力潮流(OPF)模型建立与Gurobi实现

Section 4: 综合能源系统最优热力潮流(OTF)模型建立与Gurobi实现 Code: IESOptimization

Section 5: 综合能源系统多时刻优化模型建立与求解

tools

mac m1 compatibility on windows software

install by brew install wine-stable (version >= 6.0.2)

then run wine64

python doc generation

pydoc

start server using:

1
2
python3 -m pydoc -p <port> <module_name>

pdoc3

1
2
3
pip3 install pdoc3
pdoc --html <module_name>

docstring

1
2
3
4
5
6
7
8
9
class myClass:
"""
myClass doc
"""
def __init__(self):
"""
init doc
"""

controlling & monitoring

OpenMUC is some advanced software only SCADA bridging system, with analysing but no simulation!

OpenEMS is for monitoring, controlling and simulation based on historical data (not digital twin!)

myEMS用于能源管理项目的设备管理、数据采集、处理、分析、可视化和报表。

optimization

solvers:

glpk: gnu linear programming kit (LP/MIP problems), can bridge with gnu mathprog language (GMPL, subset of AMPL)

on blackbox optimization there are:

  • Gradient Free Optimizers like: meta-heuristic, simulated-annealing, hill-climbing, particle-swarm-optimization, evolution-strategies, blackbox-optimization, gradient-free-optimization, tree-of-parzen-estimator and many more

  • vizier by google for blackbox and hyperparameter optimization

  • parmoo for parallel multiobjective simulation optimization


ilqr: Iterative Linear Quadratic Regulator with auto-differentiatiable dynamics models

RAVEN is a flexible and multi-purpose probabilistic risk analysis, validation and uncertainty quantification, parameter optimization, model reduction and data knowledge-discovering framework.

RAVEN includes the following major capabilities:

  • Sampling of codes for uncertainty quantification and reliability analyses

  • Generation and use of reduced-order models (also known as surrogate)

  • Data post-processing (time dependent and steady state)

  • Time dependent and steady state, statistical estimation and sensitivity analysis (mean, variance, sensitivity coefficients, etc.).

The RAVEN statistical analysis framework can be employed for several types of applications:

  • Uncertainty Quantification

  • Sensitivity Analysis / Regression Analysis

  • Probabilistic Risk and Reliability Analysis (PRA)

  • Data Mining Analysis

  • Model Optimization


VSA-FINE: generating energy system optimization models, using tsam (for Time series aggregation, Pareto-Optimal Temporal Aggregation of Energy System Models) and pyomo, compatible for both commercial solvers and open-source solvers.

optimization using PuLP (by coin-or)

python-mip (install by pip install mip) provides tools for modeling and solving Mixed-Integer Linear Programming Problems.

GEKKO is a Python package for machine learning and optimization of mixed-integer and differential algebraic equations. Modes of operation include parameter regression, data reconciliation, real-time optimization, dynamic simulation, and nonlinear predictive control. (MPC? see APM Python with Demo Applications on GitHub)

numdifftools Solves automatic numerical differentiation problems in one or more variables (Jacobian?)

NEOS is a free service for numerical optimization, which almost only accepts GAMS/AMPL/SMPS code.

Ceres Solver is for non-linear least squares (curve fitting, can be done in lmfit-py and scipy.optimize.curve_fit (from python numerical methods, a tutorial on numerical processing)) and can be accelerated by multiprocessing or CUDA

COIN-OR projects (many things!) are usually solver and optimization related. Pyomo (a collection of Python software packages for formulating optimization models, similar to linopy (only for labeled data, linear optimization)) is part of the project.

OpenSolvers is for microsoft excel and uses linear solvers like COIN-OR CBC (on which mentioned a lot of modeling languages/tools it supports) and non-linear solvers like Bonmin (Basic Open-source Nonlinear Mixed INteger programming) and Couenne (Convex Over and Under ENvelopes for Nonlinear Estimation) powered by IPOPT. details on solvers

Pareto optimization using:

Code for NIPS 2018: Multi-Task Learning as Multi-Objective Optimization, an exact algorithm for multi-objective optimization of deep networks with negligible computational overhead.

machine learning & neural networks

flux.jl is machine/deep learning in julia, with GPU support. model zoo (examples) and doc. DiffEqFlux.jl can add differential equation layers to neural networks, details here

MLJ.jl: non-DNN machine learning framework

facebook prophet

pymc based prophet

numenta nupic sparse encoding

pyro forcasting and time series

uber orbit (A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood) and doc

reinforcement learning

sample code and intro for adaptive dynamic programming(ADP)

microsoft machine teaching is like automl for reinforcement learning (autorl), based on bonsai (on [github[(https://github.com/BonsaiAI)) (doc) is a low-code platform for autonomous AI systems (bonsai BRAIN is close-sourced), doc before acquiantaince. mentioned “optimize HVAC (heating, ventilation, and air conditioning) with EnergyPlus and BCVTB (Building Controls Virtual Test Bed)”. specify enviorments, rewards and targets with Inkling (declarative)

openai baselines

stable baselines3

autorl-research by microsoft

autonomous learning library for pytorch, building deep reinforcement learning agents

brain autorl by google

rlang: a declarative language for expressing partial world knowledge to RL agents and decision process. doc

NLP

RETRO-pytorch without weights

LangChain: combine LLMs with other sources of computation or knowledge.

ELIF LFQA retrieval based

haystack (+ LLM = ChatGPT?)

chatgpt (which is currently way too busy?)

PaLM-RLHF

Open-Assistant

NTM (neural turing machine) (best?) for translation, question answering, planning and decision-making. tensorflow 1.14.0 includes it into tf.contrib which also has timeseries module.

model predictive control

MPC is mentioned along with PID (Proportional Integral Derivative) found in libraries like simple-pid, pypid and control.

gradcem: Model-Predictive Control via Cross-Entropy and Gradient-Based Optimization

do-mpc (in python) is a comprehensive open-source toolbox for robust model predictive control (MPC) and moving horizon estimation (MHE).

mpc-pytorch is a fast PyTorch library for solving the non-convex control problem

modeling & simulation

for interfaces i’d like jupyter. does julia/modelica/octave support jupyter?

thermalcorr: (c++) A collection of thermohydraulic correlations for thermal systems and heat exchangers

neural operator for PDE/ODE neural network approximation (speedup solving) and doc

hydraulic: A python package to compute pressure, flows and temperatures in hydraulic circuits

fluids: is open-source software for engineers and technicians working in the fields of chemical, mechanical, or civil engineering. It includes modules for piping, fittings, pumps, tanks, compressible flow, open-channel flow, atmospheric properties, solar properties, particle size distributions, two phase flow, friction factors, control valves, orifice plates and other flow meters, ejectors, relief valves, and more.

CityLearn: reinforcement learning environment for controlling the storage of domestic hot water (DHW), chilled water (for sensible cooling and dehumidification) hot water (for sensible heating) and electricity, also including models of air-to-water heat pumps, electric heaters, solar photovoltaic arrays, and the pre-computed energy loads of the buildings, which include space cooling, dehumidification, appliances, DHW, and solar generation.

OMF: The Open Modeling Framework for smart grid cost-benefit analysis.

HELICS is a co-simulation framework, designed to bring together domain-specific modeling tools so they interact during run time. usage examples and doc

PLEXOS by Energy Exemplar is the only solution available today that unifies market simulations across the electric, water, and gas industries.

Distributed Energy Generation Model

OpenHybridSim is the first-ever, open source tool for EMT and phasor domain hybrid simulation.

openmodelica-microgrid-gym: An OpenAI Gym Environment for Microgrids (and reinforcement learning)

ModelingToolkitStandardLibrary.jl: A standard library of components to model the world and beyond

ModelicaGym: Modelica models integration with Open AI Gym

andes: Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis

DPSim: Real-time power system simulator including powerflow, (dynamic) phasors and EMT. doc

calliope: A multi-scale energy systems modelling framework

Thermal Engineering Systems in Python (TESPy). This package provides a powerful simulation toolkit for thermal engineering plants such as power plants, district heating systems or heat pumps.

Energy-Hub-Market-Operation: Participation of an Energy Hub in Electricity and Heat Distribution Markets using MPEC (mathematic program with equilibrium constraints)

OSeMOSYS in Pyomo (likely to be a large regional energy simulation)

microgrid optimizer for system of hot water, thermal and electricity (CHP) optimization using MILP

EMTSimulation (python)

combined-heat-and-power-system-probabilistic-production-simulation: (in matlab) a fast algorithm for economic and adequacy evaluation of electricity-heating systems

CHP_ORC: Combined heat and power orc cycle using geothermal heat source

CCHP-MINLP: MINLP instances for short-term planning problem of combined heat and power (CHP) systems

Combined-cooling-and-heat-Power-CCHP-Plant written in GAMS, with a report

OpenFAST/kitefast for wind turbine simulation

fmi (functional mock-up interface) is an open model exchange format that able to run on multiple languages, proposed by modelica. tools support this standard are usually for modeling and simulation, and are able to communicate with each other using this protocol.

TRNSYS(Transient System Simulation Program, paid, not open source)最早是由美国威斯康星大学和Solar Energy 实验室开发的。容易与MATLAB、python、C++进行调用和编程。主要进行建筑负荷模拟相对于DEST来说较为复杂。可进行太阳能(光热、光电)、地源热泵、风电、光电、氢能、三联供、综合能源、全生命周期经济性系统模拟分析

multisim includes models like pipes, heat exchanger, thermal storage and controllers like PID, Bang–bang controller,

Two sensor controller and Model predictive controller.

IES analysis notebooks: Jupyter notebooks which analyse IES simulation results

Tools for Energy Model Optimization and Analysis (TEMOA) is an open source modeling framework for conducting energy system analysis. The energy system is described algebraically as a network of linked processes that convert a raw energy commodity (e.g., coal, oil, biomass, uranium) into an end-use demand (e.g., lighting, transport, water heating, conditioned air), doc is here

Distributed Energy Generation Model: Code for “Natural Gas Combined Cycle Power Plants Have Lower Environmental Impact than Conventional Combined Heat and Power for Commercial Buildings, Environmental Science & Technology”

flixOpt: vector based energy and material flow optimization framework in python

Wastewater_Energy_Optimization: Supplementary files for “Integrated Design and Optimization of Water-Energy Nexus: Combining Wastewater Treatment and Energy System”

GAN_GA_ICML containing files to replicate experiments and results from “Using C-GANs to Boost High-dimensional Nonlinear Optimization for Sustainability Targets”

IDEAS (Modelica library allowing simultaneous transient simulation of thermal and electrical systems at both building and feeder level.

IESLAB for burst and leakage simulation/detection with SCADA data

Grid2Op: a testbed platform to model sequential decision making in power systems (for Reinforcement Learning?), with lightsim2grid which implements a c++ backend targeting the Grid2Op (speedup simulation). doc

EnergyCircuitTheory-EnergyFlowCalculation: 数值实验代码 for 《综合能源系统分析的统一能路理论(三):稳态与动态潮流计算》

The Framework for Optimization of ResourCes and Economics (FORCE) is a collection of software tools developed under the Integrated Energy Systems (IES) program to enable analysis of technical and economic viability of myriad IES configurations. Each of these tools is openly available and free to use.

HERON: Holistic Energy Resource Optimization Network (HERON, for Technoeconomic Assessments and Synthetic History Generation) is a modeling toolset and plugin for RAVEN to accelerate stochastic technoeconomic assessment of the economic viability of various grid-energy system configurations, especially with application to electrical grids and integrated energy systems (IES).

TRANSFORM-Library: A Modelica based library for modeling thermal hydraulic energy systems and other multi-physics systems

smart-rl-mg: Reinforcement Learning + Microgrids for OpenDSS

HYBRID (requires DYMOLA? just a Modelica runtime?) is a modeling toolset to assess the integration and economic viability of Integrated Energy Systems (IES) , including Modeling and Experimental Validation of Latent Heat Thermal Energy Storage System. Related to CENTAUR which has a GUI interface (very abstract), can be used for the design and simulation of hybrid solar PV-battery-diesel microgrids , similar to (only simulation, not optimization) HYBRID2 and HOMER (Hybrid Optimization Model for Multiple Energy Resources, with a data processing script found somewhere)

in python-control (optional dependency of slycot for MIMO) there is an example of model predictive control for aircraft model

EMSO is the acronym for Environment for Modeling, Simulation, and Optimization. can customize model using EMSO modeling language. it is about chemistry rather than CCHP according to its modeling library EML

OpenModelica is an open-source Modelica-based1 modeling and simulation environment intended for industrial and academic usage.

Xcos by SciLab is a graphical editor to design hybrid dynamical systems models. Models (in modelica) can be designed, loaded, saved, compiled and simulated. All Xcos standard blocks grouped by categories (signal processing, electrical, hydraulics, derivative, integral, etc.).

JModelica is an extensible Modelica-based open-source platform for optimization, simulation, and analysis of complex dynamic systems. The main objective of the project is to create an industrially viable open-source platform for simulation and optimization of Modelica models.

Scilab (by Dassault Systems) is a scientific software package for numerical computations providing a powerful open computing environment for engineering and scientific applications. Scilab is an open source software and includes hundreds of mathematical functions with the possibility to add interactively programs from various languages (C, C++, Fortran…).

Scicos is a graphical dynamical system modeler and simulator developed in the Metalau project at INRIA, Paris-Rocquencourt center. With Scicos, user can create block diagrams to model and simulate the dynamics of hybrid dynamical systems and compile models into executable code.

Spyder is a free open-source Python development environment providing MATLAB-like features in a simple and light-weighted software.

StaticDESim: Simulation and optimisation of integrated energy system in steady state written in MATLAB, with models like Micro Gas Turbine (MGT), Aqueous Lithium-Bromine Single-Effect Absorption Chiller (AC_ALB), R123 Organic Recycle Cycle (ORC_R123), Heat Pump (HP) and R134a Vapour Compression Chiller (VCC_R134a)

OpenHydraulics: A free Modelica package providing components describing 1-dimensional fluid flow in hydraulic circuits.

pyDMPC: A Python tool for distributed model-based predictive control of energy suppy chains

Ai4EMetaPSE by Ai4Energy: 采用基于方程的面向对象建模,基于微分代数方程(DAE),对能源系统组件进行建模,用以对能源系统进行稳态、动态仿真。能够处理连续时间及离散事件问题。

Ai4ELab is a Virtual Simulation Lab of Ai4Energy deployed with docker. can use with ModelingToolkit.jl. doc

simupy: a ramework for modeling and simulating dynamical systems

Modelica Standard Library includes models for mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines, similar to Modeling Toolkit Standard Library from SciML

cchp-minlp models including heat pump, gas turbine, auxiliary boilers, written in GAMS and AMPL

pymgrid only provides models related to electricity.

oemof: Open Energy Modelling Framework - Python toolbox for energy system modelling and optimization, with thermal simulation support. doc

renpass: Renewable Energy Pathways Simulation System (written in R)

MESSAGEix is a framework written in GAMS that can be used to develop and run many different models, each describing a different energy system.

Minpower is an open source toolkit for students and researchers in power systems.

GNU Scientific Library (better on linux!) capabilities:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Complex Numbers
Roots of Polynomials
Special Functions
Vectors and Matrices
Permutations
Sorting
BLAS Support
Linear Algebra
Eigensystems
Fast Fourier Transforms
Quadrature
Random Numbers
Quasi-Random Sequences
Random Distributions
Statistics
Histograms
N-Tuples
Monte Carlo Integration
Simulated Annealing
Differential Equations
Interpolation
Numerical Differentiation
Chebyshev Approximation
Series Acceleration
Discrete Hankel Transforms
Root-Finding
Minimization
Least-Squares Fitting
Physical Constants
IEEE Floating-Point
Discrete Wavelet Transforms
Basis splines
Running Statistics
Sparse Matrices and Linear Algebra


AMPL community edition must connect to internet for license validation. trial commercial solvers for 30 days.

CMPL by coin-or is highly optimized for multiprocessing. can bridge to python via pyCMPL3.

MiniZinc: open-source constraint modeling language.

PandaThermal: District heating and cooling network design and simulation tool, largely inspired by PandaPower

SciML is Scientific Computing + Machine Learning Toolbox. It has the best performant DifferentialEquations.jl (can run on CUDA with ease, connect to neural networks) and NeuralPDE.jl for Physics-Informed Neural Networks (PINN) and Deep BSDE Solvers of Differential Equations for Scientific Machine Learning (SciML) accelerated simulation, easily bridging to Python. In its tutorial we can learn differential equation modeling/simulation.

PowerModelDistribution.jl is an extension package of PowerModels.jl for Steady-State Power Distribution Network Optimization.

PowerSimulations.jl is a Julia package for power system modeling and simulation of Power Systems operations.

TIMES model: The Integrated MARKAL-EFOM System, written in GAMS (General Algebraic Modelling System, a modeling language, paid, similar to Dyna (a declarative modeling language like prolog, in dyna2gams it can refine parameters on observation) with lots of solvers), able to model CHS systems and predict financial costs said in its documendation, is a technology rich, bottom-up model generator, which uses linear-programming to produce a least-cost energy system, optimized according to a number of user constraints, over medium to long-term time horizons.


julia relates quite a bit to power and energy simulations. is it performance related?

type ] in julia’s REPL to get Pkg interface.


Modelica is a language for modeling of cyber-physical systems, supporting acausal connection of components governed by mathematical equations to facilitate modeling from first principles, used in CATIA Systems, Dymola, JModelica.org, LMS AMESim, MapleSim, Modelon Impact, MWorks, OpenModelica (for python you need this: PySimulator), SimulationX, and Wolfram SystemModeler (and more tools.

OpenIPSL is a library of power system component models written in the Modelica language that can be used for power system dynamic analysis, such as phasor time-domain simulations.

STEPS & stepspy: Simulation Toolkit for Electrical Power Systems. doc

pandapower: (lacks storage unit models) Convenient Power System Modelling and Analysis based on PYPOWER and pandas. official site

in pandapower’s paper there are lots of open source tools for electric power systems optimization mentioned:

MATPOWER (with optional solvers, must be obtained separately) is a widely used power system analysis tool for matlab and octave that solves power flow and optimal power flow problems and also includes an optimal scheduling tool for market simulations.

There are ports of the original MATLAB based code to other languages, most notably Pythons PYPOWER pypower-dynamics extends PYPOWER for dynamic analysis of electric power systems.

GridCal (abbriviation for grid calculator) includes power flow, time-series and short circuit calculation methods and comes with a comprehensive graphical user interface.

The simulation and optimization library PyPSA (Python for power system analysis) is aimed at time-series simulation of security-constrained linear optimal power flow and investment optimization.

PowerGAMA ( Python-based lightweight simulation tool for high level analyses of renewable energy integration in large power systems) and psst (power system simulation toolbox) are also aimed at market optimization in electric networks.

GridLAB-D is an advanced tool for static simulations using agent based simulation models, based on C/C++ with integration of SCADA controls, metering and market models.


OpenDSS is a electrical power system simulation tool primarily for utility power distribution systems, written in a Delphi.

MATPower: free, open-source tools for electric power system simulation and optimization

energyplus (open source, based on DOE2, a building energy analysis program that can predict the energy use and cost) is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption—for heating, cooling, ventilation, lighting and plug and process loads—and water use in buildings.

bcvtb is a software environment that allows users to couple different simulation programs for co-simulation, and to couple simulation programs with actual hardware. For example, the BCVTB allows to simulate a building in EnergyPlus and the HVAC and control system in Modelica, while exchanging data between the software as they simulate.

wolfram mathematica and System Modeler

maple and MapleSim

matlab (can be cuda accelerated (jacket?)) and simulink

gnu octave (used by cloudpss?)

sagemath

root

computational fluid dynamics (really?)

openFOAM (free CFD (computational fluid dynamics) software) and documentation

CFD in github

CFD machine learning in github

awesome CFD machine learning: a curated list of machine learning papers, codes, libraries, and databases applied to fluid mechanics.

finite element analysis

FEA (finite element analysis) open source software list

cloudpss

this thing is developed by tsinghua-eiri

multiple papers related to cloudpss were found on semanticscholar. maybe we just want the ieslab part?

in its paper the computation graph is acyclic.

cloudpss python sdk是基于CloudPSS-API封装的模型及软件开发套件。用户可通过编写Python、Matlab等脚本构建自定义模型,或是调用CloudPSS平台中的模型修改、仿真计算功能,实现诸如自动修改模型、批量仿真计算、自动化生成报告等复杂且繁琐的功能。用户也可在其自己的应用程序中调用CloudPSS仿真引擎,实现仿真驱动的高级分析应用。

main structure:

  • SimStudio: 轻松组织和管理能源电力系统数字孪生仿真模型

in SimStudio it has “octave” keyword. does that mean it is using GNU octave? yes! but octave does not have Simulink-like functionalities. see octave packages for more. use Xcos instead? in order to read code in modules like https://cloudpss.net/model/CloudPSS/HeatPump(右键点击元件,选择打开模块) you have to obtain sufficient permission.

will raise error if we wire electricity to water pipelines. it is not so easy to wire these things. better do it with port routing.

components list:

Classification Components
Measurements Oscilloscope Group, Output channel
Electrical-Basic Passive Components Ground, Resistor, Inductor, Capacitor, Single-phase Fault Resistor, Three-phase Fault Resistor, Single-phase Transformer
Electrical-Basic Source Components DC Current Source, DC Voltage Source, Single-phase AC Voltage Source, Controlled Current Source, Controlled Voltage Source, Controlled AC Voltage Source (VF), Controlled AC Voltage Source (VP)
Electrical-Power Electronic Switches Diode, Thyristor, IGBT
Electrical-Three-phase Components Shunt Capacitor/Reactor, Fixed Load, Line Cluster, Three-phase Transmission Line, Three-phase AC Bus, Three-phase AC Voltage Source, Three-phase Two-winding Transformer, Three-phase Three-winding Transformer, Synchronous Generator
Electrical-Fast Power Electronic Modules Half Bridge Submodule, Six-pulse Thyristor Bridge
Electrical-Renewable Energy Components Photovoltaic Source, Lead-acid Battery
Measure Components Branch Voltage Meter, Voltage Meter, Current Meter, RMS Meter, Three-phase Power Meter, Phase Locked Loop, FFT
Control-Basic Components M script, Constant, Time, Simulation Time Step, Non Connection (NC), Loop Break Node, Channel Merge, Channel DeMerge
Control-Basic Math Functions Adder/Subtractor, Multiplier, Divider, Absolute Value, Sign Function, Round Function, Trigonometric Function, Power Function, Exponential Function, Logarithm Function, Maximum/Minimum Function, Maximum/Minimum in One Cycle
Control-Linear Transfer Functions Gain, Integrator, Derivative, PI Controller, Zero-point, Real Pole, Differential Pole, Lead Lag Pole, Second Order Complex Pole, Nth Transfer Function
Control-Nonlinear Functions Hard Limiter, Delay, Angle Resolver, Piecewise Linear Function, Nonlinear Function
Control-Analog Signal Comparator, Hysteresis Comparator, Zero Detector, Sampler, Sample and Hold
Control-Digital Signal Logic Gate, Binary Delay, Monostable MultiVibrator, Flip Flop, Selector, Edge Detector
Control-Coordinate Transformation Park Transformation, Clark Transformation, dq-αβ Coordinates Transformation, Polar/Rectangular Coordinate Converter
Control-Singal Generator Triangular Generator, Squar Generator, Sine Generator, Adjustable FPM Sine Generator, Single-impulse Generator, Impulse Generator, Step Generator, Ramp Generator, Surge Gennerator, Drop Generator, Random Number Generator
Control-HVDC Control Phase Locked Oscillator, Nearest Level Modulation (NLM), SST Fire Pulse Generator
Control-AC system Control ST5B、Hydro Governor、 Hydro Turbine
Heat-Basic Components Pipeline, Heat Source, Bulding (Load), Connection Point, Relay Pump
  • IESLab (Integrated Energy System): 综合能源系统规划设计云平台

a place where you can import weather, energy prices, device parameters and loads data, design the IES system by hand (how components connects), determine the best products to purchase based on different criterions and assess it by net profit, environmental effects and energy efficiency.

  • FuncStudio: 助力能源电力系统数字孪生云边融合业务定制

install locally (windows only?) or download binary file of “header only” functions?

  • AppStudio: 快捷构建能源电力系统数字孪生应用

low-code frontend design interface.

the platform uses code generator to make the simulation fast.

something like siemens simcenter is also cloud based. collimator is self-labeled as better simulink alternative with ai and python code blocks inside. it also suggests model based development (and a hell lots of blogs) for a general guideline on simulation and optimized control systems.

found tsinghua’s cloudpss (linked to localhost?) from Allen-Sunboy, along with all rare urls exclusive to elites (social networks?)

cloudpss is utilizing alibaba’s cloud computing. the simulation uses computing graph and cuda acceleration (diffcult to deploy?), suggested simulink and PSCAD (PyPSCAD does similar things, but far from complete) (with IncrediBuild-XGE for multi-core acceleration) for simulation. in the paper it describes itself as “power system simulator” and “electromagnetic transient simulator” (HVDC: high voltage direct current, highly efficient for transmitting large amounts of electricity over long distances)


项目仿照cloudpss进行编写

专注于复杂交直流电网、配电网、微电网、独立电力系统的精确电磁暂态建模及覆盖多时间尺度物理过程仿真

本平台支持包括配电系统、供暖制冷系统、蒸汽供热系统及烟气余热回收系统在内的多能源系统耦合网络的建模仿真计算。与传统的综合能源系统仿真工具不同,平台集成了20余种常见的综合能源系统设备模型,允许用户灵活搭建任意能量梯级利用形式的综合能源系统,拓扑结构不受约束,同时支持并网系统、孤网系统的仿真计算,从而有效拓展了适用场景。

系统架构

系统具体设计参考文档。

综合能源系统特指在规划、建设和运行等过程中,通过对能源的产生、传输与分配(能源网络)、转换、存储、消费等环节进行有机协调与优化后,形成的能源产供销一体化系统。

本平台包含两大子系统,分别为设计规划系统和运行调度系统。

涉及到数据,计算,仿真的模块:

系统能量流拓扑

基础数据

环境信息库

包含:地理位置、气象数据(风、光、温度)以及规范中的一些设计表格,与地理位置关联的相关设备。

输入地理位置(地名或者坐标),气象数据(默认已选择的地理坐标),可以从文件导入或者历史数据库导入
设备信息库

包含:发电、制冷制热、储能设备、配电传输、供热传输五个分类。不低于25种设备。还包含市政资源(市政天然气、市政电网、市政蒸汽、市政热水)。

需要考虑设备效率、设备寿命、网络损耗。包含建设费用等虚拟模型(电缆、管道、基建等)。

输入输入相应设备相应属性值,或者从典型库导入相应设备信息(生产厂商 设备型号 额定功率 运行约束 经济性参数)
负荷信息库

包含:蒸汽负荷、采暖负荷、制冷负荷、电负荷

输入形式:

  • 负荷指标

• 采暖、制冷、电负荷有其特殊场景,属性面板有额外参数:

• 模型:粗略模型(每月平均值数据) 或者详细模型(每个小时)

  • 负荷参数:是否包含工作日和非工作日、具体时间段、建筑类型、面积

  • 负荷曲线:更直观的对负情况进行展示

能源信息库

包含:电、热、冷、气的价格信息

输入形式:

定价规则或者曲线描述

电价格分为:

  • 常数电价

  • 分时电价

  • 阶梯电价

  • 分时阶梯

热和冷的价格分为:

  • 面积

  • 热量

气的价格随当地行情

设计规划

根据已经设定的能源类型、负荷需求、建设规模、资金来源进行方案优化,得到设备的容量配置及各种设备的设备成本、工程初始投资、运行费用及各种设备的出力情况,以及经济指标、环保指标,并输出相应报告

仿真计算

根据已经设定的基本数据进行仿真计算,并输出设备的出力曲线及相应的经济指标、环保指标的报告(除了不需要输出容量配置之外,其余的输出项与设计规划一样)

能源汇总

能源运行实时数据看板

汇总当前各设备运行时的能源生产与消耗汇总,并以图表的形式展示

运行调度

方案列表

对已经规划的方案进行展示

运行日志

对已经运行的方案进行日志记录

系统结构拓扑

基础数据

  • 环境数据

  • 设备数据

  • 负荷信息库

  • 能源信息库

仿真模拟

根据已经设计的运行方案进行带拓扑结构的仿真模拟

调度优化

一种算法策略,对具体的综合能源系统进行协调优化计算(可以结合实时数据),并实时输出优化结果,下发指令给控制系统。

能源监测

实时数据

以图表的形式展示能源生产和消耗数据、告警数据

历史数据

选择历史某段时间,查询当时的能源消耗和生产数据

能源设备监控

实时显示所有设备的运行状态、生产消耗数据、告警信息

告警中心

显示今日所有告警的设备信息

数据分析

能效评估

对电、气、冷、热进行能效评估展示

能源明细

展示产量明细和消耗明细

排放明细

展示排放明细数据

Read More

2023-01-30
Lessons Learned From Premiere Pro Plugin Job

set up python with appropriate version on client’s computer by script, not by “PyInstaller” which takes huge amount of time to compile and huge disk space (visually).

take notes while doing work.

ask for appropriate compensation for any work.

Read More

2023-01-18
Spider, Web Scraping, Captcha Bypass

there are multiple spider collections on github, most of them are rudimentary and project specific, may not always suit your needs.

learnspider in which you can find simple captcha js code and many antimeasure of scrapers for practice. for solutions: learning_spider

spider collections covers zhihu.com

Read More

2023-01-16
影视/番剧素材查找 番剧精彩片段制作 Create Bangumi/Anime Highlights Collection

controllable video summarization

query controllable video summarization and paper

DeepQAMVS: Query-Aware Hierarchical Pointer Networks for Multi-Video Summarization

CLIP-It! Language-Guided Video Summarization

Convolutional Hierarchical Attention Network for Query-Focused Video Summarization

fuzzywuzzy tutorial

thefuzz: Fuzzy String Matching in Python

data humanization

python-humanize

humanfriendly


观众情绪是唯一的标准。


影视 番剧 是可以通过专门的网站查找得到英文名称和中文名称的关联的 可以利用这个关系得到YouTube上面的影评并生成中文标题

影视剪辑比较杂乱 现在喜欢随便混搭 意识流剪辑 当然拿来做一般的素材也行 不过就需要自己搭建处理了

爱奇艺有以图搜片 不过只能搜爱奇艺有版权的

33台词 根据电影台词来搜索电影出处 同时有根据画面描述搜索视频片段 画面清晰度不高 其中文案转视频思路和我差不多

film.ai now can query screenshot and movie name by description and download thumbnails of movies (not latest, not mainland), but without subscription you cannot get accurate seek time (though it will never be accurate)

in imdb can pass film/anime name in multiple languages and get the english name (and trailer video), then query for it in 1337x (results sorted by seeder counts)


nyaa.si国内访问不上 nyaa镜像站列表 比如 https://nyaa.unblockit.ink/ (navigate all unblockit sites, though nyaa is currently not mirrored by this site)https://nyaa.ink/ 其中有些NSFW的 里面也搜不到番剧

nyaapy wiki

nyaapi wiki (nodejs)

torrent file parser and writer (python)

文本分类式的番剧剪辑 需要分割时间段 即每隔一分钟分割对应的弹幕并摘要或者字幕 合并并进行打标签 训练 注意不要包括片头和片尾 (maybe audio only model like whisper will classify this successifully, remember to split (or not?) vocals from BGM? (to detect singing voice which is unique in OP/ED))

when transcoding (with seeking?) using ffmpeg tweak parameters. set low profile with high threads count (higher crf will result in poor quality but faster speed), although all these flags may result into unplayable video for some players.

1
2
ffmpeg -ss <seek_start> -to <seek_end> -i <video_url> -c:v libx264 -c:a [aac/copy] -threads 8 -crf 28 -preset ultrafast -tune zerolatency -movflags isml+frag_keyframe+empty_moov+faststart+delay_moov -f ismv -maxrate 2500k -bufsize 5000k <output_path>

使用网络链接进行ffmpeg seek (-c copy)如果不准确 那么就是片子太短了或者是截取的片段太短了 尝试下载全片之后在本地截取

webtorrent替代aria2c 可以下载视频指定区域 下载速度特别快 记得及时关闭下载释放内存 看看webtorrent-cli是怎么实现seek的 如何对接ffmpeg

yt-dlp不一定能下载b站视频指定区域 如果下载失败 得到视频原地址之后执行:

ffmpeg -ss <start> -to <end> -c copy <video_url>

(其实就是没更新到最新版本)

准备片头和片尾 准备视频模版 每个片段不要太长 选取多个番剧 适当处理视频 防止撞车

如果要剪短视频 多用转场效果 提取正在说话 动作幅度大 或者模型认为比较高能的片段

首先收集b站的动漫高能剪辑视频

提取标题 标签 封面

寻找类似封面 根据封面生成标签 或者根据标签寻找封面 (视频里面找 或者类似图片)

训练根据封面和标签生成标题的模型 或者自行发挥 尝试 只要看起来还行

分段分析视频片段 用yolov8找出视频正在播放的区域 (画中画区域识别) 方便裁剪识别动漫

识别截图中的文字 查看是否有重复的 包含有番剧名称 可以用来查找动漫

asoul database有识别截图出处的思路

asoul自动操作Windows上面剪映获取字幕 剪映API基于pyautogui 可以使用免费的CI系统 在云端windows机器上面运行程序

利用动漫素材来源定位网站可以锁定剪辑位置 裁剪时间长度要控制 只选取匹配度高的 NSFW的不要 另外图像尺寸要合适 要正好是视频截图 注意网上的图片不一定是视频截图 最好直接在视频里面找 不要裁剪 图片可能加了一些番剧没有的字符或者装饰 (saucenao>75 (能识别出来老番 比如“没有钱” 但是老番一般没啥人做种 下载可能很慢 不如直接放弃 有几率搜出来pixiv的插画 显然不能拿来剪视频), trace.moe>75, both can detect latest (ongoing) bangume, select top-most) 如果匹配度不高就算了 找下一个 即使匹配度高也要充分怀疑 同一段视频的某段区域 多截图几次 如果出来的不是同一个番 或者不是同一个番的同一集 或者不是连续的时间段 (分别探讨以上情况 如果是番剧的开始/结束片段那么可能同时出现在多个分集里面 如果确实是开头公用的画面 必然会反复出现相同番剧的名字 在这种情况下 优先选取之前已经下载过的视频) 那么就说明结果不对头 即使验证通过 也得对剪出来的片段进行二次验证 检测片段是否存在那个画面 当然对于快速切换画面的 确实有大量不同番剧片段出现在同一个视频的 那就有待进一步探讨了

saucenao json api wrapper (python)

saucenao api keys found on github:

1
2
api_key = "6ccf5333e9c875421ff0764e2ed0c0cde1e3a0c7"

这种种子文件下载得到的视频 往往带有字体文件 可以收集用来做视频 封面设计

番剧搜索引擎里面出现的问题 比如不同番剧相似画面的相似度不应该那么高 可以通过自监督强化学习解决 另外画面裁剪的问题 (画中画 裁剪小了或者大了 或者有画面延伸) 都需要进一步改进 最主要的还是要有大量的 不断更新的数据 当然目前来看这些不需要处理

因为大家都喜欢看中文字幕 (谁听得懂日语 或者一边听日语一边看英文字幕啊) 尽量不用国外的片源 如果只有国外的 直接机器翻译能找到的公开字幕 或者直接语音转文字 图片转文字 不过话说回来 种子下载慢 国内网站广告又多 如果能单独下载字幕 (vcb的有单独分开的字幕可以下载) 对得上时间长度的话 就可以获取到带字幕的老番

parse and extract subtitle files from mkv video using mkvmerge or ffmpeg

videocr: extract hard-coded subtitles from video by OCR

extract-subtitles 帧间差分法识别关键帧

anime downloaders: (hard to find chinese subtitles huh?)

animdl supports time ranges

monkey-dl

ani-cli (animixplay is gone, fixing?)

gogoanime-api in which you may not get raw video with japanese dub

jerry with subtitle language specification

下载下来之后 得到视频字幕 进行标记 (打上标签) 方便以后创作类似视频的时候查找 以及作为数据集 训练模型 根据字幕/弹幕 (弹幕得去b站找并且自行提取) 或者结合视频内容 (算力够么 需要人肉标记 还是反复调用识图API进行标记 或者用jina (fine-tuned?) 计算图像相似度) 预测不同类型高能片段的标签

老番可以在国内番剧网站寻找 b站有免费的那么可以尝试下载

tracker list for anime

种子站要能够根据seeder降序排序 vcb的一般seeder会很多 但是其他字幕组的新番即使seeder比较少 下载速度也会很快 看情况而定 vcb只负责压制 其他字幕组提供单独分开的字幕 两者要单独下载 Nyaa支持该功能 Nyaa API 这个站将番剧分类为原盘 英文翻译版 (这个分类经常会把多语言版本分类到这个区域) 其他语言翻译版 中文翻译属于其他语言翻译版 如果要找中文翻译版本 先选定类型 然后查找文件名是否包含指定代号 有字幕文件的话先下载看看 检测下主语言类别

aria2c can be controlled via python (to make sure it will exit immediately after finishing download instead of seeding and blocking, though can be achieved with some tweaks on commandline arguments to execute command after download finished signal emitted): aria2p (can be used both as a library or cli program), pyaria2 (old) searching aria2 in github, i found some repos relating to baidunetdisk.

国内番剧种子站去找片源 (这些站基本一个样) 新番下载较快 老番下载会非常慢 几乎龟速 (检查有没有seeder 一个都没有就别想下了 直接放弃 以及监控下载进度 一段时间没有进度基本凉了) 而不是一些在线观看的网站 (视频不清晰 还有广告在里面) 由于没法用yt-dlp选取段落下载 (但是webtorrent可以) 最好用云电脑下载然后回传 关掉aria2c的做种选项 下完自动关闭 如果是合集 需要选择指定的对象进行下载

1
2
3
aria2c --show-files target.torrent
aria2c -x 16 --file-allocation=none --select-file=<file_index> target.torrent

得到了番剧命名格式之后建议利用第三方搜索引擎搜索

这些种子站一般都会把新番做成rss 用来订阅 做新番推荐比较合适 需要找到番剧介绍的文章来转化 资源的名称遵循某种格式 番剧名称会用不同语言标注 提示字幕的格式 番剧番号用空格 英文或者中文括号括住 一般至少两位数 小于两位会补零 海边的异乡人之类的只有一集 没有episode提示

如果要实时看云电脑的进度可以自己搭建一个netprogressbar server 根据约定好的url和密码 (read-only and write-only password, or both, by setting different privilege) 来上报和接收进度 server要及时回收资源

番剧信息包括名称 类型 标签 具体第几话 单季和多季有别 如果是多季的话需要研究如何找出来 提取名字要完整 如果有续集 (比如”Yahari Ore no Seishun Lovecome wa Machigatte Iru.”) 那么要改进parse逻辑 准确识别 (要么在番剧名字alias识别上下功夫 要么找到续集名字 过滤掉续集名字并保留alias名字 看看名字之间是不是有包含关系 没包含关系就不用过滤 到anidb.net找)

anidb搜索有时会直接跳转到指定番剧页面 需要根据链接地址和内容判断是否存在跳转 以及如何分别进行解析

anilist python wiki

anilist api v2 docs

提取画面中动漫人物信息以及所属番剧的网站 Python API 只支持日漫 该网站在b站的使用方法介绍 注册码目前是hello2023 可以用来做单个人物合集 在发送截图之前先用模型扫描一下到底有没有动漫人脸 如果没有就不用上传了 识别不出来

trailer也可以用来训练视频摘要模型 提取番剧精彩片段 可以作为素材

Read More

2023-01-15
Apfs For Linux

i use this adapter to transfer files (you know that) to kali.

read only support. if write then the filesystem will break.

apfs-fuse read-only, single executable, no kernel module

linux-apfs-rw kernel module, read/write support

Read More

2023-01-15
Library Genesis, Getting Latest Ebooks For Free

a russian ebook search engine

don’t get confused. it is always in foreign language. always not “educational” or “scanned”.

query like “national geographic” will be perfect. books from amazon kindle will also be potentially good.

Read More

2023-01-15
torrent search engines

general torrent searching

torrenthunt is a telegram bot which can search several torrent search engines. you can use it directly

torrent search api: a multi torrent search api in nodejs

notflix search for magnet links on 1337x and stream/play it with peerflix

anime torrent searching

Nyaa which supports sorting

Bangume.moe

动漫花园 可以订阅单个页面rss 但是不会全局排序

Read More

2023-01-15
Opentimelineio: Unified Format For Media Editors?

similar language like mine is named as “medialang”, with very stupid syntax (thus might limit expressiveness) and lacks visualization tool.

it offers many adapters for final cut pro, adobe premiere, kdenlive and more.

it has simple python interface.

but! many adapters are incomplete right now.

limited otio mlt adapter

Read More

2023-01-14
正方教务系统Sql注入

通过url遍历得到asmx结尾的url进行注入 如果你要进行报复学校这个看起来很不错

Read More