GithubHelp home page GithubHelp logo

openmdao / openmdao1 Goto Github PK

View Code? Open in Web Editor NEW
120.0 120.0 83.0 17.21 MB

OpenMDAO is a high-performance computing platform for systems analysis and optimization that enables you to decompose your models, making them easier to build and maintain, while still solving them in a tightly-coupled manner with efficient parallel numerical methods.

Home Page: http://openmdao.org

License: Other

TeX 0.99% Python 97.59% Makefile 0.32% HTML 0.62% CSS 0.08% JavaScript 0.40%

openmdao1's Introduction

GitHub Actions Test Badge Coveralls Badge PyPI version PyPI Monthly Downloads

OpenMDAO is an open-source high-performance computing platform for systems analysis and multidisciplinary optimization, written in Python. It enables you to decompose your models, making them easier to build and maintain, while still solving them in a tightly coupled manner with efficient parallel numerical methods.

The OpenMDAO project is primarily focused on supporting gradient-based optimization with analytic derivatives to allow you to explore large design spaces with hundreds or thousands of design variables, but the framework also has a number of parallel computing features that can work with gradient-free optimization, mixed-integer nonlinear programming, and traditional design space exploration.

If you are using OpenMDAO, please cite us!

Documentation

Documentation for the latest development version can be found here.

Documentation for all released versions can be found here.

Important Notice

While the API is relatively stable, OpenMDAO remains in active development. There will be periodic changes to the API. User's are encouraged to pin their version of OpenMDAO to a recent release and update periodically.

Install OpenMDAO

You have two options for installing OpenMDAO, (1) from the Python Package Index (PyPI), and (2) from the GitHub repository.

OpenMDAO includes several optional sets of dependencies including: test for installing the developer tools (e.g., testing, coverage), docs for building the documentation and visualization for some extra visualization tools. Specifying all will include all of the optional dependencies.

Install from PyPI

This is the easiest way to install OpenMDAO. To install only the runtime dependencies:

pip install openmdao

To install all the optional dependencies:

pip install openmdao[all]

Install from a Cloned Repository

This allows you to install OpenMDAO from a local copy of the source code.

git clone http://github.com/OpenMDAO/OpenMDAO
cd OpenMDAO
pip install .

If you would like to make changes to OpenMDAO it is recommended you install it in editable mode (i.e., development mode) by adding the -e flag when calling pip, this way any changes you make to the source code will be included when you import OpenMDAO in Python. You will also want to install the packages necessary for running OpenMDAO's tests and documentation generator. You can install everything needed for development by running:

pip install -e OpenMDAO[all]

OpenMDAO Versions

OpenMDAO 3.x.y represents the current, supported version. It requires Python 3.8 or later and is maintained here. To upgrade to the latest release, run:

pip install --upgrade openmdao

OpenMDAO 2.10.x was the last version to support Python 2.x and is no longer supported. To install this older release, run:

pip install "openmdao<3"

OpenMDAO 1.7.4 was an earlier version of OpenMDAO and is also no longer supported. The code repository is now named OpenMDAO1, and has moved here. To install it, run:

pip install "openmdao<2"

The legacy OpenMDAO v0.x (versions 0.13.0 and older) of the OpenMDAO-Framework are here.

Test OpenMDAO

Users are encouraged to run the unit tests to ensure OpenMDAO is performing correctly. In order to do so, you must install the testing dependencies.

  1. Install OpenMDAO and its testing dependencies:

    pip install openmdao[test]

    Alternatively, you can clone the repository, as explained here, and install the development dependencies as described here.

  2. Run tests:

    testflo openmdao -n 1

  3. If everything works correctly, you should see a message stating that there were zero failures. If the tests produce failures, you are encouraged to report them as an issue. If so, please make sure you include your system spec, and include the error message.

    If tests fail, please include your system information, you can obtain that by running the following commands in python and copying the results produced by the last line.

     import platform, sys
    
     info = platform.uname()
     (info.system, info.version), (info.machine, info.processor), sys.version
    

    Which should produce a result similar to:

     (('Windows', '10.0.17134'),
      ('AMD64', 'Intel64 Family 6 Model 94 Stepping 3, GenuineIntel'),
      '3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) ...')
    

Build the Documentation for OpenMDAO

Documentation for the latest version can always be found here, but if you would like to build a local copy you can find instructions to do so here.

openmdao1's People

Contributors

adamnagel avatar amoondra avatar btracey avatar dwmunster avatar erichang-ucb avatar fcapristan avatar fzahle avatar hschilling avatar jaredthomas68 avatar johnjasa avatar jonathonw avatar justinsgray avatar kenneth-t-moore avatar kilojoules avatar kmarsteller avatar ksmyth avatar naylor-b avatar pyvelepor avatar pziegfeld avatar relf avatar robfalck avatar sanbales avatar shamsheersc19 avatar swryan avatar thearn avatar timothy-thomas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openmdao1's Issues

Hyperloop plugin

does the hyperloop plugin works for the latest version of openmdao??

