Skip to content
Snippets Groups Projects
Commit afe31f39 authored by Bardh's avatar Bardh
Browse files

Adding Authors licence in files and change docs for tests

parent c786b0cc
No related branches found
No related tags found
No related merge requests found
Showing
with 140 additions and 17 deletions
AUTHORS 0 → 100644
# This is the list of GBOML contributors for copyright purposes.
#
# This does not necessarily list everyone who has contributed to GBOML
# code, documentation or design. For a full contributor list, see:
# https://gitlab.uliege.be/smart_grids/public/gboml/-/graphs/master
Miftari Bardhyl, University of Liege Belgium <bmiftari@uliege.be>
Berger Mathias, University of Liege Belgium <mathias.berger@uliege.be>
Djelassi Hatim, University of Liege Belgium
Ernst Damien, University of Liege Belgium and LTCI, Telecom Paris, Institut Polytechnique de Paris
MIT License
Copyright (c) 2020-22 Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst, University of Liege.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
......@@ -23,7 +23,7 @@ GBOML has been tested on Windows, macOS and Linux. The simplest way to install i
pip install gboml
Please refer to the online documentation for more [information on how to install GBOML](https://gboml-docs-test.readthedocs.io/en/latest/installation.html). Note that optimization solvers are also required to solve GBOML models and installation instructions are also provided in the online documentation.
Please refer to the online documentation for more [information on how to install GBOML](https://gboml.readthedocs.io/en/latest/installation.html). Note that optimization solvers are also required to solve GBOML models and installation instructions are also provided in the online documentation.
Several examples are provided in this repository ([in the examples directory](examples/)) and explained in the [online documentation](https://gboml.readthedocs.io/en/latest/).
......@@ -31,22 +31,23 @@ Several examples are provided in this repository ([in the examples directory](ex
Documentation is available on Read the Docs:
* [Read the documentation online](https://gboml-docs-test.readthedocs.io/en/latest/index.html)
* [Read the documentation online](https://gboml.readthedocs.io/en/latest/)
## Contributing
## Community Guidelines
To contribute changes:
1. Fork the project on Gitlab
2. Create a feature branch to work on in your fork (`git checkout -b new-feature`)
3. Commit your changes to the feature branch
4. Push the branch to GitHub (`git push origin my-new-feature`)
5. On GitHub, create a new pull request from the feature branch
4. Push the branch to Gitlab (`git push origin my-new-feature`)
5. On Gitlab, create a new pull request from the feature branch
Issues and questions shall be reported in the [issues directory](https://gitlab.uliege.be/smart_grids/public/gboml/-/issues).
## Citing GBOML
An early version of the GBOML framework was introduced in [a recent paper](https://www.frontiersin.org/articles/10.3389/fenrg.2021.671279/full). GBOML has also been submitted for review to the Journal of Open Source Software.
## License
Copyright since 2020 Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst, University of Liege. All rights reserved.
Copyright (C) since 2020 Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst, University of Liege . Licensed under the MIT License (see LICENSE file).
......@@ -18,7 +18,7 @@ All dependencies (numpy, scipy and ply) will be automatically installed and the
Manual Installation
-------------------
The git repository can be found `here <https://gitlab.uliege.be/smart_grids/public/gboml>`_. The repository can be cloned by typing the following commands in a terminal window:
The git repository can be found `here <https://gitlab.uliege.be/smart_grids/public/gboml>`__. The repository can be cloned by typing the following commands in a terminal window:
.. code-block:: bash
......@@ -44,7 +44,7 @@ GBOML currently interfaces with Gurobi, CPLEX, Xpress, Cbc/Clp and DSP. Only one
Gurobi
~~~~~~
To use Gurobi, you must first install it. Instructions can be found `here <https://www.gurobi.com/documentation/9.5/quickstart_windows/software_installation_guid.html>`_. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
To use Gurobi, you must first install it. Instructions can be found `here <https://www.gurobi.com/documentation/9.5/quickstart_windows/software_installation_guid.html>`__. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
.. code-block:: bash
......@@ -54,28 +54,28 @@ Other installation options can be found in `this post <https://support.gurobi.co
CPLEX
~~~~~
To use CPLEX, you must first install it. Instructions can be found `here <https://www.ibm.com/support/pages/downloading-ibm-ilog-cplex-optimization-studio-2010>`_. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
To use CPLEX, you must first install it. Instructions can be found `here <https://www.ibm.com/support/pages/downloading-ibm-ilog-cplex-optimization-studio-2010>`__. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
.. code-block:: bash
pip install cplex
Note that a license is also required to use CPLEX. Licenses can be obtained for free for academics, as discussed in the following `post <https://www.ibm.com/support/pages/ibm-ilog-optimization-academic-initiative>`_.
Note that a license is also required to use CPLEX. Licenses can be obtained for free for academics, as discussed in the following `post <https://www.ibm.com/support/pages/ibm-ilog-optimization-academic-initiative>`__.
Xpress
~~~~~~
To use Xpress, you must first install it. Instructions can be found `here <https://www.fico.com/fico-xpress-optimization/docs/latest/insight_quick_install/GUID-2D3D6579-9CCA-4605-8C00-E91B6FB846EB.html>`_. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
To use Xpress, you must first install it. Instructions can be found `here <https://www.fico.com/fico-xpress-optimization/docs/latest/insight_quick_install/GUID-2D3D6579-9CCA-4605-8C00-E91B6FB846EB.html>`__. Once the solver is installed, the Python API can be downloaded by typing the following commands in a terminal window:
.. code-block:: bash
pip install xpress
Additional information can be found `here <https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/python/HTML/chIntro_sec_secInstall.html>`_. Note that a license is also required to use Xpress.
Additional information can be found `here <https://www.fico.com/fico-xpress-optimization/docs/latest/solver/optimizer/python/HTML/chIntro_sec_secInstall.html>`__. Note that a license is also required to use Xpress.
Cbc/Clp
~~~~~~~
To use Cbc or Clp, you must first install them. Instructions can be found `here <https://github.com/coin-or/Cbc>`_. The CyLP package is used to interface with the solver. This package can be installed by typing the following commands in a terminal window:
To use Cbc or Clp, you must first install them. Instructions can be found `here <https://github.com/coin-or/Cbc>`__. The CyLP package is used to interface with the solver. This package can be installed by typing the following commands in a terminal window:
.. code-block:: bash
......@@ -113,4 +113,16 @@ The next installation steps make use of `cmake <https://cmake.org/install/>`_ an
cmake ..
make
If the make worked properly, an executable called runDsp and a shared library named libDsp should be created in the *src* subfolder of the build directory. Additional information can be found `here <https://github.com/Argonne-National-Laboratory/DSP/blob/master/docs/install.md>`_.
If the make worked properly, an executable called runDsp and a shared library named libDsp should be created in the *src* subfolder of the build directory. Additional information can be found `here <https://github.com/Argonne-National-Laboratory/DSP/blob/master/docs/install.md>`__.
Testing installation
--------------------
To test your installation, you can do
.. code-block:: bash
python test.py
Note that the file *test.py* tests all the solver's interface also (except DSP as still experimental). Therefore, installing only one solver will not result in all tests being passed successfully.
\ No newline at end of file
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from setuptools import setup, find_packages
from pathlib import Path
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .version import __version__
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .gboml_graph import GbomlGraph, VariableType
from .compiler import compile_gboml, compile_gboml_mdp
......
"""Compiler directory contains each step from the input file to the matrix generation.
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
"""Compiler directory contains each step from the input file to the matrix
generation.
The compiler directory contains :
- The Lexer which converts an input file into a stream of tokens
- The Parser which converts the stream of tokens into a abstract syntax tree (AST)
- The Parser which converts the stream of tokens into a abstract syntax tree
(AST)
- The Semantic Analysis which augments and checks the AST
- The Matrix Generation which converts the AST to a standard optimization form
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .time_obj import Time, TimeInterval
from .constraint import Constraint
from .expression import Expression
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Type
from .expression import Expression
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Type
from .expression import Expression
from .time_obj import TimeInterval
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
class RedefinitionError(Exception):
"""Redefinition of protected element"""
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Symbol
from gboml.compiler.utils import error_, list_to_string
from .link import Attribute
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from gboml.compiler.utils import error_
from .objective import Objective
from .constraint import Constraint
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Symbol
from gboml.compiler.utils import error_
import copy
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from gboml.compiler.utils import error_
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .expression import Expression
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from gboml.compiler.utils import error_, turn_to_dict
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Type
from .expression import Expression
......
# Copyright (C) 2020 - 2022
# Bardhyl Miftari, Mathias Berger, Hatim Djelassi, Damien Ernst,
# University of Liege .
# Licensed under the MIT License (see LICENSE file).
from .parent import Symbol
from gboml.compiler.utils import error_, list_to_string
import os
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment