npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xdsmjs

v2.0.0

Published

XDSM diagram generator

Downloads

21

Readme

XDSMjs

XDSM diagram generator written in javascript.

Tests Codacy Badge

XDSM

The XDSM (eXtended Design Structure Matrix) is a notation used to visualize MDO processes. It was developed by A. B. Lambe and J. R. R. A. Martins, see MDOLab website dedicated page.

XDSM permissions:

If you use the XDSM format for research, we ask that you cite the following journal publication in your work: A. B. Lambe and J. R. R. A. Martins, “Extensions to the Design Structure Matrix for the Description of Multidisciplinary Design, Analysis, and Optimization Processes”, Structural and Multidisciplinary Optimization, vol. 46, no. 2, p. 273-284, 2012.

Description

XDSMjs is a javascript generator allowing to display a XDSM diagram within a web page. It is based on D3. It uses the xdsm.json file as input which contains required MDO information to generate the XDSM diagram. See the dedicated Wiki page for a description of the XDSMjs JSON format.

As of 0.6.0, the MDO data can be specified through data attribute.

As of 0.7.0, XDSMjs supports also XDSM v2. See Upgrade to 0.7.0 notes.

Citation

If you happen to find XDSMjs useful for research and include diagrams generated with it, it will be appreciated if you cite the paper which describes the WhatsOpt project that led to XDSMjs development

Usage

> cd <install-dir>/XDSMjs
> python -m http.server 8020

Open http://localhost:8020/xdsm.html in the browser.

To see other diagrams, copy a json example from examples directory as xdsm.json and reload the page.

As of 0.6.0 version, to use XDSMjs in your web page, you can :

  • include the following declarations in your header :
  <link rel="stylesheet" href="xdsmjs.css">
  <script type="text/javascript" src="dist/xdsmjs.js"></script>
  • add the place-holder div element that will contain the XDSM diagram :
  <div class="xdsm"></div>

You can either use the attribute data-mdo to specify MDO data in the XDSMjs JSON format in an HTML escaped string

  <div class="xdsm" data-mdo="{&quot;root&quot;: {&quot;nodes&quot;: [...], &quot;edges&quot;: [...], ... }}"></div>

or use the attribute data-mdo-file to specify another MDO filename

  <div class="xdsm" data-mdo-file="examples/mdf.json"></div>

If no data attribute is specified, the default file xdsm.json is expected.

As of 0.7.0, you can use XDSM v2 notation by using xdsm2 class instead of xdsm.

  <div class="xdsm2"></div>

As of 0.8.0, you can specify configuration and MDO data directly from the element in the html file.

Example

Below an example describing BLISS formulation inspired from XDSM description given in Martins and Lambe MDO architecture survey. While the formulation could have been described in one diagram as in the survey, the example below use XDSMjs multi-level diagram capability to separate system and discipline optimization levels. The corresponding xdsm.json file is available in the example directory.

Licence

Copyright 2020 Rémi Lafage

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.