Solve the averaged low-thrust optimal control transfer problem
pip install realoot==1.0.2
The application solves the averaged optimal minimum time orbit transfer problem. It is initially inspired by [MIPELEC] that uses the averaged optimal control formulation. This application however includes important upgrade, such as:
IMPORTANT WARNINGS
Download the latest version source code from the main page as a zip.
There are mandatory third-party products:
The building and compilation is based on cross platform CMake configuration file. Go into the root folder. In a console, type
mkdir build_directory
cd build_directory
cmake -DCMAKE_INSTALL_PREFIX=[your install path] ..
where [your install path] defines the installation destination directory ("prefix"). (If omitted, the build would most probably be installed in /usr/local.)
Then:
make
make install
The build [your install path] folder should contain:
If you want to compile the unit tests, add DBUILD_TESTS to the cmake call,
cmake -DBUILD_TESTS=ON .
and then run: ctest
or make test
If you do not want to the Python Package,
cmake -DBUILD_PY_PKG=OFF .
In the build directory, you should now be able to run the app by running the executable. The program takes as input an script, which define the problem and the program options. Have a look at input.xml for guidance on how to setup the problem. The program is then launch with realoot [input xml file]
Import
from realoot import core, utils, main as lt
Then either, as for the application, open a script file with
reader = utils.InputScriptReader()
problemDefinition, problemContext = reader.readXml("examples/ex2.xml")
lt.solve(problemDefinition, problemContext, problemSolution, True)
Or define manually your problem filling the structure
problemContext = core.LtProblemContext()
problemDefinition = core.LtProblemDefinition()
Then call
lt.solve(problemDefinition, problemContext, problemSolution, True)
Please see the examples for details.
To run Python unit tests, run:
python -m unittest discover -v --start-directory test