Combined plasma–coil optimization algorithms