Gpkit

Latest version: v1.1.1

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

Scan your dependencies

Page 2 of 4

0.6.0

=============
* new much faster NomialMap data structure (682)
* Many bug fixes and small improvements.
* 6900 lines of code, 2200 lines of tests, 2100 lines of docstring.

0.5.3

=============
* faster SP solves (1109)
* LinkedConstraintSet deprecated (1110)
* Fixes to autosweep, ConstraintSet, interactive
* Solution time is now stored with soltutions (including sweeps/SPs)
* Model strings are divided with slashes (e.g. Airplane/Wing)

0.5.2

- Added new `sweep` and `autosweep` methods to Model
- Added `plot` routines to the results of those routines to make it easy to plot a 1D sweep.
- Added new `summary` method to solution_array.
- It and table accept iterables of vars, will only print vars in that iterable (or, by default, all vars)
- Cleaned up and documented the `interactive` submodule
- removed contour and sensitivity plots
- added a 1D-sweep plotting function
- added that plotting function as an option within the control panel interface
- Overhauled and documented three types of variables whose value is determined by functions:
- calculated constants
- post-solve calculated variables
- between-GP-solves calculated variables (for Sequential Geometric Programs)
- Fix `Bounded` and implement `debug()` for SPs
- Apply `subinplace` to substitutions dictionary as well
- Require GP substitutions to be Numbers only
- Extend Bounded to one-sided bounds
- Print model's numbers by default, unless `"modelnums" in exclude`
- Implement lazy keymapping, allowing GP/SP results to be KeyDicts
- Handle Signomial Inequalities that become Posynomial Inequalities after substitution
- Various documentation updates
- Various bug fixes

0.5.1

- O(N) sums and monomial products
- Warn about invalid ConstraintSet elements
- allow setting Tight tolerance as a class attribute
- full backwards compatibility for **init** methods
- scripts to test remote repositories
- minor fixes, tests, and refactors
- 3550 lines of code, 1800 lines of tests, 1700 lines of docstring. (not counting `interactive`)

0.5.0

- Added and documented debugging tools
- Added and documented vectorization tools
- Documented modular model construction
- 3200 lines of code, 1800 lines of tests, 1700 lines of docstring. (not counting `interactive`)

Changes to named models / Model inheritance

We are deprecating the creation of named submodels with custom `__init__` methods. Previously, variables created during `__init__` in any class inheriting from Model were replaced by a copy with `__class__.__name__` added as varkey metadata. This was slow, a bit irregular, and hacky.

We're moving to an explicitly-irregular `setup` method, which (if declared for a class inheriting from Model) is automatically called during `Model.__init__` inside a `NamedVariables(self.__class__.__name__)` environment. This 1) handles the naming of variables more explicitly and efficiently, and 2) allows us to capture variables created within `setup`, so that constants that are not a part of any constraint can be used directly (several examples of such template models are in the new _Building Complex Models_ documentation).

`Model.__init__` calls `setup` with the arguments given to the constructor, with the exception of `substitutions`, which is a reserved keyword. This allows for the easy creation of a named model with custom parameter values (as in the documentation's Beam example). `setup` methods should return an iterable (list, tuple, ConstraintSet, ...) of constraints or nothing if the model contains no constraints. To declare a submodel cost, set `self.cost` during `setup`. However, we often find declaring a model's cost explicitly just before solving to be a more legible practice.

In addition to permitting us to name variables at creation, and include unconstrained variables in a model, we hope that `setup` methods will clarify the side effects of named model creation.

0.4.2

Release notes
- prototype handling of SignomialEquality constraints
- fix an issue where solution tables printed incorrect units (despite the units being correct in the `SolutionArray` data structure)
- fix `controlpanel` slider display for newer versions of ipywidgets
- fix an issue where identical unit-ed variables could have different hashes
- Make the text of several error messages more informative
- Allow monomial approximation of monomials
- bug fixes and improvements to TightConstraintSet
- Don't print results table automatically (it was unwieldy for large models). To print it, `print sol.table()`.
- Use cvxopt's ldl kkt solver by default for more robustness to rank issues
- Improved `ConstraintSet.__getitem__`, only returns top-level Variable
- Move toward the varkeys of a ConstraintSet being an immutable set
- CPI update
- numerous pylint fixes
- BoundedConstraint sets added for dual feasibility debugging
- SP sweep compatibility

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.