Giter Club home page Giter Club logo

dao-tk's Introduction

Design, Analysis, and Operations Toolkit (DAO-Tk)

This project develops a toolkit for the design, analysis, and optimization of concentrating solar power (CSP) systems, including optimization of both physical design variables and operations and maintenance (O&M) activity. The software is derived and actively developed under funding from the U.S. Department of Energy -- Energy Efficiency and Renewable Energy grant DE-EE00034245 ("Real-time operations optimization software") and was previously funded under grant DE-EE000030338 ("Concurrent optimization of capital cost and expected O&M").

This work is the result of a collaboration between researchers and industry, including:

  • National Renewable Energy Laboratory
  • Colorado School of Mines
  • Northwestern University

Previous contributors include:

  • Argonne National Laboratory

For project documentation, please vist the DAO-Tk wiki.

The desktop version of DAO-Tk for Windows or Linux builds from the following open source projects:

  • wxWidgets is a cross-platform graphical user interface platform used for SAM's user interface, and for the development tools included with SSC (SDKtool) and LK (LKscript). The current version of SAM uses wxWidgets 3.1.1.

  • LK is a scripting language that is integrated into SAM and allows users to add functionality to the program.

  • WEX is a set of extensions to wxWidgets for custom user-interface elements used by SAM, and by LKscript and DView, which are integrated into SAM.

  • SSC is a set of "compute modules" that simulate different kinds of power systems and financial structures. It can be run directly using the SAM Software Development Kit. If you are looking for the algorithms underlying the models, they are located in this repository.

  • Google Test is a C++ test framework that enables comprehensive unit-testing of software. Contributions to the project will eventually be required to have associated unit tests written in this framework.

  • This repository, DAO-Tk, provides the user interface to assign values to inputs of the computational modules, run the modules in the correct order, and display calculation results. It also includes tools for editing LK scripts, viewing field layout and receiver flux map data, and performing multi-dimensional system optimization.

Quick Steps for Building DAO-Tk

For detailed build instructions see the wiki, with specific instructions for:

These are the general quick steps you need to follow to set up your computer for developing DAO-Tk:

  1. Set up your development tools:

    • Windows: Visual Studio 2017 Community or other editions available here.
    • Linux: g++ compiler available here or as part of the Linux distribution.
  2. Download the wxWidgets 3.1.1 source code for your operating system.

  3. Build wxWidgets.

  4. In Windows, create the WXMSW3 environment variable on your computer to point to the wxWidgets installation folder, or Linux, create the dynamic link /usr/<USERNAME>/local/bin/wx-config-3 to point to /path/to/wxWidgets/bin/wx-config.

  5. As you did for wxWidgets, for each of the following projects, clone (download) the repository, build the project, and then (Windows only) create an environment variable pointing to the project folder. Build the projects in the following order, and assign the environment variable for each project before you build the next one:

Project Windows Environment Variable
wxWidgets WXMSW3
LK LKDIR
WEX WEXDIR
Google Test GTEST
SSC
use the daotk-develop branch
SSCDIR
DAO-Tk
  1. After successfully building all repositories, copy the SSC shared or DLL object from the SSC build folder into the platform-specific DAO-Tk deploy folder. For example, on Linux:
cp ~/projects/ssc/build_linux/ssc.so ~/projects/dao-tk/deploy/linux/ssc.so

Windows distributions require the following DLL's (in addition to ssc.dll): dbghelp, libcurl, libeay32, libssh2, msvcp120, msvcr120, ssleay32, vcruntime140 These can be located from system path directories or downloaded from NREL's FTP server.

Repository Access

Access is currently limited only to project partners. To obtain access, please send a request to Mike.

Contributing

Please see the contributing guidelines page for specific information on contributing.

License

DAO-Tk's open source code is copyrighted by the U.S. Department of Energy -- Energy Efficiency and Renewable Energy under a mixed MIT and GPLv3 license. It allows for-profit and not-for-profit organizations to develop and redistribute software based on DAO-Tk under terms of an MIT license and requires that research entities including national laboratories, colleges and universities, and non-profit organizations make the source code of any redistribution publicly available under terms of a GPLv3 license.

Project organization

The code in this project is organized as follows:

Folder Description
./app Source code for the user interface and scripting routines
./build_linux Build and makefiles for linux platforms
./build_vs2017 Build and project files for VisualStudio 2017 (v15)
./deploy Files contained in the distribution package
./deploy/samples Sample project and script files
./deploy/rs Libraries used by the models
./deploy/samples Sample files and LK scripts
./libclearsky Source code for clear sky irradiance model
./libcluster Source code for the data clustering model
./libcycle Source code for the cycle availability and failure model
./liboptical Source code for the optical degradation and soiling model
./liboptimize Source code and libraries for the nonlinear design optimization problem
./libsolar Source code for the solar field failure model

External libraries

DAO-Tk utilizes the following open-source libraries:

Project Version Usage
RapidJSON v1.1.0 JSON read-write library for project files
Eigen v3.3.5 Eigen is a C++ template library for linear algebra - matrices, vectors, numerical solvers, and related algorithms.
NLOpt v2.5 NLopt is a free/open-source library for nonlinear optimization, providing a common interface for a number of different free optimization routines available online as well as original implementations of various other algorithms.
lp_solve v5.5.2.5 lp_solve is a free linear (integer) programming solver based on the revised simplex method and the Branch-and-bound method for the integers.

dao-tk's People

Contributors

mjwagner2 avatar zolanaj avatar jannamartinek avatar qualand avatar

Stargazers

Adam Atia avatar  avatar  avatar  avatar  avatar

Watchers

James Cloos avatar National Renewable Energy Laboratory avatar  avatar Oscar Dowson avatar Daniel Duque avatar Jeffrey Larson avatar  avatar Mark Husted avatar  avatar  avatar  avatar

dao-tk's Issues

Integrate cycle failure model with SSC and dispatch optimization

The power cycle failure model needs to be called from the MSPT model during annual simulation to allow the dispatch optimization algorithm and failure model to interact on a daily basis. The workflow will be:

  1. Begin SSC simulation
  2. Call dispatch optimization assuming no power cycle downtime. Get back the optimal time series dispatch profile for the plant.
  3. Call the failure model with initial hazard rate parameters and the optimized schedule from the dispatch optimization routine. Get back an availability/failure schedule for the upcoming time horizon.
  4. Run the simulation assuming no foreknowledge of impending failures.
  5. If a failure occurs at some point, run the simulation until the time step just before the failure occurs. At that point, re-run the dispatch optimization algorithm for the remainder of the original time horizon with constraints in place to limit power production according to the failure or capacity reduction. We can assume for now that the constraints will be implemented in the AMPL code and not in the internal LPSolve code.
  6. Continue the simulation and execute the optimized schedule identified in the previous step.
  7. Repeat the process at the start of the next day.

This should primarily be owned by @jannamartinek but @zolanaj should probably help.

Flux calculation multithreading support

The calculations that characterize flux and optical efficiency of a heliostat field are a nontrivial portion of the clock time involved in running a simulation. Support of multithreading these calculations may significantly improve run time.

Complete optical degradation and soiling model

The optical degradation and soiling model O calculates heliostat reflectivity over time, with losses incurred both due to soiling (short term and reversible) and mirror degradation (long term and reversible only with mirror replacement). The model has been coded and runs, but the accuracy has not been verified nor have input parameters been ascertained from literature or anecdotal recommendations.

Integration of nonlinear solver

The optimization toolkit developed by Argonne needs to be callable by DAO-Tk. Calls will preferably be made via a C/C++ API and allow for progress update callbacks. The settings for the solver should be set to default values that make sense for this application, but should be customizable by the user.

Complete transition of PySDK objective function methods to DAO-Tk

There are several methods defined in PySDK that have already been transitioned. These include:

  • D -- the solar field design and layout method
  • M -- the heliostat maintenance (availability) model
  • O -- the optical degradation model
  • S -- the annual performance simulation method with clustering

Remaining are:

  • E -- explicit cost calculations
  • F -- the financial calculation method
  • Z -- the rolled-up objective function that includes all sub-methods. A user should be able to call Z without any prior method calls and execute the full suite of model calls.

@jannamartinek can take the lead on the remaining items and work with me to get this completed.

Optical model integer relaxation

The optical degradation and soiling model should be updated to allow relaxation of the number of wash crews to be a continuous variable rather than fixed at discrete integer values. This can follow the template for the heliostat availability model relaxation.

Rolling time horizon modification for stochastic forecasting

The current scheme for determining the update interval and time horizon for the dispatch optimization algorithm takes two parameters:

  1. The optimization time horizon (default 48 hours)
  2. The update interval (default 24 hours)

These parameters can be set by the user to allow re-optimization every 6 hours, for example. At the time of re-optimization, the dispatch problem is always formulated using the same time horizon. In the case of dispatch optimization using stochastic forecasting, it is desirable to re-run the optimization frequently (say, every 4 hours) as improved forecasts become available. However, it is not necessary to hold the optimization time horizon constant, as it is likely justifiable to terminate the optimization horizon at midnight of the following day.

The code should be updated to allow for 2 modes:
A. The user sets the update interval and time horizon, and both remain constant (current baseline)
B. The user sets the update interval and maximum time horizon, and the time horizon is reduced at increments equal to the update interval until the simulation time rolls over to the next day. For example:

day     1______________________2_______________________3_______________________4
hour    0    6     12    18    24    6     12    18    24    6     12    18    24
        ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... ..... 
run     x----------------------------------------------x
             x-----------------------------------------x
                   x-----------------------------------x
                         x-----------------------------x
                               x-----------------------------------------------x
                                     x-----------------------------------------x
                                           x-----------------------------------x
                                                 x-----------------------------x             
                                                         etc....

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.