I think that one should come up with a function based on the antenna.
Canned functions are generally good only for initial optimizations.
Lately I like to start with a simple -F "-ave_net_gain" (see the tutorial
) for an antenna with a single sweep.
Generally one cannot achieve more gain than that. and it already minimizes the SWR because high SWR leads to gain losses which reduce the net gain. But...
If I don't like the curve this produces, I would try to control it by putting a target curve (with -t(target_gain1,target_gain2,...))
and a target function of the kind -F "w1*max_gain_diff+w2*ave_gain_diff" (here w1,w2 are weights of importance between 0 and 1 with sum 1)
if I don't like the SWR I would add a token in the function controlling it --swr-target=2 -F "w1*max_gain_diff+w2*ave_gain_diff + w3*max_swr_diff" .
If the F/B is insufficient I'd add a target and a function token for it, etc
And again, forcing things numerically closer to desired targets will produce lower average net gain compared to the simple -F -ave_net_gain
For multiple sweeps things are more complicated and more experimentation is needed. But the relative performance of the multiple sweeps is controlled with different target curves and using target dependent function tokens (***_gain_diff)
The initial runs can be done with relatively small --de-np, autosegmentation and sweep sampling, sacrificing accuracy for speed. Once there is a good feel for how the antenna behaves those can be increased.
I know this is too general explanation, but the generality allows flexibility.