Skip to content

Commit

Permalink
Add support for XMILE's DELAY function
Browse files Browse the repository at this point in the history
  • Loading branch information
enekomartinmartinez committed Jan 9, 2024
1 parent 0e10348 commit cdcf3c0
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/tables/delay_functions.tab
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ DELAY3I "DELAY3I(input, delay_time, initial_value)" delay3 "delay3(input, delay_
DELAY3 "DELAY3(input, delay_time)" delay3 "delay3(input, delay_time)" "DelayStructure(input, delay_time, input, 3)" pysd.statefuls.Delay(...) Not tested for Xmile!
DELAY N "DELAY N(input, delay_time, initial_value, n)" delayn "delayn(input, delay_time, n, initial_value)" "DelayNStructure(input, delay_time, initial_value, n)" pysd.statefuls.DelayN(...) Not tested for Xmile!
delayn "delayn(input, delay_time, n)" "DelayNStructure(input, delay_time, input, n)" pysd.statefuls.DelayN(...) Not tested for Xmile!
DELAY FIXED "DELAY FIXED(input, delay_time, initial_value)" "DelayFixed(input, delay_time, initial_value)" pysd.statefuls.DelayFixed(...) Not tested for Xmile!
DELAY FIXED "DELAY FIXED(input, delay_time, initial_value)" delay "delay(input, delay_time, initial_value)" "DelayFixed(input, delay_time, initial_value)" pysd.statefuls.DelayFixed(...)
delay "delay(input, delay_time)" "DelayFixed(input, delay_time, input)" pysd.statefuls.DelayFixed(...)
SMOOTHI "SMOOTH1I(input, delay_time, initial_value)" smth1 "smth1(input, smth_time, initial_value)" "SmoothStructure(input, smth_time, initial_value, 1)" pysd.statefuls.Smooth(...) Not tested for Xmile!
SMOOTH "SMOOTH1(input, delay_time)" smth1 "smth1(input, smth_time)" "SmoothStructure(input, smth_time, input, 1)" pysd.statefuls.Smooth(...) Not tested for Xmile!
SMOOTH3I "SMOOTH3I(input, delay_time, initial_value)" smth3 "smth3(input, smth_time, initial_value)" "SmoothStructure(input, smth_time, initial_value, 3)" pysd.statefuls.Smooth(...) Not tested for Xmile!
Expand Down
24 changes: 24 additions & 0 deletions docs/whats_new.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
What's New
==========
v3.13.2 (2024/01/09)
--------------------
New Features
~~~~~~~~~~~~

Breaking changes
~~~~~~~~~~~~~~~~

Deprecations
~~~~~~~~~~~~

Bug fixes
~~~~~~~~~
- Add support for XMILE's DELAY function through `DelayFixed` (:issue:`433`). (`@enekomartinmartinez <https://github.com/enekomartinmartinez>`_)

Documentation
~~~~~~~~~~~~~

Performance
~~~~~~~~~~~

Internal Changes
~~~~~~~~~~~~~~~~

v3.13.1 (2024/01/02)
--------------------
New Features
Expand Down
2 changes: 1 addition & 1 deletion pysd/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "3.13.1"
__version__ = "3.13.2"
4 changes: 4 additions & 0 deletions pysd/translators/xmile/xmile_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"call": ae.CallStructure,
"init": ae.InitialStructure,
"stock": ae.IntegStructure,
"delay": {
2: lambda x, y: ae.DelayFixedStructure(x, y, x),
3: lambda x, y, z: ae.DelayFixedStructure(x, y, z)
},
"delay1": {
2: lambda x, y: ae.DelayStructure(x, y, x, 1),
3: lambda x, y, z: ae.DelayStructure(x, y, z, 1)
Expand Down
4 changes: 4 additions & 0 deletions tests/pytest_integration/pytest_integration_xmile_pathway.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
"folder": "constant_expressions",
"file": "test_constant_expressions.xmile"
},
"delay_xmile": {
"folder": "delay_xmile",
"file": "test_delay_xmile.xmile"
},
"eval_order": {
"folder": "eval_order",
"file": "eval_order.xmile"
Expand Down
2 changes: 1 addition & 1 deletion tests/test-models

0 comments on commit cdcf3c0

Please sign in to comment.