diff options
author | lake0112 <lake0112@umn.edu> | 2022-02-24 16:32:46 -0600 |
---|---|---|
committer | lake0112 <lake0112@umn.edu> | 2022-02-24 16:32:46 -0600 |
commit | 1a8d5be1ca93db82769556f80319739291204ef0 (patch) | |
tree | b0d9167f835c86633032ed39c623b7dd8e57dfaa | |
parent | Merge branch 'master' of https://github.com/UMN-EE4951W-Lamperski/pendulum (diff) | |
download | ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar.gz ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar.bz2 ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar.lz ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar.xz ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.tar.zst ee4511w-1a8d5be1ca93db82769556f80319739291204ef0.zip |
add soft limit
-rw-r--r-- | System/pendulum/system.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/System/pendulum/system.py b/System/pendulum/system.py index 07c04bf..7dd038a 100644 --- a/System/pendulum/system.py +++ b/System/pendulum/system.py @@ -74,8 +74,10 @@ class System: # Setup soft limits if defined by the user (this is "challenge mode" for the user, making the constraints more difficult). # By default, the soft limits will not be used (when set NaN), and the whole extent of the system is available (to the HW limits). - self.negative_soft_limit = negative_limit - self.positive_soft_limit = positive_limit + #self.negative_soft_limit = negative_limit + #self.positive_soft_limit = positive_limit + self.negative_soft_limit = -15 + self.positive_soft_limit = 15 # If both limits have been defined, verify that they are valid (i.e. positive limit must be greater than the negative limit) if not math.isnan(negative_limit) and not math.isnan(positive_limit) and not negative_limit < positive_limit: print("ERROR: Invalid software limits provided. Must be valid floating-point numbers and positive limit must be greater than negative limit. Software limits will be disabled.") |