How to compare only specific fields using compare() function

Hello,

Can someone tell me how to compare only specific fields of two objects using compare() function? I have two objects with queues as members. I want to use obj_1.compare(obj_2) to compare all fields within the queue except a few. Is there a way to selectively turn off comparison for specific fields in the compare() function?

See the code in this article: OVM/Transaction/Methods | Verification Academy

We strongly recommend that you write your own do_compare method that does the comparison exactly the way you want it to. If you want to dynamically change what you want to compare, you can use the configuration mechanism to set flags on what you want to compare.