Skip to main content
Solved

Limit operand by value calculated from other operand


How to limit value of operand to a value which is not constant and depends other parameter? For example: calculate 1/10 of radius from Surface and then task is to limit conic to be bellow calculated value. OPLT does not allow for this.

 

Best answer by David.Nguyen

@Marko.Viršek

 

There are probably several solutions to this problem. Here is one implementation with a DIFF operand (to take the difference of two operands):

Note that DIFF in operand calculates the Conic of Surface 2 minus the 1/10th Radius of Surface 1. If both are equal the difference is zero. If the Conic is greater, this is a positive value, if the Conic is smaller, this is a negative value.

One has to be a little bit careful as the sign of the Radii and Conic can change (but I can see you’ve already used ABSO in your screenshot :). I have put the absolute values (ABSO) as optional in case you have another way to already control the sign of the Radii and Conic for some reason. Let me know if this is clear. When running the optimizer with the Merit Function above with only the Conic of Surface 2 as variable, this Conic value goes to 0.5.

Let me know if this is clear.

Take care,

 

David

View original
Did this topic help you find an answer to your question?

2 replies

David.Nguyen
Luminary
Forum|alt.badge.img+2
  • Luminary
  • 1123 replies
  • Answer
  • April 10, 2024

@Marko.Viršek

 

There are probably several solutions to this problem. Here is one implementation with a DIFF operand (to take the difference of two operands):

Note that DIFF in operand calculates the Conic of Surface 2 minus the 1/10th Radius of Surface 1. If both are equal the difference is zero. If the Conic is greater, this is a positive value, if the Conic is smaller, this is a negative value.

One has to be a little bit careful as the sign of the Radii and Conic can change (but I can see you’ve already used ABSO in your screenshot :). I have put the absolute values (ABSO) as optional in case you have another way to already control the sign of the Radii and Conic for some reason. Let me know if this is clear. When running the optimizer with the Merit Function above with only the Conic of Surface 2 as variable, this Conic value goes to 0.5.

Let me know if this is clear.

Take care,

 

David


Thanks for this simple and clear solution.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings