- Support Vensim's RANDOM EXPONENTIAL function (:issue:`107`). (@enekomartinmartinez)
- Fix truncation in Vensim's RANDOM NORMAL function translation. (@enekomartinmartinez)
- Add supported random functions to the documentation tables. (@enekomartinmartinez)
- Add test for random functions including comparison with Vensim outputs and expected values (:issue:`107`). (@enekomartinmartinez)
- Allow to add multiple imports by the python function call builder. (@enekomartinmartinez)
- Fix initialization dependencies for :py:class:`pysd.py_backend.statefuls.Smooth` in the builder :py:class:`pysd.builders.python.python_expressions_builder.SmoothBuilder` (:issue:`440`). (@enekomartinmartinez)
- Improve documentation for :py:mod:`netCDF4` dependency. (@enekomartinmartinez)
- Support for Python 3.12. (@enekomartinmartinez)
- Support for :py:mod:`numpy` >= 1.24. (@enekomartinmartinez)
- Correct some warnings management in the tests. (@enekomartinmartinez)
- Set :py:mod:`numpy` requirements to >= 1.23 to follow NEP29. (@enekomartinmartinez)
- Custom error messages when :py:mod:`netCDF4` is missing (:issue:`435`). (@enekomartinmartinez)
- Add support for XMILE's DELAY function through DelayFixed (:issue:`433`). (@enekomartinmartinez)
- Fix bug with :py:class:`pysd.py_backend.output.ModelOutput` initializing all the handlers, and thus, importing netCDF4 when unnecessary (:issue:`431`). (@enekomartinmartinez)
- Include new method :py:meth:`pysd.py_backend.model.Model.copy` which allows copying a model (:issue:`131`). (@enekomartinmartinez)
- :py:meth:`pysd.py_backend.model.Model.select_submodel` now takes an optional argument inplace when set to :py:data:`False` it will return a modified copy of the model instead of modifying the original model (:issue:`131`). (@enekomartinmartinez)
- :py:meth:`pysd.py_backend.model.Model.export` will now save also time component information if changed (e.g. final time, time step...). (@enekomartinmartinez)
- Set the pointer of :py:class:`pysd.py_backend.statefuls.DelayFixed` to 0 during initialization (:issue:`427`). (@enekomartinmartinez)
- :py:meth:`pysd.py_backend.model.Model.export` now works with Macros. (@enekomartinmartinez)
- Improve documentation of methods in :py:class:`pysd.py_backend.model.Model` and :py:class:`pysd.py_backend.model.Macro` includying cross-references and rewrite the one from :py:meth:`pysd.py_backend.model.Macro.set_components`. (@enekomartinmartinez)
- Include documentation about the new method :py:meth:`pysd.py_backend.model.Model.copy` and update documentation from :py:meth:`pysd.py_backend.model.Model.select_submodel`. (@enekomartinmartinez)
- Improved performace of :py:class:`pysd.py_backend.output.DataFrameHandler` by creating the dataframe at the end of the run (:issue:`374` and :issue:`330`). (@easyas314159 and @enekomartinmartinez)
- Move old :py:meth:`pysd.py_backend.model.Macro.set_components` to :py:meth:`pysd.py_backend.model.Macro._set_components`, and create new method with the same name without the new argument. (@enekomartinmartinez)
- Move old :py:meth:`pysd.py_backend.model.Macro.set_stateful` to :py:meth:`pysd.py_backend.model.Macro._set_stateful`. (@enekomartinmartinez)
- Make integration tests filter only specific warnings. (@enekomartinmartinez)
- Include warnings in :py:meth:`pysd.py_backend.model.Macro.set_components` when changing the behaviour of the component (:issue:`58`). (@enekomartinmartinez)
- Remove support for Python 3.7 and 3.8. (@enekomartinmartinez)
- Update the cellrange retrievel to be compatible with :py:mod:`openpyxl` >= 3.1. It breaks the code for lower versions. (@enekomartinmartinez)
- Update benchmarking tools to avoid :py:class:`FutureWarning` for positional keys from :py:mod:`pandas`. (@enekomartinmartinez)
- Update requirements. (@enekomartinmartinez)
- Update libraries used for building documentation and .readthedocs.yml. (@enekomartinmartinez)
- Force to use :py:mod:`xarray` >= 2023.09. (@enekomartinmartinez)
- Use pandas[excel] instead of xlrd dependency in the requirements. (@gdrosos)
- Add the possibility to run a model one or several steps at a time, updating model variables in the process. (@rogersamso)
- Add the Running models one (or more) step(s) at a time section in :doc:`advanced_usage`. (@rogersamso)
- Modify signature of the :py:class:`pysd.py_backend.output.ModelOutput` class. It now only accepts the path of the results file (@rogersamso)
- Add the :py:meth:`pysd.py_backend.output.ModelOutput.collect` method to the :py:class:`pysd.py_backend.output.ModelOutput` class. (@rogersamso)
- Add the :py:meth:`pysd.py_backend.model.Model.set_stepper` and :py:meth:`pysd.py_backend.model.Model.step` methods to the :py:class:`pysd.py_backend.model.Model` class. (@rogersamso)
- Add several internal methods to the :py:class:`pysd.py_backend.model.Model` class, to avoid code repetition. (@rogersamso)
- Add :py:class:`FutureWarning` for Python 3.7 support deprecation. (@enekomartinmartinez)
- Parse TABBED ARRAYS Vensim function. (@rogersamso)
- Add support for Vensim's POWER function. (@rogersamso)
- Add possibility to pass data_files in netCDF format. (@rogersamso)
- Add support for XMILE's non-negative flows and stocks. (@enekomartinmartinez)
- Add support for XMILE's MIN and MAX functions with one argument. (@enekomartinmartinez)
- Set the final_subscripts to an empty dictionary for ELMCOUNT function in :py:meth:`pysd.builders.python_expressions_builder.CallBuilder.build_function_call`. (@rogersamso)
- Define comp_subtype of Unchangeable tabbed arrays as Unchangeable. This is done in :py:meth:`pysd.builders.python.python_expressions_builder.ArrayBuilder.build`. (@rogersamso)
- Add information about slack channel https://slofile.com/slack/sdtoolsandmet-slj3251. (@enekomartinmartinez)
- Update XMILE stocks section. (@enekomartinmartinez)
- Add a weekly scheduled run to all CI workflows, which run each Monday at 06:00 UTC. (@EwoutH)
- Fix CI pipeline for Python 3.11 and remove Python 3.10 pipeline in favour of 3.11. (@kinow)
- Add non_negative argument in :py:class:`pysd.translators.structures.abstract_expressions.IntegStructure`. (@enekomartinmartinez)
- Add :py:const:`numpy.py` as translation for the call to the function PI(). (@lionel42)
- Set :py:mod:`numpy` <1.24 to avoid errors with least squares equation in :py:func:`pysd.py_backend.allocation.allocate_available`. (@enekomartinmartinez)
- Keep the attributes of a component when using :py:meth:`pysd.py_backend.model.Macro.set_components` to avoid losing coords or arguments information. (@enekomartinmartinez)
- Set :py:mod:`openpyxl` <3.1 to avoid errors due to non-backwards compatible changes. (@enekomartinmartinez)
- Include time dependency in random functions to avoid them using constant cache. (@enekomartinmartinez)
- Run test for Python 3.11 with ubuntu-latest (hdf5-headers need to be installed using apt manager). (@enekomartinmartinez)
- Parses and ignores reality check functions during translation of Vensim models. (@rogersamso)
- Fix issue with the classification of variables in modules and submodules (:issue:`388`). When a model had a view with 3 sublevels (e.g. energy-transformation.losses) but another view was defined with only two of them (e.g. energy-transformation), the variables in the second view were placed in the main model file. Now, if this happens, the variables in the second view will be placed in a main.py file (i.e. energy/transformation/main.py). (@rogersamso)
- Fix bug on the CLI when passing a hyphen as first value to the --subview-sep argument (:issue:`388`). (@rogersamso)
- Fix bug on the CLI when parsing initial conditions (:issue:`395`). (@rogersamso)
- The Splitting Vensim views in different files section in :doc:`command_line_usage` has been updated to include an example of the usage of the --subview-sep CLI argument. (@rogersamso)
- The :py:meth:`_merge_nested_dicts` method from the :py:class:`pysd.translators.vensim.vensim_file.VensimFile` class has been made a static method, as it does not need to access any attribute of the instance, and it does facilitate unit testing. (@rogersamso)
- The pysd/translators/vensim/parsing_grammars/element_object.peg grammar has been modified to be able to parse reality check elements. (@rogersamso)
- :py:class:`pysd.translators.vensim.vensim_element.Constraint` and :py:class:`pysd.translators.vensim.vensim_element.TestInputs` classes have been added, which inherit from the also newly created :py:class:`pysd.translators.vensim.vensim_element.GenericComponent`, which include the :py:meth:`parse` and :py:meth:`get_abstract_component` methods. (@rogersamso and @enekomartinmartinez)
- The :py:class:`pysd.translators.structures.abstract_model.AbstractSection` class now has two extra attributes (:py:data:`constraints` and :py:data:`input_tests`), which hold the :py:class:`pysd.translators.structures.abstract_model.AbstractConstraint` and :py:class:`pysd.translators.structures.abstract_model.AbstractTestInputs` objects. (@rogersamso)
- Adds ncfile.py module with helper functions to export a subset or all of the data_vars in netCDF files generated with PySD to :py:class:`pandas.DataFrame`, csv or tab files. (@rogersamso)
- Adds possibility to initialize and export a subset or all external objects to netCDF, and then initialize the external objects from the file. (@rogersamso)
- Deprecate :py:meth:`pysd.py_backend.model.Model._get_dependencies` replacing it with :py:meth:`pysd.py_backend.model.Model.get_dependencies`. (@enekomartinmartinez)
- Include new class :py:class:`pysd.py_backend.utils.Dependencies` to return by :py:meth:`pysd.py_backend.model.Model.get_dependencies` (:issue:`379`). (@lionel42)
- Updates the :doc:`getting_started` page with instructions on how to use the new helper functions for netCDF files. (@rogersamso)
- Updates the :doc:`advanced_usage` page with instructions on how to export externals to netCDF and initialize a model from it. (@rogersamso)
- Update citation information to include the new paper published in JOSS. (@enekomartinmartinez)
- Initializing external objects from netCDF file is much faster than reading from spreadsheet files.(@rogersamso)
- Adds the :py:meth:`pysd.py_backend.model.Macro.serialize_externals` and :py:meth:`pysd.py_backend.model.Macro.initialize_external_data` methods, and a few other private methods.(@rogersamso)
- Adds the :py:class:`pysd.py_backend.utils.UniqueDims` class for renaming model dimensions with unique names.(@rogersamso)
- Force :py:class:`pysd.py_backend.external.External` objects to always have the full element dimensions, missing dimensions are filled with numpy.nan. (@enekomartinmartinez)
- Add dependabot configuration for GitHub Actions updates. (@EwoutH)
- Include new error messages for initialization of :py:class:`pysd.py_backend.lookups.HardcodedLookups` (:issue:`376`). (@enekomartinmartinez)
- Include new warning message when a translated variable has several types or subtypes. (@enekomartinmartinez)
- Set CI test to run in parallel in 2 cores. (@enekomartinmartinez)
- Fix bugs with :py:class:`pandas.DataFrame` 1.5.0 (:issue:`366`). (@enekomartinmartinez)
- Simulation results can now be stored as netCDF4 files. (@rogersamso)
- The CLI also accepts netCDF4 file paths after the -o argument. (@rogersamso)
- Fix bug when a WITH LOOKUPS argument has subscripts. (@enekomartinmartinez)
- Fix bug of exporting csv files with multiple subscripts variables. (@rogersamso)
- Fix bug of missing dimensions in variables defined with not all the subscripts of a range (:issue:`364`). (@enekomartinmartinez)
- Fix bug when running a model with variable final time or time step and progressbar (:issue:`361`). (@enekomartinmartinez)
- Add Storing simulation results on a file section in the :doc:`getting_started` page. (@rogersamso)
- Include cookbook information in the :doc:`getting_started` page. (@enekomartinmartinez)
- Include an introduction of main historical changes in the :doc:`about` page. (@enekomartinmartinez)
- Exporting outputs as netCDF4 is much faster than exporting a pandas DataFrame, especially for large models. (@rogersamso)
- Make PySD work with :py:mod:`parsimonius` 0.10.0. (@enekomartinmartinez)
- Add netCDF4 dependency for tests. (@rogersamso)
- Improve warning message when replacing a stock with a parameter. (@enekomartinmartinez)
- Include more pytest parametrizations in some test and make them translate the models in temporary directories. (@enekomartinmartinez)
- Include lychee-action in the GHA workflow to check the links. (@enekomartinmartinez)
- Update License. (@enekomartinmartinez)
- Include Maintained? Yes and Contributions welcome badges. (@enekomartinmartinez)
- Update links to the new repository location. (@enekomartinmartinez)
- Reduce relative precision from 1e-10 to 1e-5 to compute the saving times and final time. (@enekomartinmartinez)
- Add convergence tests for euler integration method. (@enekomartinmartinez)
- Include build docs check in the GHA workflow to avoid warnings with sphinx. (@enekomartinmartinez)
- Set :py:mod:`parsimonius` requirement to 0.9.0 to avoid a breaking-change in the newest version. Pending to update PySD to run it with :py:mod:`parsimonious` 0.10.0. (@enekomartinmartinez)
- Include warning messages when a variable is defined in more than one view, when a control variable appears in a view or when a variable doesn't appear in any view as a workbench variable (:issue:`357`). (@enekomartinmartinez)
- Force variables in a module to be saved alphabetically for being able to compare differences between versions (only for the models that are split by views). (@enekomartinmartinez)
- Classify control variables in the main file always (:issue:`357`). (@enekomartinmartinez)
- Include :py:class:`pysd.translators.structures.abstract_model.AbstractControlElement` child of :py:class:`pysd.translators.structures.abstract_model.AbstractElement` to differentiate the control variables. (@enekomartinmartinez)
- Make sketch's font_size optional. (@enekomartinmartinez)
- Correct typos.
- Fix bug generated when :EXCEPT: keyword is used with subscript subranges (:issue:`352`). (@enekomartinmartinez)
- Fix bug of precision error for :py:func:`pysd.py_backend.allocation.allocate_by_priority` (:issue:`353`). (@enekomartinmartinez)
- Fix bug of constant cache assignment. (@enekomartinmartinez)
- Improve the performance of reading :py:class:`pysd.py_backend.external.External` data with cellrange names by loading the data in memory with :py:mod:`pandas`. As recommended by :py:mod:`openpyxl` developers, this is a possible way of improving performance to avoid parsing all rows up each time for getting the data (issue 1867 in openpyxl). (@enekomartinmartinez)
- Add support for subscripted arguments in :py:func:`pysd.py_backend.functions.ramp` and :py:func:`pysd.py_backend.functions.step` (:issue:`344`). (@enekomartinmartinez)
- Fix bug related to the order of elements in 1D GET expressions (:issue:`343`). (@enekomartinmartinez)
- Fix bug in request 0 values in allocate by priority (:issue:`345`). (@enekomartinmartinez)
- Fix a numerical error in starting time of step and ramp. (@enekomartinmartinez)
- Include new PySD logo. (@enekomartinmartinez)
- Ignore 'distutils Version classes are deprecated. Use packaging.version instead' error in tests as it is an internal error of xarray. (@enekomartinmartinez)
- Add a warning message when a subscript range is duplicated in a variable reference. (@enekomartinmartinez)
- Add support for Vensim's ALLOCATE AVAILABLE (:py:func:`pysd.py_backend.allocation.allocate_available`) function (:issue:`339`). Integer allocation cases have not been implemented neither the fixed quantity and constant elasticity curve priority functions. (@enekomartinmartinez)
- Improve the documentation of the :py:mod:`pysd.py_backend.allocation` module. (@enekomartinmartinez)
- Add a class to manage priority profiles so it can be also used by the many-to-many allocation. (@enekomartinmartinez)
- Add support for Vensim's ALLOCATE BY PRIORITY (:py:func:`pysd.py_backend.allocation.allocate_by_priority`) function (:issue:`263`). (@enekomartinmartinez)
- Fix bug of using subranges to define a bigger range (:issue:`335`). (@enekomartinmartinez)
- Improve error messages for :class:`pysd.py_backend.External` objects. (@enekomartinmartinez)
- Add support for Vensim's GET TIME VALUE (:py:func:`pysd.py_backend.functions.get_time_value`) function (:issue:`332`). Not all cases have been implemented. (@enekomartinmartinez)
- Add support for Vensim's VECTOR SELECT (:py:func:`pysd.py_backend.functions.vector_select`) function (:issue:`266`). (@enekomartinmartinez)
- Add support for Vensim's VECTOR SORT ORDER (:py:func:`pysd.py_backend.functions.vector_sort_order`) function (:issue:`326`). (@enekomartinmartinez)
- Add support for Vensim's VECTOR RANK (:py:func:`pysd.py_backend.functions.vector_rank`) function (:issue:`326`). (@enekomartinmartinez)
- Add support for Vensim's VECTOR REORDER (:py:func:`pysd.py_backend.functions.vector_reorder`) function (:issue:`326`). (@enekomartinmartinez)
- Add the section :doc:`/development/adding_functions` with examples for developers. (@enekomartinmartinez)
- Include a template for PR.
- Simplify subscripts dictionaries for :py:class:`pysd.py_backend.data.TabData` objects. (@enekomartinmartinez)
- Improve tests/README.md.
- Minor improvements in the documentation.
- Add Python 3.10 to CI pipeline and include it in the supported versions list. (@enekomartinmartinez)
- Correct LICENSE file extension in the setup.py. (@enekomartinmartinez)
- Move from importlib's :py:func:`load_module` to :py:func:`exec_module`. (@enekomartinmartinez)
- Remove warnings related to :py:data:`set` usage. (@enekomartinmartinez)
- Move all the missing test to :py:mod:`pytest`. (@enekomartinmartinez)
- Remove warning messages from test and make test fail if there is any warning. (@enekomartinmartinez)
- The new :doc:`Abstract Model Representation <structure/structure_index>` translation and building workflow will allow to add new output languages in the future. (@enekomartinmartinez)
- Added new properties to the :py:class:`pysd.py_backend.model.Macro` to make more accessible some information: :py:attr:`.namespace`, :py:attr:`.subscripts`, :py:attr:`.dependencies`, :py:attr:`.modules`, :py:attr:`.doc`. (@enekomartinmartinez)
- Cleaner Python models: (@enekomartinmartinez)
- :py:data:`_namespace` and :py:data:`_dependencies` dictionaries have been removed from the file.
- Variables original names, dependencies metadata now are given through :py:meth:`pysd.py_backend.components.Component.add` decorator, instead of having them in the docstring.
- Merging of variable equations is now done using the coordinates to a pre-allocated array, instead of using the magic function :py:data:`pysd.py_backend.utils.xrmerge()`.
- Arranging and subseting arrays are now done inplace instead of using the magic function :py:data:`pysd.py_backend.utils.rearrange()`.
- Set the argument :py:data:`flatten_output` from :py:meth:`.run` to :py:data:`True` by default. Previously it was set to :py:data:`False` by default. (@enekomartinmartinez)
- Move the docstring of the model to a property, :py:attr:`.doc`. Thus, it is not callable anymore. (@enekomartinmartinez)
- Allow the function :py:func:`pysd.py_backend.functions.pulse` to also perform the operations performed by :py:data:`pysd.py_backend.functions.pulse_train()` and :py:data:`pysd.py_backend.functions.pulse_magnitude()`. (@enekomartinmartinez)
- Change first argument of :py:func:`pysd.py_backend.functions.active_initial`, now it is the stage of the model and not the time. (@enekomartinmartinez)
- Simplify the function :py:data:`pysd.py_backend.utils.rearrange()` orienting it to perform simple rearrange cases for user interaction. (@enekomartinmartinez)
- Move :py:data:`pysd.py_backend.statefuls.Model` and :py:data:`pysd.py_backend.statefuls.Macro` to :py:class:`pysd.py_backend.model.Model` and :py:class:`pysd.py_backend.model.Macro`, respectively. (@enekomartinmartinez)
- Manage all kinds of lookups with the :py:class:`pysd.py_backend.lookups.Lookups` class. (@enekomartinmartinez)
- Include a second optional argument to lookups functions to set the final coordinates when a subscripted variable is passed as an argument. (@enekomartinmartinez)
- Remove :py:data:`pysd.py_backend.utils.xrmerge()`, :py:data:`pysd.py_backend.functions.pulse_train()`, :py:data:`pysd.py_backend.functions.pulse_magnitude()`, :py:data:`pysd.py_backend.functions.lookup()`, :py:data:`pysd.py_backend.functions.lookup_discrete()`, :py:data:`pysd.py_backend.functions.lookup_extrapolation()`, :py:data:`pysd.py_backend.functions.logical_and()`, :py:data:`pysd.py_backend.functions.logical_or()`, :py:data:`pysd.py_backend.functions.bounded_normal()`, :py:data:`pysd.py_backend.functions.log()`. (@enekomartinmartinez)
- Remove old translation and building files (:py:data:`pysd.translation`). (@enekomartinmartinez)
- Generate the documentation of the model when loading it to avoid losing information when replacing a variable value (:issue:`310`, :pull:`312`). (@enekomartinmartinez)
- Make random functions return arrays of the same shape as the variable, to avoid repeating values over a dimension (:issue:`309`, :pull:`312`). (@enekomartinmartinez)
- Fix bug when Vensim's :MACRO: definition is not at the top of the model file (:issue:`306`, :pull:`312`). (@enekomartinmartinez)
- Make builder identify the subscripts using a main range and subrange to allow using subscripts as numeric values as Vensim does (:issue:`296`, :issue:`301`, :pull:`312`). (@enekomartinmartinez)
- Fix bug of missmatching of functions and lookups names (:issue:`116`, :pull:`312`). (@enekomartinmartinez)
- Parse Xmile models case insensitively and ignoring the new lines characters (:issue:`203`, :issue:`253`, :pull:`312`). (@enekomartinmartinez)
- Add support for Vensim's :EXCEPT: keyword (:issue:`168`, :issue:`253`, :pull:`312`). (@enekomartinmartinez)
- Add support for Xmile's FORCST and SAFEDIV functions (:issue:`154`, :pull:`312`). (@enekomartinmartinez)
- Add subscripts support for Xmile (:issue:`289`, :pull:`312`). (@enekomartinmartinez)
- Fix numeric error bug when using :py:data:`return_timestamps` and time step with non-integer values. (@enekomartinmartinez)
- Review the whole documentation, refract it, and describe the new features. (@enekomartinmartinez)
- The variables defined in several equations are now assigned to a pre-allocated array instead of using :py:data:`pysd.py_backend.utils.xrmerge()`. (@enekomartinmartinez)
- The arranging and subseting of arrays is now done inplace instead of using the magic function :py:data:`pysd.py_backend.utils.rearrange()`. (@enekomartinmartinez)
- The grammars for Parsimonious are only compiled once per translation. (@enekomartinmartinez)
- The translation and the building of models has been totally modified to use the :doc:`Abstract Model Representation <structure/structure_index>`. (@enekomartinmartinez)