Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delivery a new approach to managing Missions #920

Merged
merged 10 commits into from
Jun 16, 2023
Merged

Delivery a new approach to managing Missions #920

merged 10 commits into from
Jun 16, 2023

Conversation

bevans2000
Copy link
Member

This PR deliveries a new approach to managing Mission.

This new approach is demonstrated in a new Mission called TestDriveMission. This mission can only be created via the console create mission command at the moment.
The new mission type is fully integrated into the Monitor & Mission tools and the console commands

The new approach concept represents the Mission as a number of seperate MissionStep where the new Project class is used to progress and advance throught the steps.
This provides a very easy to understand and flexible. There are a number of common shared steps:

  • MissionTravelStep - involves driving from one NavPoint to another.
  • MissionBoardVehicleStep - handles getting members to board a vehicle
  • MissionLoadVehicleStep - handles loading a vehicle, could be the start or in the middle as in a Trade mission.

To accompany the changes there calculation of requires "supplies" has been changed. Each unprocessed step is queries for the suplies it needs. These are captured in a new MissionManifest class.

Note the current implemented steps do not have the full feature of the old Missions, e.g. no handling of Vehicle malfunctions.

Close #890

Changes:
- Create a TravelMissionStep that moves a Vehicle between 2 locations using the NavPoint class.
- The travel step calculates the resources required.
- Create MissionVehicleProject that is a step based Mission but specialised for using a Vehicle.
	This extracts the NavPoint route from the Mission steps.
- Create TestDriveMission that drives a vehicles to a remote location and then return back home.
- Create a test case for the drive mission
- MissionStatus can be created outside the old mission package.
- Project returns a reference to the active Project step instead of just the name.
- Update the ProjectTest class
- Scope of ProjectStep.start method changed to allow Mission based steps in a different package
- MockSettlement is at the equator to remove distance calculation problems

Part of #890
Changes:
- Remote the use of indexes in the interface
- VehicleMission returns the NavPoint routes instead of the size and a getter
- Updated console display to show whole route but "tag" current one
- UI panels interate the route list instead of calling the getter

Part of #890
Changes:
- Mission uses the new Manifest to capture the Resources & Items for a Mission
- MissionProject finds the Worker once the Mission Steps have been defined

Part of #890
Changes:
- Create a board vehicle & disembark mission step; skeleton implementation currently
- Creste a load vehicle mission step. This uses the existing Loading Controller.
- MissionManifest added support for holding Items
- MissionVehicleProject returns the loading Plan only if a loading step is active.
- MissionVehcileProject create the standard start/stop steps around the real Mission active steps
- Travel step add supplies for Crew to the resources
- Create test case for TestDriveMission to test creation
- Create a skeleton TestDriveMetaMission to act as a factory for the TestDriveMission
- Console cretae misison commadn supprots the TestDrive mission

Part of #890
Changes:
- MissionBoardVehicleStep implements the logic of boarding a vehicle
- Boarding logic can ehject memebrs that are late, call members to board, depart the Vehicle
- ProjectStep records when it is completed
- MissionStep provides base method getMission for steps

Part of #890
Changes:
- Create the MissionCloseStep that make the leader close the Mission
- Non-leader members leave the Mission when executing the close step
- Project now has a compelted callback when the Project completes
- MissionProject catches the completed callback and completes the mission by calling clearDown method
- MissionVehicleProject releases the assigned vehicle as part of the clearDown method
- Disembark step move members into the Settlement
- Disembark step is completed once Vehicle is empty and everyone has left the vehicle
- Travel step will move the vehicleto the Garage on the complete method
- Members leaving a Mission leave the OnCall Shift
- MissionWindow uses Settlement.getName method for node name

Part of #890
Distance calculations implemented & parts added to manifest

Changes:
- MissionVehicleProjeect provides a method to calculate time to travel a distrance
- Board Vehicle step calculates the number of malfunctions and add the parts to the manifest
- MissionManifest now add Items to the resource list
- Travel step returns how far the current steps has been coveed
- Vehicle project calculates the remaining and covered distances

Part of #890
@bevans2000 bevans2000 requested a review from mokun June 16, 2023 17:30
@mokun
Copy link
Member

mokun commented Jun 16, 2023 via email

@mokun mokun merged commit 7d079ab into master Jun 16, 2023
@bevans2000
Copy link
Member Author

Yes took a while but I'm very happy with the outcome. The nature if using a set of steps is really clean

@mokun
Copy link
Member

mokun commented Jun 16, 2023 via email

@bevans2000
Copy link
Member Author

I want to convert the dig missions next as that will introduce an sharable EVA step.
Also need to do

  • Checking resources during the mission
  • Selecting vehicles
  • selecting members

@mokun
Copy link
Member

mokun commented Jun 17, 2023

dig missions next as that will introduce an sharable EVA step.

I like that. Will there be a division of labor in these types of outside EVA activities ?

I suppose in terms of building a weather station, there will be many activities involved and person A may be doing X and Y, while person B may be doing Y and Z and person C may be doing X and Z, etc.

That's why if we can implement the idea of the shared task first (please see and comment on #919), then it may get really easy to implement capture the spirit of a sharable EVA step.

What would you say ?

@bevans2000 bevans2000 deleted the drive_issue890 branch June 20, 2023 17:52
@mokun
Copy link
Member

mokun commented Jun 15, 2024

@bevans2000

Do you want to continue on this thread ?

@bevans2000
Copy link
Member Author

This pr is closed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Create a new TestDrive Mission
2 participants