Bunch of new properties, remove unnecessary function arguments

- Add properties for prediction horizon of states & inputs
- Add properties for obstacles, current state, reference index,
  and termination flag
- Update constructor to take in and set new properties
- Move properties with calculated values to constructor
- Remove function inputs for new properties
- Rename `curr_state` to `Y_curr` in `MPC_Class.m`
- Use object properties instead of function arguments (e.g., obj.ref_idx)
This commit is contained in:
Sravan Balaji
2021-12-12 13:26:15 -05:00
parent fde6b62ac4
commit 96aa438587
2 changed files with 66 additions and 39 deletions

View File

@@ -38,6 +38,6 @@ load('ROB535_ControlProject_part1_Team3.mat');
Y_ref = ROB535_ControlProject_part1_state;
U_ref = ROB535_ControlProject_part1_input;
obj = MPC_Class(TestTrack, Y_ref, U_ref);
[Utemp, FLAG_terminate] = obj.compute_inputs(Xobs_seen, curr_state);
obj = MPC_Class(TestTrack, Xobs_seen, curr_state, Y_ref, U_ref);
[Utemp, FLAG_terminate] = obj.compute_inputs();
end