Rework salvaging any aging buildings, vehicles, or robots having too many malfunctions or maintenance
Describe the bug
- At sol 200+, perhaps due to insufficient inspections and maintenance, some buildings, vehicles, or robots are falling part.
- As a result, the
MalfunctionManagercan potentially throw a lot of malfunctions. - The settlement won't be able to handle a spurious of malfunction all at once.
- For salvaging old buildings, it's uncertain if
BuildingSalvageMissioncan be triggered properly. - For salvaging old robots, it is NOT possible because there is currently no salvaging task for getting rid of robots.
- For salvaging old vehicles, it be triggered by
RescueSalvageVehicle, thus relying on extra work that are not reliable.
Expected Solutions
- Ensure
BuildingSalvageMissionworks as expected and provide unit tests if possible. - Add SalvageRobot meta task and task.
- Decouple salvaging vehicle from the
RescueSalvageVehicle. Rework and split it into 2 missions such asRescueVehicleMissionandSalvageVehicleMission.
Specifications
- pre-3.10.0
Related Issues and Discussions
Salvage of building is touched upon by #1642
Salvage of building is touched upon by https://github.com/mars-sim/mars-sim/issues/1642
I suppose if the salvage value of a building is very high and higher than its existing value, then it may get across a threshold level that it needs to be salvaged.
But who's going to give the final authority to do that ?
If it's player commander, we could have a dialog with a modality popping up asking if he wants to salvage that building.
And there can be a checkbox in the Salvage tab (does it exist ?) for player to check or uncheck the option of the dialog box pop up.
I think salvaging would always be user started
I think salvaging would always be user started
But how do we handle the spurious log of malfunction/maintenance events ?
May be we need to fix the notification system to make it work again.
Another aspect is that we probably still want to scale up the simulation to run unattended for 1000 sols and for long haul.
How do we strike the balance with keeping the automation (as if we are developing AI players) while encouraging player interaction ?
@Urwumpe feel free to interject on how to make it work.
Well, the gold plated solution from the digital twin world would be giving all entities that can be build, produced, used or scrapped get a life cycle status, like:
- Created
- Planned / Designed
- Under Construction / Production
- In operation
- Getting transported
- Mothballed
- In revision / long-term maintenance
- In disposal
- End of life
- etc.
But since we are all digital twin in MSP, it makes only little sense to do it strict like that. If we produce 1000 gaskets, they don't need it, but we could use the option to mark produced gaskets as "in disposal" to have a better inventory control.
For buildings, robots, rovers and other equipment, on the otherhand, it could make sense to at least reference a Lifecycle Management object.
giving all entities that can be build, produced, used or scrapped get a life cycle status
Yes I like the idea of a lifecycle.
Very good point that we ought to explicitly tag all entities on how far they are in the lifecycle and propose actions accordingly.
Currently in MalfunctionManager, we've already been tracking the the wear and tear of each entity in terms of a percentage but lifecycle would be a step toward a better definition of what needs to be done.
In 3.11.0 or beyond, we could implement @Urwumpe's concept of a life cycle to better address how much effort to put in to maintain old and expiring buildings, vehicles, equipment and robots (versus salvaging it and replacing it with new ones).