Skip to content

Commit

Permalink
bump version: 0.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hyumo committed Oct 12, 2023
1 parent e1a63ac commit 0635fd6
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,21 @@ The following models are supported:

*Noted* that only continuous-time models are supported currently.

## Usage

## Examples

Generate a continuous-time state space FMU
Generate a continuous-time state space FMU.

```bash
qfmu ss -A "[[1,2],[3,4]]" -B "[[1],[2]]" -C "[[1,0],[0,1]]" -x0 "[3.14, 6]" -o ./q.fmu
```

If `qfmu` is installed properly, you should see a `q.fmu` file generated in your current working directory.

- `A`, `B`, `C` matrices are provided as `JSON` strings
- `D` matrix is automatically inferred as a `zero` matrix with the correct size.

If you have `fmpy` installed, you can run `fmpy info q.fmu` to see detailed model information.

```
Expand Down
18 changes: 14 additions & 4 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
# qfmu examples
# qfmu

## Compatibility Info
[qfmu](https://github.com/hyumo/qFMU) is a python package to generate `continuous-time`, `LTI` system FMUs from command line.

All FMUs have been exported by qFMU. The uploaded FMUs are free to be shared for cross-check purposes.
## FMU Export compatibility Info

- All example FMUs have been exported by `qFMU` (see [build.py](scripts/build.py))
- All example FMUs contain multi-platform binaries (`win64`, `linux64`, `darwin64`)
- All example FMUs are free to be shared for cross-check purposes

| model | win64 | linux64 | darwin64 |
|----------------- |------- |--------- |---------- |
| FirstOrder.fmu | ME,CS | ME,CS | ME,CS |
| SecondOrder.fmu | ME,CS | ME,CS | ME,CS |
| SISO.fmu | ME,CS | ME,CS | ME,CS |
| MIMO.fmu | ME,CS | ME,CS | ME,CS |
| MIMO.fmu | ME,CS | ME,CS | ME,CS |

### Validation Info

Validation tools

- FMPy 0.3.16
9 changes: 9 additions & 0 deletions examples/scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ def build_ss(
df[f"u{i+1}"].iloc[df.index > len(df) / 5] = 1.0
df.to_csv(in_csv_filename, index=False)

# Validate
ret = subprocess.run([
"fmpy",
"validate",
str(fmu_filename),
]).returncode
if ret != 0:
raise Exception("Validation failed")

# Simulate
sim_cmd = [
"fmpy",
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.6
current_version = 0.2.7
commit = False
tag = False

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
install_requires=install_requires,
extras_require={"dev": dev_requires},
url="https://github.com/hyumo/qfmu",
version="0.2.6",
version="0.2.7",
zip_safe=False,
)
2 changes: 1 addition & 1 deletion src/qfmu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

__author__ = """Hang Yu"""
__email__ = "yuhang.neu@gmail.com"
__version__ = "0.2.6"
__version__ = "0.2.7"

__module_path__ = pathlib.Path(__file__).parent
__template_path__ = __module_path__ / "codegen" / "templates"
Expand Down

0 comments on commit 0635fd6

Please sign in to comment.