Skip to main content
Solved

Update Merit Function via ZOS-API

  • March 6, 2023
  • 1 reply
  • 518 views

Lukas.Hani

Hello,

is there a way in the ZOS API to update the merit function to read current values of operands? After operands have been inserted, the current value is only displayed after an update. 

Greetings, Lukas

Best answer by David.Nguyen

Hi Lukas,

 

As far as I know, you just need to call:

TheSystem.MFE.CalculateMeritFunction()

For the Merit Function to be updated and its current value returned.

Did you know that with the ZOS-API there’s also a handy GetOperandValue method that you can use to calculate the value of an operand without having the operand in the Merit Function editor. For example:

print(TheSystem.MFE.GetOperandValue(ZOSAPI.Editors.MFE.MeritOperandType.EFFL, 0, 2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))

This would give you the value of EFFL at Wave 2 without having to add this operand to your Merit Function.

I hope this helps, and take care,

 

David

 

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

David.Nguyen
Luminary
Forum|alt.badge.img+2

Hi Lukas,

 

As far as I know, you just need to call:

TheSystem.MFE.CalculateMeritFunction()

For the Merit Function to be updated and its current value returned.

Did you know that with the ZOS-API there’s also a handy GetOperandValue method that you can use to calculate the value of an operand without having the operand in the Merit Function editor. For example:

print(TheSystem.MFE.GetOperandValue(ZOSAPI.Editors.MFE.MeritOperandType.EFFL, 0, 2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0))

This would give you the value of EFFL at Wave 2 without having to add this operand to your Merit Function.

I hope this helps, and take care,

 

David

 


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