Pip install -e fails

Following the installation instructions, I see

~/code/OpenMDAO$ pip install -e OpenMDAO
Directory 'OpenMDAO' is not installable. File 'setup.py' not found.

pip install openmdao seems to work fine.

pbo params breaks code in checks.py

So I had a program working great with v.1.4.0. However, I updated to the latest version from github and now my code is broken. I have tested it out and it breaks with commit 6e6e852 on Dec. 2nd, 2015 titled "added checks for src_indices out of bounds of source vec and for negative index values." I get the following error message:

File "/Users/ryanbarr/Documents/RotorSE-BYU_FLOWLab/src/rotorse/main.py", line 41, in
rotor.setup(check=False)
File "/usr/local/lib/python2.7/site-packages/openmdao/core/problem.py", line 579, in setup
check_connections(connections, params_dict, unknowns_dict, self.root._sysdata.to_prom_name)
File "/usr/local/lib/python2.7/site-packages/openmdao/core/checks.py", line 31, in check_connections
_check_shapes_match(smeta, tmeta, to_prom_name)
File "/usr/local/lib/python2.7/site-packages/openmdao/core/checks.py", line 55, in _check_shapes_match
__check_val_and_shape_match(source, target, to_prom_name)
File "/usr/local/lib/python2.7/site-packages/openmdao/core/checks.py", line 107, in __check_val_and_shape_match
if src['val'].shape != target['shape']:
AttributeError: 'int' object has no attribute 'shape'

With some investigation it seems to break in checks.py for params that are pass_by_obj. I have attached an example simple code.
test2.py.zip

__getitem__ method in system class not completed?

System class has a getitem() method defined which is to be used to access the variable present in it, but the code only raises the following runtime error : "Variable '%s' must be accessed from a containing Group".
Though there is no similar functionality in component or group classes.
Is this a feature to be added later?

Running Error

When I type " import openmdao.api" in the command window, Error happened. Can someone help me?

import openmdao.api
Traceback (most recent call last):
File "", line 1, in
File "D:\Project\Python\Python2_3\Python27\lib\site-packages\openmdao\api.py",
line 2, in
from openmdao.components.constraint import ConstraintComp
File "D:\Project\Python\Python2_3\Python27\lib\site-packages\openmdao\componen
ts\constraint.py", line 5, in
from openmdao.components.exec_comp import ExecComp
File "D:\Project\Python\Python2_3\Python27\lib\site-packages\openmdao\componen
ts\exec_comp.py", line 10, in
from six import string_types
ImportError: No module named six

Partial derivative check fails after total derivative check

Take the paraboloid example and append this to the end. The check will fail on the partial derivatives. However, if you run it again (un-comment the 3rd line) it will succeed. So it seems that the checks leave the problem in an altered state.

    check_total=top.check_total_derivatives()
    print(check_total)
#    top.run()
    check_partial=top.check_partial_derivatives()
    print(check_partial)

Error in scipy optimization test: "Objective function must return a scalar"

I am trying to build openmdao 1.7.3 for openSUSE, and I am getting the following error in the unit tests with scipy 0.19.0:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/testflo/test.py", line 419, in _try_call
    func()
  File "/home/abuild/rpmbuild/BUILD/openmdao-1.7.3/openmdao/drivers/test/test_scipy_optimizer.py", line 315, in test_simple_array_comp_SLSQP_scaler_unity_ineq
    prob.run()
  File "/home/abuild/rpmbuild/BUILD/openmdao-1.7.3/openmdao/core/problem.py", line 1151, in run
    self.driver.run(self)
  File "/home/abuild/rpmbuild/BUILD/openmdao-1.7.3/openmdao/drivers/scipy_optimizer.py", line 211, in run
    options=self.opt_settings)
  File "/usr/lib64/python2.7/site-packages/scipy/optimize/_minimize.py", line 458, in minimize
    constraints, callback=callback, **options)
  File "/usr/lib64/python2.7/site-packages/scipy/optimize/slsqp.py", line 370, in _minimize_slsqp
    raise ValueError("Objective function must return a scalar")
ValueError: Objective function must return a scalar

The same error happens with the following tests:

  • test_simple_array_comp_SLSQP_scaler_unity_eq
  • test_simple_array_comp_SLSQP_scaler_unity_ineq

It seems to me to be related to this commit in scipy.

OpenMDAO 1.7.2 and above on SSBJ test case

I noticed a difference between OpenMDAO 1.7.1 and OpenMDAO 1.7.2 on the SSBJ test case.

D:\SSBJ-OpenMDAO>pip install openmdao==1.7.1
[...]
D:\SSBJ-OpenMDAO>python ssbj_mdf.py
[...]
R_opt= 3964.01941413

That result is consistent with the reference result.

D:\SSBJ-OpenMDAO>pip install openmdao==1.7.2
[...]
D:\SSBJ-OpenMDAO>python ssbj_mdf.py
[...]
R_opt= 3664.7375274

It seems to me that 1.7.2 release introduced a glitch.

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.