- Introduction
- Operation Modeling
- Summary
- Set up
- Outreach
- Discussions
- Issues and Tickets
- Contribution
- Website
- Wiki
- Supported Platforms
- Official Codebase
- Download
- License
The Mars Simulation Project is a Java-based open source project that simulates mission operations and activities of initial settlers on Mars with a higher fidelity of modeling and simulation details than a classic PC game of its genre.
mars-sim is designed to be a general purpose simulator depicting the early development of human settlements on Mars.
According to Encyclopædia Britannica, a computer simulation is the use of a computer to represent the dynamic responses of one system by the behavior of another system modeled after it. In essence, a simulation is a mathematical description, or model, of a real system in the form of a computer program.
mars-sim aims to integrate and incorporate as many research disciplines (such as physics, chemistry, biology, economics, psychology, and social science) as possible to simulate the dynamics and behaviors of people, social structure, physical and mechanical systems, and environment in the context of developing human settlements on Mars.
mars-sim models each settler as an intelligent agent which possess varying degrees of autonomy and mobility. It is a symbolic model of reality, given a capacity to learn from experiences and an ability to cooperate with other agents and systems. A settler has prescribed attributes and skills and makes weighted decisions and interacts with one another to produce unexpected results in a sandbox world.
For instance, each settler is assigned with a job, a role, having technical skills, personality traits, natural attributes, and preferences of tasks. They build relationship as they interact and work with one another. They are there to live, dream, explore, and settle Mars.
History is shaped by pioneers. The exploration of Mars started in the 1960s with sending robotic spacecraft to orbit the planet. The apex of this spirit of exploration will be culminated by the first human landing in near future. Early explorers of Mars will come face-to-face with insurmountable challenges. The first generations human explorers will not explore long distances from their habitat but within a region being called an "Exploration Zone", say, within 100 km of their landing. Many mission planning activities would have been taken place prior to their arrival to first identify all the Science and Resource Region of Interests (ROI). mars-sim is modeled to simulate the exploration of Mars within a decade after the first landing. Humanity has shifted into high gears with the effort of making Mars the second home.
mars-sim loosely follows the Mars Direct Mission Plan by Robert Zubrin and has crafted 5 basic settlement types, namely, Phase 1 Base, Phase 2 Base, Phase 3 Base, Alpha Base and special outposts.
In general, a 4-settler initial base is called a Mars Direct Plan (MDP) Phase 1 template. An 8-settler base is constructed under MDP Phase 2 template. A 12-settler base is MDP Phase 3. A 24-settler base is designated as Alpha Base. Besides, players may build a Trading Outpost or a Mining Depot near sites with high mineral concentrations.
Depending on its country or origin and/or sponsor, each template may vary in the numbers and types of building it contains. Altogether, there is a total of 24 settlement templates to choose from.
The selection of a landing site is determined by a variety of factors. One of the goals of mars-sim is to populate Mars with human settlements. Each settlement has an initial sponsor to guide its development but will eventually develop its own command structure and development objective.
In terms of economics modeling, mars-sim implements the Value Point (VP) system, which keeps track of the supply and demand on each good and resource. As there is no standard currency established on Mars yet, settlers barter trades with neighboring settlements by keeping track of the credits and deficit based on the VPs of the resources in exchange in each trading session.
It is an incredible undertaking in that 30 countries are participating in this dream of making Mars as the second home for humanity. Altogether, there's a total of 9 possible space agencies to choose from as a sponsor to start a settlement. Notably, European Space Agency (ESA) is a bloc that consists of 22 member nations willing to fund this space development effort.
mars-sim depicts near-term human exploration and settlement on Mars. It speaks of a rich scientific language selected from research journal and paper in defining operation paradigms and programming models that are based on present-day technologies.
Without a doubt, settlers need a timekeeping standard system for tracking the passage of time. That's because living on Mars does require a functioning Martian calendar in which settlers may keep track of days (or sols) that have elapsed. At the same time, astronomers would prefer to come up with a calendar that is handy and intuitive in predicting the orbit of Mars around the sun.
The difficulties arises when each sol on Mars has slightly more than 24 earth hours and there are 669 earth days on one Martian orbit (or year). Therefore, it is not a straight-foward exercise in converting the time and day between Mars and Earth by merely a simple equation.
See timekeeping wiki for further discussions on this topic.
While at the Earth's sea level, the atmospheric pressure is 101.35 kPa (14.7 psi) and has 20.9% oxygen, in mars-sim, a low pressure atmosphere of 34 kPa (4.93 psi) is chosen for the settlement living with the composition of oxygen at 58.8%.
However, EVA suit or rovers (inside a vehicle) adopt an even lower pressurized environment of 17 kPa (2.47 psi) for more optimal use of resources and design specifications. In comparison, Apollo Lunar Module (LM) atmosphere of 100% oxygen at 33 kPa (4.8 psi). The National Aeronautics and Space Administration (NASA)'s Shuttle airlock has an oxygen concentration of 30% at 70.3 kPa (10.2 psi). NASA's Extravehicular Mobility Units (EMU) has the operating pressure of 29.6 kPa (4.3 psi). The upcoming Artemis program's lunar lander will have an atmosphere of 342% oxygen at a pressure of 56.5 kPa (8.2 psi).
See Atmosphere wiki for more design details.
In mars-sim, each habitable building has a life-support system with various functions built-in that continuously monitor and periodically replenish oxygen, carbon dioxide, and water moisture. These gases are produced via chemical systems such as Sabatier Reverse Water Gas (SRWG), and Oxygen Generation System (OGS), etc.
Structurally speaking, a low-pressure environment reduces the need for a rigid structure that supports various load requirements for a building. It also facilitates occupants' Extra-Vehicular Activity (EVA) with the outside world.
An example of operation modeling is the sequence of steps involving the ingress and egress of airlocks.
To walk onto the surface of Mars, a settler must come through an intermediate chamber called the airlock to exit the settlement. The airlock allows the passage of people between a pressure vessel and its surroundings while minimizing the change of pressure in the vessel and loss of air from it.
In mars-sim, the airlock is a separate building joined to any Hab (which stands for cylindrical habitation module) such as Lander Hab, or Outpost Hub, Astronomy Observatory, etc. All rovers have vehicular airlock built-in.
To perform a team EVA, one of the members will be selected as the airlock operator, who will ensure that proper procedures be followed before going out for an EVA or after coming back from an EVA.
In case of an egress operation, (1) the airlock would have to be pressurized. (2) The air would be heated so that the atmospheric pressure and temperature are equalized. (3) Next, the airlock operator would unlock and open the inner door. (4) The whole team would enter into the airlock. (5) After all have donned EVA suits, the operator will depressurize the chamber and gases would be re-captured to match the outside air pressure. (6) At last, he/she would unlock and open the outer door and the whole team will exit to the outside surface of Mars.
See Airlock wiki for details on this topic.
Another example is Radiation Modeling, which account for how often the Galactic Cosmic Ray (GCR) and Solar Energetic Particles (SEP) would occur during EVA. The cumulative dose is closely monitored in 3 specific exposure interval, namely, the 30-day, the annual and the career lifetime of a settler. It would affect 3 different regions of our body, namely, the Blood Forming Organs (BFO), the Ocular Lens, and the Skin. The dose limits are measured in milli-Severt.
Each settler is initially assigned a meaningful job that fit one's attributes and career profile. Player may designate the job of a settler in the xml file.
Each settlement has a command structure that brings each settler a role to play.
Settlers spend much of their time learning to live off the land and engage in various tasks such as maintenance, ensuring life support resources are plentifully supplied, growing food crops in greenhouses, making secondary food products, and manufacturing needed parts and equipment in workshops, all of which are vital to the health of the economy of the settlements.
Each settler is assigned a work shift during each sol. The duration of a work shift may be one third of a sol or a quarter of a sol.
Settlers also go out on field Missions to explore and study the surrounding landscapes, to prospect and mine minerals, and to trade with neighboring settlements, etc. They may even decide to migrate from one settlement to another.
The perils of living on Mars are very real. Even though we do not have a complete surface weather model for Mars, we do currently simulate a total of 9 outside weather metrics in mars-sim.
The perils of living on Mars are very real. There is a total of 39 types of Malfunctions that can occur at a given moment.
There are 3 metrics for tracking how reliable a Part is. The Reliability is shown in terms of Percentage, Failure Rate, Mean Time Between Failure (MTBF), which are dynamically updated in light of any incidents that occur during the simulation. Besides malfunction, workshops and machinery factories are to produce parts for replenishing parts to be used during regular maintenance tasks.
Mars is a harsh world but is certainly less unforgiving than our Moon. Settlers come face-to-face with accidents, equipment malfunctions, illnesses, injuries, and even death. Survival depends on how well they work together, improve their survival skills and balance individual versus settlement needs.
As the settlers learn how to survive hardship and build up their settlements, players are rewarded with the pure joy of participating in this grand social experiment of creating a new branch of human society on another planetary surface.
Below is a summary of how player may set up one's machine to evaluate and develop mars-sim
Currently, mars-sim supports Java 17 which is the latest long-term support (LTS) release.
- Requires only JRE 17 for running mars-sim
- Requires only JDK 17 (or openjdk 17) for compiling binary
Beginning Java 11, the JRE/JDK package is being decoupled from the graphic JavaFX API package.
For the open source community, the OpenJDK is also being decoupled from the OpenJFX.
Currently, mars-sim does not require JavaFX.
Note 1 : Specifically, the official release of mars-sim (v3.1.0 to v3.5.0) do not utilize JavaFX / OpenJFX.
Therefore, it's NOT a requirement to install it for running mars-sim.
Some unofficial releases of mars-sim in the past may have required JavaFX.
However, if you want to run any other JavaFX apps, make sure you download and configure the OpenJFX or JavaFX package on top of the JDK.
See ticket #156 to read the discussions on how to set up JavaFX to run it under Java 11.
Obtain the latest JRE/JDK for your platform. Here are some of the popular OpenJDK packages out there :
If you need JavaFX, we recommend downloading the Full JDK
64-bits package.
In case of Liberica, the Full JDK
includes LibericaFX, which is based on OpenJFX, for
running other apps that requires JavaFX.
Assuming that OpenJDK 17 is being used.
-
The debian edition of mars-sim comes with debian installer for quick installation. However, you will have to install, configure and properly update the JDK or openJDK binary in your linux machine in order to run mars-sim. Please google to find out the most updated instructions for your distro.
-
To manage multiple versions of java with the use of a tool called
SDKMan
, see this DZone article.
-
Check if the directory of JDK is at
Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
. See DZone for more instructions. -
Enter
/usr/libexec/java_home -V
to find out which version of Java you have installed.
Choose MSI version that will automatically set up the environment path correctly.
However, there are cases that the path
variable and JAVE_HOME
variable are not being configured properly.
See this page for explanation.
In the command prompt, try java -version
to see what version of Java is first being found in your specific cases.
Follow the steps below :
-
Locate the folder with Java installation. For instance, "C:\Program Files\Java\jdk-17" may be your JDK's location.
-
Under System variable, ensure
JAVA_HOME
has been added and set up correct as follows:
set JAVA_HOME=C:\Program Files\Java\jdk-17
2a. Alternatively, one may start a command prompt and type this set JAVA_HOME="C:\Program Files\Java\jdk-17"
- Under both User and the System variable, set the
PATH
variable to include the JDK folder. For instance,
set PATH=C:\Program Files\Java\jdk-17\bin
or
set PATH="%JAVA_HOME%\bin";%PATH%
Note 2 : The order of precedence inside
PATH
variable is crucial. The first available folder having Java executable inside will be the one to be loaded by Windows OS.
Note 2a : The
\bin
may be crucial. When runningjava -jar xxxx.jar
, mars-sim will look for the presence of thejava.exe
in Windows OS. If\bin
is missing in theJAVA_HOME
variable, the Windows OS may not be able to locate thejava.exe
and may continue to go down thePATH
variable to look for a valid JDK folder. If it's not found, java cannot start mars-sim.
Note 3 : The BEST approach is to enable only one Java build (such as Java 17.0.8) inside
PATH
variable and remove all other folders referencing other java versions/builds.
- Remove any path similar to
C:\ProgramData\Oracle\Java\javapath;
inPATH
variable. It can interfere with the correct version of Java that you would like to use.
Note 4 : Depending on the order of precedence in
Path
variable,C:\ProgramData\Oracle\Java\javapath
can load the undesired version of jre/jdk, instead of the java version you prefer.
-
To test the version of Java that your machine is using, type "java -version" in a command prompt window.
-
It's possible for a machine to have multiple versions of Java installed. To check if a particular Oracle version of Java is being enabled, start Java Control Panel (JCP) from the Control Panel as follows :
- Move your mouse to the magnifier icon (the 2nd icon from the left) on win 10 task bar.
- Type
Configure Java
. - Hover your mouse over the
Configure Java
and click to start theJava Control Panel
. - Click on
Java
tab on top. - Click on
View
button to open up another panel window. - Click on the checkbox on the
Enable
column to enable or disable any installed versions of Java.
Note 5 : In JCP, each row represents a version of Java. Unfortunately, this panel only tracks the official Oracle versions. If you install any openJDK's on your machine, JCP won't be able to recognize them.
- To track what versions of openjdk have been installed on your machine, you may try using JDKMon.
To set up true headless mode in your platform, follow the steps in this wiki.
Feel free to use our Facebook community to discuss relevant topics with regard to the development of mars-sim. See also old/archived SF discussions.
Feel free to start a thread on a particular topic at our GitHub Discussion page.
Help us by filling in the info below when submitting an issue :
Describe the bug
- A clear and concise description of what the bug is.
Affected Area
- What area(s) are we dealing with ? [e.g. Construction, Mission, Resupply, Settlement Map, Mini-map, Saving/Loading Sim, System Exceptions in Command Prompt/Terminal, etc..]
Expected behaviors
- A clear and concise description of what you expected to happen.
Actual/Observed Behaviors
- A clear and concise description of what you have actually seen.
Reproduction (optional)
- Steps to reproduce the problem
Screenshots
- If applicable, add screenshots to help explain your problem. e.g. Include the followings :
- Person Window showing various activity tabs
- Settlement/Vehicle Window
- Monitor Tool's showing People/Vehicle/Mission tabs
- Settlement Map, etc.
Specifications (please complete)
- OS version : [e.g. Windows 10, macOS 10.13, Ubuntu 14.04]
- Java version : [e.g. Oracle JDK 17.0.8, AdoptOpenJDK 17.0.8, openjfx 17]
- Major version and build : [e.g. 3.6.0 build 8558]
Additional context
- Add any other context about the problem here. By providing more info above when filing it, you help expedite the handling of the issues you submit.
Note 1 : if you double-click the jar file to start mars-sim and nothing shows up, it's possible that an instance of JVM is already being created in the background that has failed to load Main Window. To see if it's indeed the case, in Windows OS, you may hit Ctrl ESC to bring up the Task Manager and scroll down to see any orphaned instances of
Java(TM) Platform SE binary
running in the background. Be sure you first clear them off the memory by right-clicking on it and choosingEnd Task
.
We welcome anyone to contribute to mars-sim in terms of ideas, concepts and coding. If you would like to contribute to coding, see this wiki for developers. Also, we will answer your questions in our Gitter chatroom.
For a more detail description of this project, see our project website.
- Check out our wikis at GitHub.
- Windows
- MacOS
- Linux
-
Check out the most recent release or pre-release build in GitHub Release page.
-
Or see the previous and current official release versions at SourceForge Repo.
Note: if you prefer, click SF's button below to automatically sense the correct OS platform to download.
This project is licensed under the terms of the GPL v3.0 license.