Sasoptpy

Latest version: v1.0.5

Safety actively analyzes 641872 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.0

=======================

New Features
++++++++++++

- Added workspaces; for more information, see :ref:`Workspaces in User Guide <workspaces>` and :ref:`Efficiency Analysis example <efficiency-analysis>`
- Added :ref:`package configurations <configurations>`
- Added :ref:`abstract actions <abstract-actions>` that allow server-side operations. Highlights include:

- :func:`actions.read_data` and :func:`actions.create_data`
- :func:`actions.for_loop` and :func:`actions.cofor_loop`
- :func:`actions.print_item`
- :func:`actions.solve`

- Added structure decorators for better control of submissions

Changes
+++++++

- Refactored the entire package; sasoptpy now has `core`, `abstract`, `interface`,
`session`, and `util` directories
- Experimental RESTful API was dropped
- `get_obj_by_name` function was removed
- `lso` solver was renamed `blackbox`
- Because of the use of literal strings (:pep:`498`), only Python 3.6 or later versions are supported

Bug Fixes
+++++++++

- Fixed: Arithmetic operations with powers are generating incorrect results
- Fixed: Variable groups with space in their index are not getting values
- Fixed: Constraints without directions do not produce an error
- Fixed: Documentation does not mention conda-forge library requirement
- Fixed: Single-dimensional parameters are hard to access

0.2.1

==========================

New Features
++++++++++++

- Support for evaluating nonlinear expressions is added, see
:meth:`Expression.get_value` and :func:`utils._evaluate`
- Support for multiple objectives is added for LSO solver, see
:meth:`Model.set_objective` and
:ref:`Multiobjective <examples/multiobjective>` example
- Support for spaces inside variable indices is added
- Experimental RESTful API is added

Changes
+++++++

- Dictionaries inside components are replaced with ordered dictionaries
to preserve deterministic behavior
- Math operators are added into the keys of linear coefficient dictionaries
- Some iterators are rewritten by using the `yield` keyword for performance
- `key_name` and `col_names` parameters are added into :meth:`read_table`

Bug Fixes
+++++++++

- Fixed: Using a single variable as an objective is producing incorrect input
- Fixed: :meth:`Expression.get_value` fails to evaluate expressions with
operators
- Fixed: :meth:`Expression.add` overrides operators in some instances
- Fixed: Expressions with same components but different operators get summed
incorrectly
- Fixed: New version of Viya complains about :class:`pandas.DataFrame` column
types
- Syntax fixes for :pep:`8` compliance

Notes
+++++

- A Jupyter notebook example of the Diet Problem is added
- A new example is added to show usage of experimental RESTful API
- Unit tests are added for development repository
- CI/CD integration is added for the development repository on Gitlab
- Generated models can be checked by using the hash values inside tests.responses

0.2.0

======================

New Features
++++++++++++

- Support for the new runOptmodel CAS action is added
- Nonlinear optimization model building support is added for both SAS 9.4 and
SAS Viya solvers
- Abstract model building support is added when using SAS Viya solvers
- New object types, :class:`Set`, :class:`SetIterator`, :class:`Parameter`,
:class:`ParameterValue`, :class:`ImplicitVar`, :class:`ExpressionDict`, and
:class:`Statement` are added for abstract model building
- :meth:`Model.to_optmodel` method is added for exporting model objects into
PROC OPTMODEL code as a string
- Wrapper functions :func:`read_table` and :func:`read_data` are added to
read CASTable and DataFrame objects into the models
- Math function wrappers are added
- :code:`_expr` and :code:`_defn` methods are added to all object types for
producing OPTMODEL expression and definitions
- Multiple solutions are now returned when using `solveMilp` action and
can be retrieved by using :meth:`Model.get_solution` method
- :meth:`Model.get_variable_value` is added to get solution values of abstract
variables

Changes
+++++++

