I have not run the code, but it seems in the current implementation, `obj.z0` is fixed after the constructor, since `getInitialVars` does not return the object, so `z0` field is not changed. For every different initial guess, we have to reconstruct the whole problem.
If `getInitialVars` returns the object, the user will still need to call two functions to solve the problem
```  
obj = obj.getInitialVars(t_init,traj_init);
[xtraj,utraj,ztraj,F,info] = obj.solve();
```
We can combine them into one function call
```
[xtraj,utraj,ztraj,F,info] = obj.solve(t_init,traj_init)
```
This looks cleaner to me