Giter VIP home page Giter VIP logo

shipmmg.jl's Introduction

ShipMMG: Ship Maneuvering Simulation Model

PyPI version Anaconda-Server Badge codecov codecov

What is it?

ShipMMG is a unofficial Python package of ship maneuvering simulation with respect to the research committee on “standardization of mathematical model for ship maneuvering predictions” was organized by the JASNAOE.

Where to get it

The source code is currently hosted on GitHub at: https://github.com/ShipMMG/shipmmg

Binary installers for the latest released version will be available at the Python package index. Now, please install pDESy as following.

pip install shipmmg
# pip install git+ssh://[email protected]/ShipMMG/shipmmg.git # Install from GitHub
# conda install -c conda-forge -c taiga4112 shipmmg # Install from Anaconda

License

MIT

For developers

Developing shipmmg API

Here is an example of constructing a developing environment.

docker build -t shipmmg-dev-env .
docker run --rm --name shipmmg-dev -v `pwd`:/code -w /code -it shipmmg-dev-env /bin/bash

In this docker container, we can run pytest for checking this library.

Checking shipmmg API

Here is an example of checking the shipmmg developing version using JupyterLab.

docker-compose build
docker-compose up

After that, access http://localhost:8888.

  • Password is shipmmg.

Contribution

  1. Fork it ( http://github.com/ShipMMG/shipmmg/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

If you want to join this project as a researcher, please contact me.

shipmmg.jl's People

Contributors

github-actions[bot] avatar hinata235 avatar juliatagbot avatar kuribayashi31243 avatar taiga4112 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

shipmmg.jl's Issues

Remove draw function

The core function of this library is to simulate or calculate the behavior of MMG model, not to draw the simulation result.

There are a lot of patterns or options for drawing the simulation result.
This library should focus on the core function only.

Error loading ShipMMG when building Docker environment

I tried to use the ShipMMG library in a Docker environment with the Dockerfile, but it throws an error at the Docker container building stage. It seems that there is some conflict between Turing and ParameterizedFunctions loaded in the Dockerfile. Below is the Dockerfile and the error logs.

Dockerfile.

FROM jupyter/datascience-notebook:julia-1.8.5

USER root

WORKDIR /workdir

RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="CSV",version="0.10.9")); using CSV'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="Revise",version="3.5.1")); using Revise'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="Distributions",version="0.25.80")); using Distributions'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="StatsPlots",version="0.15.4")); using StatsPlots'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="StatsBase",version="0.33.21")); using StatsBase'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="KernelDensity",version="0.6.5")); using KernelDensity'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter",version="1.0.20")); using JuliaFormatter'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="ShipMMG",version="0.0.6")); using ShipMMG'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="Plots",version="1.38.4")); using Plots'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="DifferentialEquations",version="7.6.0")); using DifferentialEquations'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="DataFrames",version="1.4.4")); using DataFrames'
RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="Turing",version="0.21.13")); using Turing'

Error log when building Docker containers.

#0 231.5   ✓ DifferentialEquations
#0 276.6   ✗ ShipMMG
#0 276.6   181 dependencies successfully precompiled in 267 seconds. 202 already precompiled.
#0 276.6   1 dependency errored. To see a full report either run `import Pkg; Pkg.precompile()` or load the package
#0 316.0 WARNING: Method definition subsumes(Setfield.IdentityLens, Setfield.IdentityLens) in module AbstractPPL at /opt/julia/packages/AbstractPPL/xvJWs/src/varname.jl:277 overwritten in module DynamicPPL at /opt/julia/packages/DynamicPPL/zPOYL/src/varname.jl:2.
#0 316.0   ** incremental compilation may be fatally broken for this module **
#0 316.0 
#0 320.7 WARNING: both Turing and ParameterizedFunctions export "@model"; uses of it in module ShipMMG must be qualified
#0 320.8 ERROR: LoadError: UndefVarError: @model not defined
#0 321.5 Stacktrace:
#0 321.5  [1] top-level scope
#0 321.5    @ :0
#0 321.5  [2] include(mod::Module, _path::String)
#0 321.5    @ Base ./Base.jl:419
#0 321.5  [3] include(x::String)
#0 321.5    @ ShipMMG /opt/julia/packages/ShipMMG/noAyN/src/ShipMMG.jl:1
#0 321.5  [4] top-level scope
#0 321.5    @ /opt/julia/packages/ShipMMG/noAyN/src/ShipMMG.jl:20
#0 321.5  [5] include
#0 321.5    @ ./Base.jl:419 [inlined]
#0 321.5  [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
#0 321.5    @ Base ./loading.jl:1554
#0 321.5  [7] top-level scope
#0 321.5    @ stdin:1
#0 321.5 in expression starting at /opt/julia/packages/ShipMMG/noAyN/src/kt.jl:335
#0 321.5 in expression starting at /opt/julia/packages/ShipMMG/noAyN/src/kt.jl:310
#0 321.5 in expression starting at /opt/julia/packages/ShipMMG/noAyN/src/ShipMMG.jl:1
#0 321.5 in expression starting at stdin:1
#0 322.0 ERROR: Failed to precompile ShipMMG [37f2b0bf-0c13-4883-8808-e75eb56597e7] to /opt/julia/compiled/v1.8/ShipMMG/jl_PaduNM.
#0 322.6 Stacktrace:
#0 322.6  [1] error(s::String)
#0 322.6    @ Base ./error.jl:35
#0 322.6  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
#0 322.6    @ Base ./loading.jl:1707
#0 322.6  [3] compilecache
#0 322.6    @ ./loading.jl:1651 [inlined]
#0 322.6  [4] _require(pkg::Base.PkgId)
#0 322.6    @ Base ./loading.jl:1337
#0 322.6  [5] _require_prelocked(uuidkey::Base.PkgId)
#0 322.6    @ Base ./loading.jl:1200
#0 322.6  [6] macro expansion
#0 322.6    @ ./loading.jl:1180 [inlined]
#0 322.6  [7] macro expansion
#0 322.6    @ ./lock.jl:223 [inlined]
#0 322.6  [8] require(into::Module, mod::Symbol)
#0 322.6    @ Base ./loading.jl:1144
------
Dockerfile-with-features:16
--------------------
  14 |     RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="KernelDensity",version="0.6.5")); using KernelDensity'
  15 |     RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter",version="1.0.20")); using JuliaFormatter'
  16 | >>> RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="ShipMMG",version="0.0.6")); using ShipMMG'
  17 |     RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="Plots",version="1.38.4")); using Plots'
  18 |     RUN julia -e 'using Pkg; Pkg.add(PackageSpec(name="DifferentialEquations",version="7.6.0")); using DifferentialEquations'
--------------------
ERROR: failed to solve: process "/bin/bash -o pipefail -c julia -e 'using Pkg; Pkg.add(PackageSpec(name=\"ShipMMG\",version=\"0.0.6\")); using ShipMMG'" did not complete successfully: exit code: 1

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Consider the impact of wind, waves, and currents on the maneuvering model

Thanks for developing the ship MMG toolbox . I have recently used ShipMMG.jl and attempted to use it in some ship control tasks. I think you did an amazing job. For future work, do you plan to consider environmental factors such as wind, waves, and currents into the MMG or KT models.
If you don't have time, perhaps I can try contributing some how.
Thank you again for bringing the possibility of using Julia to the ship control community.

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.