Skip to content

iDesign-Lab/SMOT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

825 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMOT: Spacecraft Mission Optimization Tool

SMOT is a multidisciplinary design optimization tool for maximizing the spacecraft mission performance.

Installation (Ubuntu)

SMOT depends on Python, GMAT, and OpenMDAO. You need to install these dependencies before installing SMOT.

Root folder

Run the following commands to create a new folder called "SMOT" in your $HOME directory and go to this folder on command line. We will install everything into this folder.

mkdir -p $HOME/SMOT && \
cd $HOME/SMOT

Then, run the following commands to create the loadSMOT file. We will need to source this file before installing or running SMOT.

echo '#!/bin/bash' > loadSMOT.sh && \
echo '# SMOT root path' >> loadSMOT.sh && \
echo 'export SMOT_ROOT_PATH=$HOME/SMOT' >> loadSMOT.sh && \
echo '# Miniconda Python' >> loadSMOT.sh && \
echo 'export PATH=$SMOT_ROOT_PATH/miniconda3/bin:$PATH' >> loadSMOT.sh && \
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SMOT_ROOT_PATH/miniconda3/lib' >> loadSMOT.sh && \
echo 'export PYTHONUSERBASE=no-local-libs' >> loadSMOT.sh && \
echo '# GMAT bin path' >> loadSMOT.sh && \
echo 'export GMAT_BIN_PATH=$SMOT_ROOT_PATH/GMAT/R2020a/bin' >> loadSMOT.sh && \
chmod 755 loadSMOT.sh && \
. loadSMOT.sh

Do NOT close the command line window and finish the rest of installation steps below. This ensures that the environmental variables defined in loadSMOT.sh are loaded during the installation.

Python

Go to the SMOT directory and run the following commands:

cd $HOME/SMOT && \
wget https://repo.anaconda.com/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh && \
chmod 755 Miniconda3-4.5.4-Linux-x86_64.sh && \
./Miniconda3-4.5.4-Linux-x86_64.sh -b -p $SMOT_ROOT_PATH/miniconda3 && \
pip install --upgrade pip && \
pip install numpy && \
pip install scipy

GMAT

Download the compiled GMAT code using an internet browser from the following link GMAT. Move the downloaded tarball to the $HOME/SMOT directory.

Go to the SMOT directory and untar using the following commands. You should see a new folder "GMAT" generated.

cd $HOME/SMOT && \
tar -xvf gmat-ubuntu-x64-R2020a.tar.gz

Run this to generate a new file called "api_startup_file.txt" in the GMAT bin folder to enable the Python interface.

cd $HOME/SMOT/GMAT/R2020a/api && \
python BuildApiStartupFile.py

OpenMDAO

Run this command to install OpenMDAO

pip install openmdao

SMT

Run this command to install SMT: the surrogate model toolbox

pip install smt

The prerequisite installation is done. You can now close the command line window.

pyOptSparse

In the SMOT folder, run this command to download pyOptSparse

wget https://github.com/mdolab/pyoptsparse/archive/refs/tags/v2.8.3.tar.gz

[Optional]: If you need to use SNOPT, copy all the SNOPT's .f source files to the pyoptsparse-v2.8.3/pyoptsparse/pySNOPT/source folder.

Then, go to the pyoptsparse-v2.8.3 folder and run this command to install it:

pip install .

SMOT

Before you install the SMOT repo, make sure you load the SMOT environment by running:

. $HOME/SMOT/loadSMOT.sh

Then, download the SMOT repo and run this command to install:

pip install .

Tutorials

Before you run any tutorials, make sure you load the SMOT environment by running:

. $HOME/SMOT/loadSMOT.sh

Then, go to a tutorial folder and run python runScript.py

About

SMOT: Spacecraft Mission Optimization Tool

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages