Optimal Control Applied To Resource Allocation In A Pde Ecosystem Model And A Zika Virus Epidemic Model