Installation and usage instructions
ReSiE is written in Julia and shipped as a Julia codebase. This means that it can be run on any machine that can run Julia. At the moment no compiled binaries are availabe for any platform. The following instructions help you to install and use ReSiE. There are two tools that help with creating the required input files for ReSiE and running simulations, described in this chapter.
Requirements:
- Julia, minimum v1.8.5 and tested up to v1.12.2. You can find installation instructions here. Works best using Juliaup instead of precompiled binary files.
- Internet access during installation, as the dependencies have to be downloaded
Installation of ReSiE:
- Get a copy:
git clone https://github.com/QuaSi-Software/resie.git- As an alternative to Git, you can also download the repository from one of the releases on GitHub. Download the source code as a
.zipfile and unpack it to the target directory.
- As an alternative to Git, you can also download the repository from one of the releases on GitHub. Download the source code as a
- Switch into the ReSiE root directory:
cd /path/to/resie - Start the julia REPL with
julia - Switch to the package REPL with
](no enter necessary) - Activate the local environment:
activate . - Install and precompile required packages:
instantiate. This should create a file calledManifest.tomlin the ReSiE root directory and may take a while to complete. - Exit out of the package REPL with shortcut
Ctrl+c - Exit out of the julia REPL with
exit()or shortcutCtrl+d
Usage of ReSiE:
A full description of how to use ReSiE on the examples it ships with can be found in this chapter. In the following the CLI of ReSiE is described, which is used when running ReSiE on a local machine:
- Switch to the ReSiE directory:
cd /path/to/resie - Start the CLI with
julia --project=. src/resie-cli.jl - In the CLI you can access the
helpcommand for more information or start a simulation withrun path/to/project/file.json. If you are running multiple simulations and are only changing the project file (not any code) inbetween each run, it is very beneficial to stay within the CLI for a performance boost.- If instead you are changing code frequently and only want a single simulation run, you can also start the CLI with the run command and its arguments, as well as making use of an optional parameter:
julia --project=. src/resie-cli.jl run --exit-after-run path/to/project/file.json. This is will start the CLI, run the simulation and then exit.
- If instead you are changing code frequently and only want a single simulation run, you can also start the CLI with the run command and its arguments, as well as making use of an optional parameter:
- The outputs as well as log files can be found in the
outputfolder by default. For example the examples produce a file calledoutput/output_plot.htmlwhich, when opened in a browser, shows an interactive plot of simulation results.
Usage of ReSiE with VS Code
In Visual Studio Code, you can make configuration in the file .vscode/launch.json that is automatically created when you open the local ReSiE-folder with VS Code. Use the following example configure to run ReSiE directly from VS Code (copy into the launch.json). To run a specific input file, use the configuration "Run ReSiE from defined input file":
{
"version": "0.2.0",
"configurations": [
{
"name": "Run active Julia file",
"type": "julia",
"request": "launch",
"program": "${file}",
"stopOnEntry": false,
"cwd": "${workspaceFolder}",
"juliaEnv": "${command:activeJuliaEnvironment}",
},
{
"name": "Run ReSiE from defined input file",
"type": "julia",
"request": "launch",
"stopOnEntry": false,
"program": "path/to/resie/cli/resie-cli.jl",
"cwd": "path/to/resie/folder/",
"juliaEnv": "${command:activeJuliaEnvironment}",
"args" : ["run", "path/to/input_file.json", "--exit-after-run"]
}
]
}