-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
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
Finally the Project Mission delivered !
…On Fri, Jun 16, 2023 at 10:30 AM Barry Evans ***@***.***> wrote:
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 <#890>
------------------------------
You can view, comment on, or merge this pull request online at:
#920
Commit Summary
- dd3e897
<dd3e897>
Create TestDriveMission
- 78985a5
<78985a5>
Simplifiy the VehicleMission interface
- 17ba14f
<17ba14f>
Create a MissionManifest class
- 2fbd4d7
<2fbd4d7>
Create Mission step to start and end Mission
- ec2cf15
<ec2cf15>
Change name of Mission load step
- eaf8cdf
<eaf8cdf>
Implement the Board Vehicle step
- 31c8cd9
<31c8cd9>
Implement close down of TestDrive Mission
- 232f532
<232f532>
Correct missed UnitTest
- 963bc2b
<963bc2b>
Add mission feature of Vehicle Mission
- cd3f747
<cd3f747>
Merge branch 'master' into drive_issue890
File Changes
(35 files <https://github.com/mars-sim/mars-sim/pull/920/files>)
- *M*
mars-sim-console/src/main/java/org/mars/sim/console/chat/simcommand/CommandHelper.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-d69ee5e7f322a569c7a245781970e86576628ae6bcf5faa190f142bd923a137a>
(14)
- *M*
mars-sim-console/src/main/java/org/mars/sim/console/chat/simcommand/settlement/MissionCreateCommand.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-516bd508cabc180886c5e448a2962b61f2d272654d32d54fb902eefa2aef60d6>
(9)
- *M* mars-sim-core/src/main/java/org/mars_sim/msp/core/Simulation.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-a3e62e5e6ca1a7b1a7e0965643efa0903e113c8393f3a57af3d9c82e71d1819a>
(5)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionBoardVehicleStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-30bcd3b314e729b8104ca56d390c8f65ba0f214be76896c6765a9ca626718181>
(246)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionCloseStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-a266ba3417f27165815a460e1e4c5bdbcc78e43724dc9b586a426b49d61c41b0>
(52)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionDisembarkStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-ee4ae2802ca9f1256d751aa55bb62d0f6d3f448b8828fe3583b05e1bce7422a6>
(183)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionLoadVehicleStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-98e5eee8b08aeb13418cc32d89c0054f98bea61e482b5d4e51cc2835c4700fee>
(122)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionManifest.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-ce9178a67d55c782041ec543baeb7e0fad5d681486d6ee52e3eff0634cfe6b50>
(81)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionProject.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-9da28034a3517e46e0ecf252e556875f9e241e6342c0b75596fad92119da9eba>
(242)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-f2d89438cbc4fdd8961ee31c9507e494a66e0c3334613631e7aa1c5cc1541e57>
(106)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionTravelStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-495fa10e92f759ab573d32fd5bd33ecdf3771c6da78f5d7e8c3f0ad9a98160ad>
(189)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/MissionVehicleProject.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-039901e9042b68c19a14b661b13811ef90d4d0d1c79d866e505eaea08bea7fdb>
(261)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/predefined/TestDriveMetaMission.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-6a9dd9cd5a81b6a0ccb6e55d1d970e44ec7959866dfb4f3139ee22763a35a177>
(58)
- *A*
mars-sim-core/src/main/java/org/mars_sim/msp/core/mission/predefined/TestDriveMission.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-1bf247a1a5a152896f872ec1b332a499c8babb9614587895be781e1cd1181647>
(46)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/AbstractVehicleMission.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-ddf6763ff04697685f31aa2dd8b8747d56189ba4c78e0b8d3640d8044bd0292b>
(34)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/EVAMission.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-ca4ae32519bd38664e7dee5edfe985e412b2653a67e933ca652120fd6da43f2a>
(4)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/MissionLog.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-44dee5e367495d0ac05160cf4c75db64c32a0f3e78d0ba22f140085202ff3ebd>
(2)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/MissionStatus.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-98c98506335f3b891e65e26cff06316724382d46cd5cd12a61f27b843e140bdd>
(2)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/person/ai/mission/VehicleMission.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-a33febe33ebef4152ac5b5358ccadfaf56fd938e479079d99d8f622bf56c1b35>
(18)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/project/Project.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-55375f0965ad37c57685503734c0b4644480d227beec273f1313d77d3f0cf011>
(30)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/project/ProjectStep.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-de6208b9c1100e47602ed52ee5f2f606740561dc61f3311818409ccf6ad94a2a>
(16)
- *M*
mars-sim-core/src/main/java/org/mars_sim/msp/core/vehicle/Vehicle.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-6ab9ca31a460df04e146cf2563ee866e876234c52142fadc34cc2d0cf2164c95>
(13)
- *M* mars-sim-core/src/main/resources/messages.properties
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-5ccc75571840c0d1e5e75856f5d3c0ab937d891fec03ab9bab0d7fe3f7786b71>
(2)
- *M*
mars-sim-core/src/test/java/org/mars_sim/msp/core/AbstractMarsSimUnitTest.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-f809a773776f0cf6e5522780b63e779a2812696c47ce41257cbc73ddb8a8e02b>
(2)
- *M*
mars-sim-core/src/test/java/org/mars_sim/msp/core/TestCoordinates.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-226a764c5da0c22e609a157d9d49419adbbac3c59e9af7e151e4a5e8b67521f3>
(3)
- *M*
mars-sim-core/src/test/java/org/mars_sim/msp/core/mission/MissionProjectTest.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-2eb13bbc572314a2190a3b041e38020194fad3d72ef243fe9e44d3ac38025fa6>
(51)
- *A*
mars-sim-core/src/test/java/org/mars_sim/msp/core/mission/predefined/TestDriveMissionTest.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-835ed94a433ee9e592f729bbf9c8ba67b86f1afb8e329982a1fe2b192275fc44>
(92)
- *M*
mars-sim-core/src/test/java/org/mars_sim/msp/core/project/ProjectTest.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-84a757833c47dfe4b472958294239974b990a19445714e165deef5f9f2d5884f>
(12)
- *M*
mars-sim-core/src/test/java/org/mars_sim/msp/core/structure/MockSettlement.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-2a063d2fd6011d2bb601bd1926aaf61c7346a2b62877a8bce2b6be7f1d8c23ad>
(2)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/map/NavpointMapLayer.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-a647e7ff2b084f0f6dc99e876dc744e1d8ae81bbc2d1d6f7929182ef445fb145>
(4)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/mission/MissionWindow.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-4514165958dfbd7c7b3bb8c59e9ed034b1e4296d0253855d162d4f419f263090>
(1)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/mission/NavpointPanel.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-317ecb6929ea2403517a863cff8b427d2fa90749b1552bfae1ca79ebe9421ae8>
(8)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/mission/edit/InfoPanel.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-f01146643314d3c8b7df0207066a7b3e6230685d8dd7e4e8cea4ac5aa736ade4>
(16)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/tool/monitor/MissionTableModel.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-0624eeba6fcd4d5c9bfba2cd92d31b422c9fc77fcf90bb26f74c82e2f416aff6>
(2)
- *M*
mars-sim-ui/src/main/java/org/mars_sim/msp/ui/swing/unit_window/vehicle/NavigationTabPanel.java
<https://github.com/mars-sim/mars-sim/pull/920/files#diff-a46fbd621c173edbdd7716eee6adb33a19a24ca8e034e52b7f612404a1fc0cf0>
(19)
Patch Links:
- https://github.com/mars-sim/mars-sim/pull/920.patch
- https://github.com/mars-sim/mars-sim/pull/920.diff
—
Reply to this email directly, view it on GitHub
<#920>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAI5JSHZE5NCSQTOVLVHSLTXLSJ4TANCNFSM6AAAAAAZJRFVGI>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Yes took a while but I'm very happy with the outcome. The nature if using a set of steps is really clean |
Yes I can appreciate that there's no more crazy calling of
determineNewPhase() and performPhase() !
…On Fri, Jun 16, 2023 at 12:02 PM Barry Evans ***@***.***> wrote:
Yes took a while but I'm very happy with the outcome. The nature if using a set of steps is really clean
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
I want to convert the 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 ? |
Do you want to continue on this thread ? |
This pr is closed now |
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 newProject
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 oneNavPoint
to another.MissionBoardVehicleStep
- handles getting members to board a vehicleMissionLoadVehicleStep
- 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