Solved

Update Merit Function via ZOS-API

  • 6 March 2023
  • 1 reply
  • 249 views

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

icon

Best answer by David.Nguyen 6 March 2023, 12:35

View original

1 reply

Userlevel 7
Badge +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