open-simulation-platform / libcosimpy Goto Github PK
View Code? Open in Web Editor NEWPython wrapper for libcosim
License: Mozilla Public License 2.0
Python wrapper for libcosim
License: Mozilla Public License 2.0
Variables does currently have to be referred to by their id to be monitored with a observer or edited by a manipulator. Finding the id requires the user to unzip the FMU. Indexes can also change if additonal inputs and outputs are added and the FMU recreated.
Enhancement suggestion is to fetch all input, output and parameter names and create a mapping between name and index when the model is first created and use variable name instead of index for referencing.
This would also allow data type specific functions such as slave_integer_values
to be replaced with general functions such as slave_values
.
To support conan2, need to merge and publish open-simulation-platform/libcosimc#58
There should be some instructions on how to use the core functionality. Tests do contain example usage, however I would argue the README should give some more guidance.
Slaves within a execution are kept track of using indices. This mimics the wrapped libcosimc
functions closely, however this is not very intuitive for a Python programmer.
A potential enhancement to usablility is to create a object holding the index to allow slaves to be referred to as objects
There is currently a singular parent class for CosimManipulator
, CosimObserver
and CosimExecution
objects. Initializing each of them currently uses a non-Pythonic [ClassName].from_[specific_object]
or [ClassName].create_[specific_object]
approach.
This enhancement would also allow functions such as start_time_series
to be renamed to start
while making it more intuitive to use (all functions within a class will be relevant and can be applied to the object).
Suggested parent class and new child class split:
CosimManipulator
-> OverrideManipulator, ScenarioManagerManipulator
CosimObserver
-> LastValueObserver, ToDirectoryObserver, TimeSeriesObserver
CosimExecution
-> CosimExecution, OspConfigExecution, SspExecution
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.