Skip to content

How to apply the lower bound constraint in a ratio? #1043

Answered by matthiaskoenig
Mithil15 asked this question in Q&A
Discussion options

You must be logged in to vote

I am not completely sure what you want to achieve.
i/i*3 is always 3 for every loop iteration ?!

You can easily set one lower bound based on another bound.

r1.lb/r2.lb = value

could be written as

r1.lb = r2.lb * value

Then you would just do something like:

r1.lower_bound = -100
for i in np.arange(start = 2.5, stop = 3.5, step = 0.5):
    value = i  # here you would calculate your fraction
    r2.lower_bound = r1.lower_bound * i;

Not sure this is what you wanted to do.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Mithil15
Comment options

@Midnighter
Comment options

Answer selected by Mithil15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants