Skip to main content

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

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