A package to run an energy system integration model called SpineOpt.
To connect with other users, to identify problems and exchange experiences, we will organize monthly early-user meetings for Spine Toolbox and SpineOpt. The meetings will be held every last Wednesday of the month at 10am CEST 📆 ics zip ) and can be joined here.
This package requires Julia 1.2 or later.
SpineOpt is designed to be used with Spine Toolbox.
-
Install Spine Toolbox as described here.
-
Download and install the latest version of Julia for your system as described here.
-
Start the Julia REPL.
-
Copy/paste the following text into the julia prompt (it will install the SpineOpt package from the Spine Julia Registry):
using Pkg pkg"registry add General https://github.com/Spine-project/SpineJuliaRegistry" pkg"add SpineOpt"
-
Configure Spine Toolbox to use your Julia:
a. Run Spine Toolbox.
b. Go to File -> Settings -> Tools.
c. Under Julia, enter the path to your Julia executable. It should look something like this.
d. Press Ok.
It doesn't work? See our Troubleshooting section.
SpineOpt is constantly improving. To get the most recent version, just:
-
Start the Julia REPL.
-
Copy/paste the following text into the julia prompt (it will update the SpineOpt package from the Spine Julia Registry):
using Pkg pkg"up SpineOpt"
For an example of how to use SpineOpt in your Spine Toolbox projects, please see here. (We apologize for the lengthiness of that example. We're currently working on a minimal example that will get you started faster.)
SpineOpt documentation, including getting started guide and reference, can be found here: Documentation. Alternatively, one can build the documentation locally, as it is bundled in with the source code.
First, navigate into the SpineOpt main folder and activate the docs
environment from the julia package manager:
(SpineOpt) pkg> activate docs
(docs) pkg>
Next, in order to make sure that the docs
environment uses the same SpineOpt version it is contained within,
install the package locally into the docs
environment:
(docs) pkg> develop .
Resolving package versions...
<lots of packages being checked>
(docs) pkg>
Now, you should be able to build the documentation by exiting the package manager and typing:
julia> include("docs/make.jl")
This should build the documentation on your computer, and you can access it in the docs/build/
folder.
Using Julia 1.5.3 on Windows, installation fails with one of the following messages (or similar):
julia> pkg"add SpineOpt"
Updating registry at `C:\Users\manuelma\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Updating registry at `C:\Users\manuelma\.julia\registries\SpineRegistry`
Updating git-repo `https://github.com/Spine-project/SpineJuliaRegistry`
Resolving package versions...
ERROR: expected package `UUIDs [cf7118a7]` to be registered
...
julia> pkg"add SpineOpt"
Updating registry at `C:\Users\manuelma\.julia\registries\SpineRegistry`
Updating git-repo `https://github.com/Spine-project/SpineJuliaRegistry`
Resolving package versions...
ERROR: cannot find name corresponding to UUID f269a46b-ccf7-5d73-abea-4c690281aa53 in a registry
...
-
Reset your Julia General registry. Copy/paste the following in the julia prompt:
using Pkg rm(joinpath(DEPOT_PATH[1], "registries", "General"); force=true, recursive=true) withenv("JULIA_PKG_SERVER"=>"") do pkg"registry add" end
-
Try to install SpineOpt again.
On Windows 7, installation fails with the following message (or similar):
julia> pkg"add SpineOpt"
...
Downloading artifact: OpenBLAS32
Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.
SecurityProtocolType" due to invalid enumeration values. Specify one of the fol
lowing enumeration values and try again. The possible enumeration values are "S
sl3, Tls"."
At line:1 char:35
+ [System.Net.ServicePointManager]:: <<<< SecurityProtocol =
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException
...
-
Install .NET 4.5 from here: https://www.microsoft.com/en-US/download/details.aspx?id=30653.
-
Install Windows management framework 3 or later, from here https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/wmf/overview?view=powershell-7.1.
-
Try to install SpineOpt again.
See CONTRIBUTING.md
SpineOpt is licensed under GNU Lesser General Public License version 3.0 or later.
This project has received funding from the European Union’s Horizon 2020 research and innovation programme under grant agreement No 774629. |