- Variable and constraint naming schemes are replaced with OPTMODEL equivalent
versions
- Variables and constraints now preserve the order in which they are inserted to the
problem
- :meth:`Model.to_frame` method is updated to reflect changes to VariableGroup and
ConstraintGroup orderings
- Two solve methods, `solve_on_cas` and
`solve_on_viya` are merged into :meth:`Model.solve`
- :meth:`Model.solve` method checks the available CAS actions and uses
the runOptmodel action whenever possible
- As part of the merging process, :code:`lp` and :code:`milp` arguments are
replaced with :code:`options` argument in :meth:`Model.solve` and
:meth:`Model.to_optmodel`
- An optional argument :code:`frame` is added to :meth:`Model.solve` for
forcing use of MPS mode and `solveLp`-`solveMilp` actions
- Minor changes are applied to `__str__` and `__repr__` methods
- Creation indices for objects are being kept by using the return of the
:func:`register_name` function
- Objective constant values are now being passed by using new CAS action arguments
when posssible
- A linearity check is added for models
- Test folder is added to the repository

Bug Fixes
+++++++++

- Nondeterministic behavior when generating MPS files is fixed.

Notes
+++++

- Abstract and nonlinear models can be solved on Viya only if the runOptmodel
action is available on the CAS server.
- Three new examples are added which demonstrate abstract model building.
- Some minor changes are applied to the existing examples.

0.1.2

=======================

New Features
++++++++++++

- As an experimental feature, sasoptpy now supports *SASPy* connections
- :meth:`Model.solve_local` method is added for solving optimization
problems by using SAS 9.4 installations
- :meth:`Model.drop_variable`, :meth:`Model.drop_variables`,
:meth:`Model.drop_constraint`, :meth:`Model.drop_constraints` methods are
added
- :meth:`Model.get_constraint` and :meth:`Model.get_constraints` methods are
added to retrieve :class:`Constraint` objects in a model
- :meth:`Model.get_variables` method is added
- :code:`_dual` attribute is added to the :class:`Expression` objects
- :meth:`Variable.get_dual` and :meth:`Constraint.get_dual` methods are added
- :meth:`Expression.set_name` method is added

Changes
+++++++

- Session argument accepts :class:`saspy.SASsession` objects
- :meth:`VariableGroup.mult` method now supports :class:`pandas.DataFrame`
- Type check for the :meth:`Model.set_session` is removed to support new session
types
- Problem and solution summaries are not being printed by default anymore,
see :meth:`Model.get_problem_summary` and :meth:`Model.get_solution_summary`
- The default behavior of dropping the table after each solve is changed, but
can be controlled with the :code:`drop` argument of the :meth:`Model.solve` method

Bug Fixes
+++++++++

- Fixed: Variables do not appear in MPS files if they are not used in the model
- Fixed: :meth:`Model.solve` primalin argument does not pass into options

Notes
+++++

- A .gitignore file is added to the repository.
- A new example is added: Decentralization. Both
:ref:`CAS <examples/decentralization>` and
:ref:`SAS <examples/decentralization-saspy>` versions of the new example
are added.
- There is a known issue with the nondeterministic behavior when creating MPS
tables. This will be fixed with a hotfix after the release.
- A new option (no-ex) is added to makedocs script for skipping examples when
building docs.

0.1.1

==========================

New Features
++++++++++++

- Initial value argument 'init' is added for :class:`Variable` objects
- :meth:`Variable.set_init` method is added for variables
- Initial value option 'primalin' is added to :meth:`Model.solve` method
- Table name argument 'name', table drop option 'drop', and replace
option 'replace' are added to :meth:`Model.solve` method
- Decomposition block implementation is rewritten; block numbers does
not need to be consecutive and ordered :meth:`Model.upload_user_blocks`
- :meth:`VariableGroup.get_name` and :meth:`ConstraintGroup.get_name` methods
are added
- :meth:`Model.test_session` method is added for checking if session is defined
for models
- :func:`expr_sum` function is added for faster summation of
:class:`Expression` objects

Changes
+++++++

- methods.py is renamed to utils.py

Bug Fixes
+++++++++

- Fixed: Crash in VG and CG when a key not in the list is called
- Fixed: get_value of pandas is depreceated
- Fixed: Variables can be set as temporary expressions
- Fixed: Ordering in :func:`get_solution_table` is incorrect for multiple entries

0.1.0

==========================

- Initial release

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.