Coder Social home page Coder Social logo

spine-cs-b1's Introduction

Spine Toolbox ReduceModel.jl demo

** This repository is archived and no longer maintained. You may run into issues.**

This spine project "reduce-model-demo" demonstrates model reduction.

Requirements

Getting started

1. Download or clone the files to your computer, e.g.:

> git clone https://github.com/Spine-project/reduce-model-demo.git

(The recommended folder is the folder you store your spine projects in.)

2. Change the current directory to spine project "reduce-model-demo":

> cd reduce-model-demo

3. Install required Python packages:

> python -m pip install -r requirements.txt

4. Install required Julia packages:

> julia init.jl

5. Open Spine Toolbox, which opens a Graphical User Interface (GUI):

> python -m spinetoolbox

6. Open project "reduce-model-demo":

File --> Open Project... --> reduce-model-demo

7a. In Toolbox Settings, set Julia executable by selecting "Use Julia executable" radio button:

File --> Settings --> Tools --> Use Julia executable

(In the first textbox below the radio button is the path to the Julia executable, which should be added automatically)

7b. In the second textbox below the radio button, set the Julia environment (aka Julia home project) to spine project "reduce-model-demo".

Set the lower textbox "Using Julia home project" to <path to project reduce-model-demo>

7c. This should result in an outcome like below: Use Julia Executable

8. Click "Execute project" button in the GUI. A successful execution should result in an outcome like below:

Result of Execute Project

9. Open the Spine database "Combined view":

  • From the dock widget "Project" (on the left hand side) right click on Combined view.
  • From the dock widget "View Properties" (on the right hand side) right click "Open editor".
  • A Spine DB Editor window should now open.

10. Compare graphically the original and reduced model in the Spine DB Editor:

  • In the Object tree window, right click on node
  • Click on the menu icon in the top right corner of Spine DB Editor, which will open a sub-menu
  • From the sub-menu, select Graph
  • This should result in an outcome like below:

Result Graph

License and Terms of Use

The Spine Toolbox project example provided here can be used without any limitations.

The IEEE 188-bus test case data (case118.m) is provided by the MATPOWER project and its use should be cited as:

R. D. Zimmerman, C. E. Murillo-Sanchez (2020). MATPOWER [Software]. Available: https://matpower.org doi: 10.5281/zenodo.3236535

spine-cs-b1's People

Contributors

erkkar avatar tltoni avatar clizbe avatar manuelma avatar

Watchers

James Cloos avatar Fabiano avatar Jody Dillon avatar  avatar Iasonas Kouveliotis-Lysikatos avatar  avatar  avatar

Forkers

manuelma

spine-cs-b1's Issues

Reduce_model fails

The upper part of the workflow works after installing the required package, but when trying to run 'reduce_model' you get the traceback below. Adding that package does not work, since it's not in the julia registry. Trying to follow the instructions also fails, because it's not clear where #4 "julia init.jl" is supposed to be run. Julia is not in the Python conda environment path and that does not work in the Julia console,

julia> # Running 'julia reduce.jl C:\data\SpineCaseStudies\spine-cs-b1\data\case118.m'
1-element Vector{String}:
"C:\\data\\SpineCaseStudies\\spine-cs-b1\\data\\case118.m"
ERROR: LoadError: ArgumentError: Package ReduceModel not found in current path:
- Run `import Pkg; Pkg.add("ReduceModel")` to install the ReduceModel package.

Stacktrace:
[1] require(into::Module, mod::Symbol)
@ Base .\loading.jl:893
[2] include(fname::String)
@ Base.MainInclude .\client.jl:444
[3] top-level scope
@ none:1
in expression starting at C:\data\SpineCaseStudies\spine-cs-b1\scripts\reduce.jl:5
julia> 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.