Skip to content

Commit

Permalink
Merge remote-tracking branch 'rte/develop' into feature/reserve_model…
Browse files Browse the repository at this point in the history
…_lot3_scalian
  • Loading branch information
h-fournier committed Dec 17, 2024
2 parents cbf52c3 + 61bb933 commit cbebdc7
Show file tree
Hide file tree
Showing 438 changed files with 10,744 additions and 4,310 deletions.
1 change: 0 additions & 1 deletion .github/workflows/build-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,3 @@ jobs:
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" ${{ env.PDF_PATH }}
15 changes: 13 additions & 2 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ jobs:
run: |
echo "DOCKERFILE=$(pwd)/docker/Dockerfile" >> $GITHUB_ENV
echo "DOCKERDIR=$(pwd)/docker" >> $GITHUB_ENV
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v45
with:
files: |
docker/AntaresDeps
- name: Docker file push
id: docker_push

Expand All @@ -73,6 +77,8 @@ jobs:
run: |
echo "VCPKG_CACHE_DIR=$GITHUB_WORKSPACE/vcpkg_cache" >> $GITHUB_ENV
mkdir -p ${{ github.workspace }}/vcpkg_cache
- name: Restore vcpkg binary dir from cache
id: cache-vcpkg-binary
uses: actions/cache/restore@v4
Expand All @@ -99,6 +105,8 @@ jobs:
--build-arg CCACHE_DIR=./.ccache \
--build-arg CCACHE_KEY=centos7-on-${{ runner.os }} \
-f ${{ env.DOCKERFILE }} .
- name: create a container without starting it && retrieve the .tgz
run: |
container_id=$(docker create antares:centos7)
Expand All @@ -107,6 +115,8 @@ jobs:
docker cp $container_id:/workspace/.ccache/. .ccache
ls -la .ccache
docker rm $container_id
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
Expand All @@ -115,7 +125,7 @@ jobs:
run: |
gh release upload "$tag" archive/*.tar.gz archive/*.rpm

- name: Upload .tar.gz
uses: actions/upload-artifact@v4
with:
Expand All @@ -129,4 +139,5 @@ jobs:
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/vcpkg_cache
key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}
key: vcpkg-cache-centos7-${{ hashFiles('src/vcpkg.json', '.git/modules/vcpkg/HEAD') }}

12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,29 @@ In every *Antares Simulator* [release](https://github.com/AntaresSimulatorTeam/A
the user guide is printed to a PDF file and published in the assets. This document can be downloaded by users who
want to install *Antares Simulator* and be able to consult its documentation off-line.

In practice, the PDF is generated automatically from Markdown files under [reference-guide](./user-guide) by
In practice, the PDF is generated automatically from Markdown files under [user-guide](./user-guide) by
[Sphinx](https://www.sphinx-doc.org/) (using LaTeX). The script for this generation is in [pdf-doc-generation-with-sphinx/create_pdf_doc.sh](./pdf-doc-generation-with-sphinx/create_pdf_doc.sh);
it is automatically run by a GitHub [action](../.github/workflows/build-userguide.yml) during every release, and for
each pull request (in order to verify that the PDF builds).

While the source material used for the PDF user guide are the same as the ones used for the mkdocs website (i.e.
Markdown files under `reference-guide`), some extra source files are needed:
Markdown files under `user-guide`), some extra source files are needed:
- As for all Sphinx projects, this one needs a configuration file: [conf.py](./pdf-doc-generation-with-sphinx/source/conf.py).
This file allows you to customize the Sphinx build, in the same way mkdoks.yml allows you to customize mkdocs build.
- Sphinx navigation is built iteratively, using "index" files that refer to each other. The top-most index file is
[pdf-doc-generation-with-sphinx/source/index.rst](./pdf-doc-generation-with-sphinx/source/index.rst). It points to
[reference-guide/00-index.md](user-guide/00-index.md), which in turns points to other pages or indexes,
defining the whole navigation tree of the documentation. **This [reference-guide/00-index.md](user-guide/00-index.md)
[user-guide/00-index.md](user-guide/00-index.md), which in turns points to other pages or indexes,
defining the whole navigation tree of the documentation. **This [user-guide/00-index.md](user-guide/00-index.md)
file should be updated** in the same way mkdocs.yml is, in order to keep the navigation tree of the PDF document
synchronized with the navigation tree of the mkdocs website.

When modifying the user guide content, you can easily preview the resulting PDF on your PC by navigating to the
root of the project and running:
```bash
cd docs/pdf-doc-generation-with-sphinx
bash create_pdf_doc.sh reference-guide.pdf
bash create_pdf_doc.sh user-guide.pdf
```
Sphinx will create a `reference-guide.pdf` file in `docs/pdf-doc-generation-with-sphinx`.
Sphinx will create a `user-guide.pdf` file in `docs/pdf-doc-generation-with-sphinx`.

### Doxygen
[//]: # (TODO)
Expand Down
8 changes: 4 additions & 4 deletions docs/developer-guide/6-Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In general, [Google's coding standard](https://google.github.io/styleguide/cppguide.html) is used, and we strongly encourage to read it.

You can find all the steps needed to build & install Antares Simulator in the [documentation website](https://antares-simulator.readthedocs.io/) or [its sources](docs/developer-guide/0-Introduction.md).
You can find all the steps needed to build & install Antares Simulator in the [documentation website](https://antares-simulator.readthedocs.io/) or [its sources](https://github.com/AntaresSimulatorTeam/Antares_Simulator).

Below are our specific (but not all!) exceptions to the Google's coding standard:

Expand All @@ -19,7 +19,7 @@ Below are our specific (but not all!) exceptions to the Google's coding standard
Naming and formatting

- We ALWAYS use 4 spaces indent and don't use tabs.
- We don't have strict limits on line width, but keep it reasonable to fit on the screen. The advised width is that written in the [src/.clang-format](src/.clang-format) file (currently 100).
- We don't have strict limits on line width, but keep it reasonable to fit on the screen. The advised width is that written in the [src/.clang-format](https://github.com/AntaresSimulatorTeam/Antares_Simulator/blob/develop/src/.clang-format) file (currently 100).
- Doxygen-style comments can be used.
- Use left-to-right order for variables/params: `const string& s` (reference to the const string).
- In one line `if`, `for`, `while` we use brackets.
Expand Down Expand Up @@ -74,7 +74,7 @@ The description should be short but proportional to the length or complexity of
When a pull request is opened, please set it to draft if it is still being worked on or not ready for review.

If your Pull Request changes a part of the code that is [documented](https://antares-simulator.readthedocs.io/),
please update the documentation also, in the ["docs"](docs) directory.
please update the documentation also, in the ["docs"](https://github.com/AntaresSimulatorTeam/Antares_Simulator/tree/develop/docs) directory.

## ClangFormat

Expand All @@ -85,7 +85,7 @@ To automatically format a file, install `clang-format` and run:

clang-format 18.1.3 is the reference version, but any 18.x version should work as well. We strongly advise that you configure your IDE / text editor to automatically format code according to the clang-format style. Non-conforming code can't be merged to the develop branch.

You may also use script [src/format-code.sh](src/format-code.sh) to format all the code. Generated code (ANTLR, etc.) won't be automatically formatted.
You may also use script [src/format-code.sh](https://github.com/AntaresSimulatorTeam/Antares_Simulator/blob/develop/src/format-code.sh) to format all the code. Generated code (ANTLR, etc.) won't be automatically formatted.

## Formatting Example/Guide/Reference

Expand Down
131 changes: 131 additions & 0 deletions docs/developer-guide/Architecture/Dynamic-modeler-architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Dynamic modeler architecture

## Models
(for details about these concepts, see [this page](../../user-guide/solver/dynamic-modeler/05-model.md))

```plantuml
@startuml
class Model {
+ string id
+ Expression objective
+ map<string, Parameter> parameters
+ map<string, Variable> variables
+ map<string, Constraint> constraints
+ map<string, Port> ports
}
Model "1" *-- "0:N" Parameter
Model "1" *-- "0:N" Variable
Model "1" *-- "0:N" Constraint
Model "1" *-- "0:N" Port
Model --> Expression
class Parameter {
+ string id
+ ValueType type
+ bool timeDependent
+ bool scenarioDependent
}
Parameter "N" *-- "1" ValueType
enum ValueType {
FLOAT
INTEGER
BOOL
}
class Variable {
+ string id
+ ValueType type
+ Expression lowerBound
+ Expression upperBound
}
Variable "N" *-- "1" ValueType
Variable --> Expression
class Constraint {
+ string id
+ Expression expression
}
Constraint --> Expression
class Port {
+ string id
+ PortType type
}
Port "N" *-- "1" PortType
class PortType {
+ id
+ vector<PortField> fields
}
PortType "1" *-- "1:N" PortField
class PortField {
+ string id
}
class Expression {
+ string textualRepresentation
+ Node nodeRepresentation
}
class ModelLibrary {
+ string id
+ map<string, Model> models
}
ModelLibrary "1" *-- "1:N" Model
class ModelLibraryRepository {
+ map<string, ModelLibrary> modelLibraries
}
ModelLibraryRepository "1" *-- "0:N" ModelLibrary
@enduml
```

## Components
(for details about these concepts, see [this page](../../user-guide/solver/dynamic-modeler/05-model.md))

```plantuml
@startuml
class Model {
+ string id
+ Expression objective
+ map<string, Parameter> parameters
+ map<string, Variable> variables
+ map<string, Constraint> constraints
+ map<string, Port> ports
}
class Component {
+ string id
+ Model model
+ string scenarioGroup
+ map<string, Expression> parameterValues
}
Component "0:N" *-- "1" Model
Component --> Expression
class Expression {
+ string textualRepresentation
+ Node nodeRepresentation
}
class PortConnection {
+ string component1Id
+ string port1Id
+ string component2Id
+ string port2Id
}
class System {
+ map<string, Component> components
+ vector<PortConnection> portConnections
}
System "1" *-- "1:N" Component
System "1" *-- "0:N" PortConnection
@enduml
```
Loading

0 comments on commit cbebdc7

Please sign in to comment.