PyDiffGame 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pydiffgame-0.1.2/.github/workflows/python-publish.yml +70 -0
- pydiffgame-0.1.2/CITATIONS.bib +23 -0
- pydiffgame-0.1.2/CODE_OF_CONDUCT.md +128 -0
- pydiffgame-0.1.2/CONTRIBUTING.md +18 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/LICENSE +1 -1
- {PyDiffGame-0.1.1/src/PyDiffGame.egg-info → pydiffgame-0.1.2}/PKG-INFO +46 -35
- PyDiffGame-0.1.1/PKG-INFO → pydiffgame-0.1.2/README.md +39 -42
- pydiffgame-0.1.2/_config.yml +10 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2/docs}/README.md +11 -13
- pydiffgame-0.1.2/images/Logo_ISTRC_Green_English.png +0 -0
- pydiffgame-0.1.2/images/logo.png +0 -0
- pydiffgame-0.1.2/images/logo_abc.png +0 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/pyproject.toml +13 -5
- pydiffgame-0.1.2/requirements.txt +6 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/ContinuousPyDiffGame.py +2 -2
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/DiscretePyDiffGame.py +8 -9
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/PyDiffGame.py +19 -12
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/PyDiffGameLQRComparison.py +9 -10
- pydiffgame-0.1.2/src/PyDiffGame/examples/InvertedPendulumComparison.py +257 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/MassesWithSpringsComparison.py +218 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/PVTOL.py +222 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/PVTOLComparison.py +111 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/QuadRotorControl.py +548 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/2/2-players_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/2/2-players_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/2/LQR_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/2/LQR_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/2/two_masses_tikz.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/4/4-players_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/4/4-players_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/4/LQR_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/4/LQR_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/8/8-players_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/8/8-players_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/8/LQR_large_1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/8/LQR_large_2.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL/PVTOL1.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL/PVTOL10.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL/PVTOL100.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL/PVTOL1000.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL0001.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL001.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL01.png +0 -0
- pydiffgame-0.1.2/src/PyDiffGame/examples/figures/PVTOL1.png +0 -0
- PyDiffGame-0.1.1/setup.cfg +0 -4
- PyDiffGame-0.1.1/setup.py +0 -26
- PyDiffGame-0.1.1/src/PyDiffGame.egg-info/SOURCES.txt +0 -15
- PyDiffGame-0.1.1/src/PyDiffGame.egg-info/dependency_links.txt +0 -1
- PyDiffGame-0.1.1/src/PyDiffGame.egg-info/top_level.txt +0 -1
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/LQR.py +0 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/Objective.py +0 -0
- {PyDiffGame-0.1.1 → pydiffgame-0.1.2}/src/PyDiffGame/__init__.py +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# This workflow will upload a Python Package to PyPI when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
release:
|
|
13
|
+
types: [published]
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: read
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
release-build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- uses: actions/setup-python@v5
|
|
26
|
+
with:
|
|
27
|
+
python-version: "3.10"
|
|
28
|
+
|
|
29
|
+
- name: Build release distributions
|
|
30
|
+
run: |
|
|
31
|
+
# NOTE: put your own distribution build steps here.
|
|
32
|
+
python -m pip install build
|
|
33
|
+
python -m build
|
|
34
|
+
|
|
35
|
+
- name: Upload distributions
|
|
36
|
+
uses: actions/upload-artifact@v4
|
|
37
|
+
with:
|
|
38
|
+
name: release-dists
|
|
39
|
+
path: dist/
|
|
40
|
+
|
|
41
|
+
pypi-publish:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
needs:
|
|
44
|
+
- release-build
|
|
45
|
+
permissions:
|
|
46
|
+
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
47
|
+
id-token: write
|
|
48
|
+
|
|
49
|
+
# Dedicated environments with protections for publishing are strongly recommended.
|
|
50
|
+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
|
|
51
|
+
environment:
|
|
52
|
+
name: pypi
|
|
53
|
+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
|
|
54
|
+
url: https://pypi.org/project/PyDiffGame/
|
|
55
|
+
#
|
|
56
|
+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
|
|
57
|
+
# ALTERNATIVE: exactly, uncomment the following line instead:
|
|
58
|
+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
|
|
59
|
+
|
|
60
|
+
steps:
|
|
61
|
+
- name: Retrieve release distributions
|
|
62
|
+
uses: actions/download-artifact@v4
|
|
63
|
+
with:
|
|
64
|
+
name: release-dists
|
|
65
|
+
path: dist/
|
|
66
|
+
|
|
67
|
+
- name: Publish release distributions to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
69
|
+
with:
|
|
70
|
+
packages-dir: dist/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@software{pydiffgame_package,
|
|
2
|
+
author = {Kricheli, Joshua Shay and Sadon, Aviran},
|
|
3
|
+
title = {{PyDiffGame}},
|
|
4
|
+
howpublished = {\url{https://krichelj.github.io/PyDiffGame/}},
|
|
5
|
+
year = {2021},
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
@inproceedings{pydiffgame_paper,
|
|
9
|
+
author={Kricheli, Joshua Shay and Sadon, Aviran and Arogeti, Shai and Regev, Shimon and Weiss, Gera},
|
|
10
|
+
booktitle={29th Mediterranean Conference on Control and Automation (MED 2021)},
|
|
11
|
+
title={{Composition of Dynamic Control Objectives Based on Differential Games}},
|
|
12
|
+
year={2021},
|
|
13
|
+
volume={},
|
|
14
|
+
number={},
|
|
15
|
+
pages={298-304},
|
|
16
|
+
doi={10.1109/MED51440.2021.9480269}}
|
|
17
|
+
|
|
18
|
+
@mastersthesis{kricheli2022differential,
|
|
19
|
+
title={{Differential Games for Compositional Handling of Competing Control Tasks}},
|
|
20
|
+
author={Kricheli, Joshua Shay},
|
|
21
|
+
year={2022},
|
|
22
|
+
school={Ben-Gurion University of the Negev}
|
|
23
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
+
and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
+
overall community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
+
advances of any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email
|
|
35
|
+
address, without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series
|
|
86
|
+
of actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or
|
|
93
|
+
permanent ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
+
the community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.0, available at
|
|
119
|
+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
+
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
+
|
|
124
|
+
[homepage]: https://www.contributor-covenant.org
|
|
125
|
+
|
|
126
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
+
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
+
https://www.contributor-covenant.org/translations.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Contribution Guidelines
|
|
2
|
+
|
|
3
|
+
This repo is part of a research conducted at Ben Gurion University,
|
|
4
|
+
and is thus open source. We would love to receive your input!
|
|
5
|
+
|
|
6
|
+
Please ensure your pull request adheres to the following guidelines:
|
|
7
|
+
|
|
8
|
+
- Search previous suggestions before making a new one, as yours may be a duplicate.
|
|
9
|
+
- Make sure your link is useful before submitting.
|
|
10
|
+
- Make an individual pull request for each suggestion.
|
|
11
|
+
- New categories or improvements to the existing categorization are welcome.
|
|
12
|
+
- Check your spelling and grammar.
|
|
13
|
+
- Make sure your text editor is set to remove trailing whitespace.
|
|
14
|
+
- The pull request and commit should have a useful title.
|
|
15
|
+
|
|
16
|
+
Thank you for your suggestions!
|
|
17
|
+
|
|
18
|
+
Joshua Shay Kricheli
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2021-
|
|
3
|
+
Copyright (c) 2021-2024 Joshua Shay Kricheli, Dr. Aviran Sadon, Dr. Shai Arogeti and Prof. Gera Weiss
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: PyDiffGame
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: PyDiffGame is a Python implementation of a Nash Equilibrium solution to Differential Games, based on a reduction of Game Hamilton-Bellman-Jacobi (GHJB) equations to Game Algebraic and Differential Riccati equations, associated with Multi-Objective Dynamical Control Systems
|
|
5
|
-
|
|
6
|
-
Author: Dr. Aviran Sadon, Joshua Shay Kricheli and Prof. Gera Weiss
|
|
7
|
-
Author-email: Joshua Shay Kricheli <skricheli2@gmail.com>
|
|
8
|
-
Project-URL: Homepage, https://shaykricheli.com/PyDiffGame/
|
|
5
|
+
Project-URL: Homepage, https://krichelj.github.io/PyDiffGame/
|
|
9
6
|
Project-URL: Bug Tracker, https://github.com/krichelj/PyDiffGame/issues
|
|
10
|
-
|
|
7
|
+
Author-email: Joshua Shay Kricheli <skricheli2@gmail.com>
|
|
8
|
+
License-File: LICENSE
|
|
11
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
12
10
|
Classifier: Operating System :: OS Independent
|
|
13
|
-
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Requires-Python: >=3.10
|
|
14
13
|
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE
|
|
16
14
|
|
|
17
15
|
<p align="center">
|
|
18
16
|
<img alt="Logo" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/logo.png"/>
|
|
19
17
|
</p>
|
|
20
18
|
|
|
19
|
+
[](https://opensource.org/licenses/MIT) [](https://github.com/krichelj/PyDiffGame/actions/workflows/python-publish.yml) [](https://github.com/krichelj/PyDiffGame/actions/workflows/pages/pages-build-deployment)
|
|
20
|
+
|
|
21
|
+
|
|
21
22
|
* [What is this?](#what-is-this)
|
|
22
|
-
* [
|
|
23
|
+
* [Installation](#installation)
|
|
23
24
|
* [Input Parameters](#input-parameters)
|
|
24
25
|
* [Tutorial](#tutorial)
|
|
26
|
+
* [Authors](#authors)
|
|
25
27
|
* [Acknowledgments](#acknowledgments)
|
|
26
28
|
|
|
27
29
|
# What is this?
|
|
@@ -36,16 +38,7 @@ The method relies on the formulation given in:
|
|
|
36
38
|
([IEEE](https://ieeexplore.ieee.org/document/9480269) |
|
|
37
39
|
[Research Gate](https://www.researchgate.net/publication/353452024_Composition_of_Dynamic_Control_Objectives_Based_on_Differential_Games))
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
@conference{med_paper,
|
|
42
|
-
author={Kricheli, Joshua Shay and Sadon, Aviran and Arogeti, Shai and Regev, Shimon and Weiss, Gera},
|
|
43
|
-
booktitle={29th Mediterranean Conference on Control and Automation (MED)},
|
|
44
|
-
title={{Composition of Dynamic Control Objectives Based on Differential Games}},
|
|
45
|
-
year={2021},
|
|
46
|
-
pages={298-304},
|
|
47
|
-
doi={10.1109/MED51440.2021.9480269}}
|
|
48
|
-
```
|
|
41
|
+
The package was tested for Python >= 3.10.
|
|
49
42
|
|
|
50
43
|
# Installation
|
|
51
44
|
|
|
@@ -63,7 +56,7 @@ The input parameters to instantiate a `PyDiffGame` object are:
|
|
|
63
56
|
|
|
64
57
|
* `A` : `np.array` of shape $(n,n)$
|
|
65
58
|
>System dynamics matrix
|
|
66
|
-
* `B` : `np.array` of shape
|
|
59
|
+
* `B` : `np.array` of shape $(n, m_1 + ... + m_N)$, optional
|
|
67
60
|
>Input matrix for all virtual control objectives
|
|
68
61
|
* `Bs` : `Sequence` of `np.array` objects of len $(N)$, each array $B_i$ of shape $(n,m_i)$, optional
|
|
69
62
|
>Input matrices for each virtual control objective
|
|
@@ -246,7 +239,6 @@ masses_with_springs(plot_state_spaces=True,
|
|
|
246
239
|
save_figure=True)
|
|
247
240
|
```
|
|
248
241
|
|
|
249
|
-
Refer
|
|
250
242
|
This will result in the following plot that compares the two systems performance for a differential game vs an LQR:
|
|
251
243
|
|
|
252
244
|
<p align="center">
|
|
@@ -268,28 +260,47 @@ we have:
|
|
|
268
260
|
<img align=top src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/src/PyDiffGame/examples/figures/2/LQR_large_2.png" width="400" height="300"/>
|
|
269
261
|
</p>
|
|
270
262
|
|
|
263
|
+
# Authors
|
|
264
|
+
|
|
265
|
+
If you use this work, please cite our paper:
|
|
266
|
+
```
|
|
267
|
+
@inproceedings{pydiffgame_paper,
|
|
268
|
+
author={Kricheli, Joshua Shay and Sadon, Aviran and Arogeti, Shai and Regev, Shimon and Weiss, Gera},
|
|
269
|
+
booktitle={29th Mediterranean Conference on Control and Automation (MED 2021)},
|
|
270
|
+
title={{Composition of Dynamic Control Objectives Based on Differential Games}},
|
|
271
|
+
year={2021},
|
|
272
|
+
volume={},
|
|
273
|
+
number={},
|
|
274
|
+
pages={298-304},
|
|
275
|
+
doi={10.1109/MED51440.2021.9480269}}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Further details can be found in the [citation document](CITATIONS.bib).
|
|
271
279
|
|
|
272
280
|
# Acknowledgments
|
|
273
281
|
|
|
274
|
-
This research was supported in part by the Helmsley Charitable Trust through the
|
|
275
|
-
This research was also supported by The
|
|
282
|
+
This research was supported in part by the Leona M. and Harry B. Helmsley Charitable Trust through the '_Agricultural, Biological and Cognitive Robotics Initiative_' ('ABC') and by the Marcus Endowment Fund both at Ben-Gurion University of the Negev, Israel.
|
|
283
|
+
This research was also supported by The '_Israeli Smart Transportation Research Center_' ('ISTRC') by The Technion and Bar-Ilan Universities, Israel.
|
|
276
284
|
|
|
277
285
|
<p align="center">
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
 
|
|
282
|
-
 
|
|
283
|
-
 
|
|
286
|
+
<a href="https://istrc.net.technion.ac.il/">
|
|
287
|
+
<img src="https://github.com/krichelj/PyDiffGame/blob/master/images/Logo_ISTRC_Green_English.png?raw=true" width="233" alt=""/>
|
|
288
|
+
</a>
|
|
284
289
|
 
|
|
285
290
|
<a href="https://in.bgu.ac.il/en/Pages/default.aspx">
|
|
286
|
-
<
|
|
291
|
+
<picture>
|
|
292
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZ8GbtJiX8lNUygX7-inRBuWESK438jWbRjQ&s">
|
|
293
|
+
<source media="(prefers-color-scheme: light)" srcset="https://tamrur.bgu.ac.il/restore/BGU.sig.png">
|
|
294
|
+
<img alt="BGU Logo" src="https://tamrur.bgu.ac.il/restore/BGU.sig.png" width="233" class="bgu-logo-dark">
|
|
295
|
+
</picture>
|
|
287
296
|
</a>
|
|
288
297
|
 
|
|
289
298
|
 
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
<
|
|
299
|
+
<a href="https://helmsleytrust.org/">
|
|
300
|
+
<picture>
|
|
301
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-white.png">
|
|
302
|
+
<source media="(prefers-color-scheme: light)" srcset="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-blue.png">
|
|
303
|
+
<img alt="Helmsley Charitable Trust" src="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-blue.png" width="233">
|
|
304
|
+
</picture>
|
|
294
305
|
</a>
|
|
295
306
|
</p>
|
|
@@ -1,27 +1,15 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: PyDiffGame
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: PyDiffGame is a Python implementation of a Nash Equilibrium solution to Differential Games, based on a reduction of Game Hamilton-Bellman-Jacobi (GHJB) equations to Game Algebraic and Differential Riccati equations, associated with Multi-Objective Dynamical Control Systems
|
|
5
|
-
Home-page: https://shaykricheli.com/PyDiffGame/
|
|
6
|
-
Author: Dr. Aviran Sadon, Joshua Shay Kricheli and Prof. Gera Weiss
|
|
7
|
-
Author-email: Joshua Shay Kricheli <skricheli2@gmail.com>
|
|
8
|
-
Project-URL: Homepage, https://shaykricheli.com/PyDiffGame/
|
|
9
|
-
Project-URL: Bug Tracker, https://github.com/krichelj/PyDiffGame/issues
|
|
10
|
-
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Requires-Python: >=3.7
|
|
14
|
-
Description-Content-Type: text/markdown
|
|
15
|
-
License-File: LICENSE
|
|
16
|
-
|
|
17
1
|
<p align="center">
|
|
18
2
|
<img alt="Logo" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/logo.png"/>
|
|
19
3
|
</p>
|
|
20
4
|
|
|
5
|
+
[](https://opensource.org/licenses/MIT) [](https://github.com/krichelj/PyDiffGame/actions/workflows/python-publish.yml) [](https://github.com/krichelj/PyDiffGame/actions/workflows/pages/pages-build-deployment)
|
|
6
|
+
|
|
7
|
+
|
|
21
8
|
* [What is this?](#what-is-this)
|
|
22
|
-
* [
|
|
9
|
+
* [Installation](#installation)
|
|
23
10
|
* [Input Parameters](#input-parameters)
|
|
24
11
|
* [Tutorial](#tutorial)
|
|
12
|
+
* [Authors](#authors)
|
|
25
13
|
* [Acknowledgments](#acknowledgments)
|
|
26
14
|
|
|
27
15
|
# What is this?
|
|
@@ -36,16 +24,7 @@ The method relies on the formulation given in:
|
|
|
36
24
|
([IEEE](https://ieeexplore.ieee.org/document/9480269) |
|
|
37
25
|
[Research Gate](https://www.researchgate.net/publication/353452024_Composition_of_Dynamic_Control_Objectives_Based_on_Differential_Games))
|
|
38
26
|
|
|
39
|
-
|
|
40
|
-
```
|
|
41
|
-
@conference{med_paper,
|
|
42
|
-
author={Kricheli, Joshua Shay and Sadon, Aviran and Arogeti, Shai and Regev, Shimon and Weiss, Gera},
|
|
43
|
-
booktitle={29th Mediterranean Conference on Control and Automation (MED)},
|
|
44
|
-
title={{Composition of Dynamic Control Objectives Based on Differential Games}},
|
|
45
|
-
year={2021},
|
|
46
|
-
pages={298-304},
|
|
47
|
-
doi={10.1109/MED51440.2021.9480269}}
|
|
48
|
-
```
|
|
27
|
+
The package was tested for Python >= 3.10.
|
|
49
28
|
|
|
50
29
|
# Installation
|
|
51
30
|
|
|
@@ -63,7 +42,7 @@ The input parameters to instantiate a `PyDiffGame` object are:
|
|
|
63
42
|
|
|
64
43
|
* `A` : `np.array` of shape $(n,n)$
|
|
65
44
|
>System dynamics matrix
|
|
66
|
-
* `B` : `np.array` of shape
|
|
45
|
+
* `B` : `np.array` of shape $(n, m_1 + ... + m_N)$, optional
|
|
67
46
|
>Input matrix for all virtual control objectives
|
|
68
47
|
* `Bs` : `Sequence` of `np.array` objects of len $(N)$, each array $B_i$ of shape $(n,m_i)$, optional
|
|
69
48
|
>Input matrices for each virtual control objective
|
|
@@ -246,7 +225,6 @@ masses_with_springs(plot_state_spaces=True,
|
|
|
246
225
|
save_figure=True)
|
|
247
226
|
```
|
|
248
227
|
|
|
249
|
-
Refer
|
|
250
228
|
This will result in the following plot that compares the two systems performance for a differential game vs an LQR:
|
|
251
229
|
|
|
252
230
|
<p align="center">
|
|
@@ -268,28 +246,47 @@ we have:
|
|
|
268
246
|
<img align=top src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/src/PyDiffGame/examples/figures/2/LQR_large_2.png" width="400" height="300"/>
|
|
269
247
|
</p>
|
|
270
248
|
|
|
249
|
+
# Authors
|
|
250
|
+
|
|
251
|
+
If you use this work, please cite our paper:
|
|
252
|
+
```
|
|
253
|
+
@inproceedings{pydiffgame_paper,
|
|
254
|
+
author={Kricheli, Joshua Shay and Sadon, Aviran and Arogeti, Shai and Regev, Shimon and Weiss, Gera},
|
|
255
|
+
booktitle={29th Mediterranean Conference on Control and Automation (MED 2021)},
|
|
256
|
+
title={{Composition of Dynamic Control Objectives Based on Differential Games}},
|
|
257
|
+
year={2021},
|
|
258
|
+
volume={},
|
|
259
|
+
number={},
|
|
260
|
+
pages={298-304},
|
|
261
|
+
doi={10.1109/MED51440.2021.9480269}}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Further details can be found in the [citation document](CITATIONS.bib).
|
|
271
265
|
|
|
272
266
|
# Acknowledgments
|
|
273
267
|
|
|
274
|
-
This research was supported in part by the Helmsley Charitable Trust through the
|
|
275
|
-
This research was also supported by The
|
|
268
|
+
This research was supported in part by the Leona M. and Harry B. Helmsley Charitable Trust through the '_Agricultural, Biological and Cognitive Robotics Initiative_' ('ABC') and by the Marcus Endowment Fund both at Ben-Gurion University of the Negev, Israel.
|
|
269
|
+
This research was also supported by The '_Israeli Smart Transportation Research Center_' ('ISTRC') by The Technion and Bar-Ilan Universities, Israel.
|
|
276
270
|
|
|
277
271
|
<p align="center">
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
 
|
|
282
|
-
 
|
|
283
|
-
 
|
|
272
|
+
<a href="https://istrc.net.technion.ac.il/">
|
|
273
|
+
<img src="https://github.com/krichelj/PyDiffGame/blob/master/images/Logo_ISTRC_Green_English.png?raw=true" width="233" alt=""/>
|
|
274
|
+
</a>
|
|
284
275
|
 
|
|
285
276
|
<a href="https://in.bgu.ac.il/en/Pages/default.aspx">
|
|
286
|
-
<
|
|
277
|
+
<picture>
|
|
278
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZ8GbtJiX8lNUygX7-inRBuWESK438jWbRjQ&s">
|
|
279
|
+
<source media="(prefers-color-scheme: light)" srcset="https://tamrur.bgu.ac.il/restore/BGU.sig.png">
|
|
280
|
+
<img alt="BGU Logo" src="https://tamrur.bgu.ac.il/restore/BGU.sig.png" width="233" class="bgu-logo-dark">
|
|
281
|
+
</picture>
|
|
287
282
|
</a>
|
|
288
283
|
 
|
|
289
284
|
 
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
<
|
|
293
|
-
<
|
|
285
|
+
<a href="https://helmsleytrust.org/">
|
|
286
|
+
<picture>
|
|
287
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-white.png">
|
|
288
|
+
<source media="(prefers-color-scheme: light)" srcset="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-blue.png">
|
|
289
|
+
<img alt="Helmsley Charitable Trust" src="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-blue.png" width="233">
|
|
290
|
+
</picture>
|
|
294
291
|
</a>
|
|
295
292
|
</p>
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
<img alt="Logo" src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/logo.png"/>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
+
[](https://github.com/krichelj/PyDiffGame/actions/workflows/pages/pages-build-deployment)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
5
8
|
* [What is this?](#what-is-this)
|
|
6
9
|
* [Local Installation](#local-installation)
|
|
7
10
|
* [Input Parameters](#input-parameters)
|
|
@@ -47,7 +50,7 @@ The input parameters to instantiate a `PyDiffGame` object are:
|
|
|
47
50
|
|
|
48
51
|
* `A` : `np.array` of shape $(n,n)$
|
|
49
52
|
>System dynamics matrix
|
|
50
|
-
* `B` : `np.array` of shape
|
|
53
|
+
* `B` : `np.array` of shape $(n, m_1 + ... + m_N)$, optional
|
|
51
54
|
>Input matrix for all virtual control objectives
|
|
52
55
|
* `Bs` : `Sequence` of `np.array` objects of len $(N)$, each array $B_i$ of shape $(n,m_i)$, optional
|
|
53
56
|
>Input matrices for each virtual control objective
|
|
@@ -255,25 +258,20 @@ we have:
|
|
|
255
258
|
|
|
256
259
|
# Acknowledgments
|
|
257
260
|
|
|
258
|
-
This research was supported in part by the Helmsley Charitable Trust through the Agricultural, Biological and Cognitive Robotics Initiative and by the Marcus Endowment Fund both at Ben-Gurion University of the Negev, Israel.
|
|
261
|
+
This research was supported in part by the Leona M. and Harry B. Helmsley Charitable Trust through the Agricultural, Biological and Cognitive Robotics Initiative and by the Marcus Endowment Fund both at Ben-Gurion University of the Negev, Israel.
|
|
259
262
|
This research was also supported by The Israeli Smart Transportation Research Center (ISTRC) by The Technion and Bar-Ilan Universities, Israel.
|
|
260
263
|
|
|
261
264
|
<p align="center">
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
 
|
|
266
|
-
 
|
|
267
|
-
 
|
|
265
|
+
<a href="https://istrc.net.technion.ac.il/">
|
|
266
|
+
<img src="https://github.com/krichelj/PyDiffGame/blob/master/images/Logo_ISTRC_Green_English.png?raw=true" width="233" alt=""/>
|
|
267
|
+
</a>
|
|
268
268
|
 
|
|
269
269
|
<a href="https://in.bgu.ac.il/en/Pages/default.aspx">
|
|
270
|
-
<img src="https://
|
|
270
|
+
<img alt="BGU Logo" src="https://tamrur.bgu.ac.il/restore/BGU.sig.png" width="233">
|
|
271
271
|
</a>
|
|
272
272
|
 
|
|
273
273
|
 
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
<a href="https://in.bgu.ac.il/en/robotics/Pages/default.aspx">
|
|
277
|
-
<img src="https://raw.githubusercontent.com/krichelj/PyDiffGame/master/images/logo_abc.png" width="180" alt=""/>
|
|
274
|
+
<a href="https://helmsleytrust.org/">
|
|
275
|
+
<img alt="Helmsley Charitable Trust" src="https://helmsleytrust.org/wp-content/themes/helmsley/assets/img/helmsley-charitable-trust-logo-blue.png" width="233">
|
|
278
276
|
</a>
|
|
279
277
|
</p>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
1
5
|
[project]
|
|
2
6
|
name = "PyDiffGame"
|
|
3
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.2"
|
|
4
8
|
authors = [
|
|
5
|
-
{ name="Joshua Shay Kricheli", email="skricheli2@gmail.com" }
|
|
9
|
+
{ name="Joshua Shay Kricheli", email="skricheli2@gmail.com" }
|
|
6
10
|
]
|
|
7
11
|
description = "PyDiffGame is a Python implementation of a Nash Equilibrium solution to Differential Games, based on a reduction of Game Hamilton-Bellman-Jacobi (GHJB) equations to Game Algebraic and Differential Riccati equations, associated with Multi-Objective Dynamical Control Systems"
|
|
8
12
|
readme = "README.md"
|
|
9
|
-
requires-python = ">=3.
|
|
13
|
+
requires-python = ">=3.10"
|
|
10
14
|
classifiers = [
|
|
11
15
|
"Programming Language :: Python :: 3",
|
|
12
16
|
"License :: OSI Approved :: MIT License",
|
|
@@ -14,5 +18,9 @@ classifiers = [
|
|
|
14
18
|
]
|
|
15
19
|
|
|
16
20
|
[project.urls]
|
|
17
|
-
"Homepage" = "https://
|
|
18
|
-
"Bug Tracker" = "https://github.com/krichelj/PyDiffGame/issues"
|
|
21
|
+
"Homepage" = "https://krichelj.github.io/PyDiffGame/"
|
|
22
|
+
"Bug Tracker" = "https://github.com/krichelj/PyDiffGame/issues"
|
|
23
|
+
|
|
24
|
+
# Specify where your source code is located
|
|
25
|
+
[tool.hatch.build.targets.wheel]
|
|
26
|
+
packages = ["src/PyDiffGame"] # Replace with the actual path to your package
|
|
@@ -4,7 +4,7 @@ import sys
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
from scipy.integrate import odeint
|
|
6
6
|
from numpy.linalg import eigvals, inv
|
|
7
|
-
from typing import Sequence, Optional
|
|
7
|
+
from typing import Sequence, Optional, Union
|
|
8
8
|
|
|
9
9
|
from PyDiffGame.PyDiffGame import PyDiffGame
|
|
10
10
|
from PyDiffGame.Objective import Objective
|
|
@@ -30,7 +30,7 @@ class ContinuousPyDiffGame(PyDiffGame):
|
|
|
30
30
|
x_0: Optional[np.array] = None,
|
|
31
31
|
x_T: Optional[np.array] = None,
|
|
32
32
|
T_f: Optional[float] = None,
|
|
33
|
-
P_f: Optional[Sequence[np.array]
|
|
33
|
+
P_f: Optional[Union[Sequence[np.array], np.array]] = None,
|
|
34
34
|
show_legend: Optional[bool] = True,
|
|
35
35
|
state_variables_names: Optional[Sequence[str]] = None,
|
|
36
36
|
epsilon_x: Optional[float] = PyDiffGame._epsilon_x_default,
|