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

@andre.maravilha/miplib2017-info-downloader

v1.0.0

Published

A tiny app (and library) to obtain information from MIPLIB 2017 instances in an easy way.

Downloads

7

Readme

GitHub license Lines of code GitHub repo size

MIPLIB 2017 Info Downloader

A tiny app (and library) to obtain information from MIPLIB 2017 instances in an easy way.

MIPLIB 2017 is a standard test set used to compare the performance of mixed integer optimizers

Features

  • Download MIPLIB 2017 instance files.
  • Export instance data to JSON and CSV files.
  • Get instance data in JavaScript/Node.js programs.

Quick Start

Using as a command line app

The quickest way to use MIPLIB 2017 Info Downloader is to utilize the executable to export MIPLIB 2017 instances to JSON and CSV files and to download the instance files.

Before installing, download and install Node.js. Then, install the executable (administrator or super-user privileges may be required):

npm install -g @andre.maravilha/miplib2017-info-downloader

To export the instance data to JSON (miplib2017.json) and CSV (miplib2017.csv) files, run the command:

miplib2017-downloader

To export to only one of the formats, the parameters --json-only or --csv-only can be used. For example:

miplib2017-downloader --json-only

To download the instance files, use the parameter --download <PATH>. For example:

miplib2017-downloader --json-only --download files

Using as a Node.js library

Install the MIPLIB 2017 Info Downloader as a dependency on your project:

npm install --save @andre.maravilha/miplib2017-info-downloader

Import and use the library in your project:

const MIPLIB2017Info = require('@andre.maravilha/miplib2017-info-downloader');

for (let instance of MIPLIB2017Info.instances) {
    MIPLIB2017Info.getInstanceInfo(instance)
        .then((info) => {
            let name = info.name;
            let nVarOrig = info.size.variables.original;
            let nVarPre = info.size.variables.presolved;
            let nConstrOrig = info.size.constraints.original;
            let nConstrPre = info.size.constraints.presolved;
            
            console.log(`Instance: ${name}`);
            console.log(`Variables: ${nVarOrig} (original), ${nVarPre} (presolved)`);
            console.log(`Constraints: ${nConstrOrig} (original), ${nConstrPre} (presolved)`);
            console.log('');

        }).catch((e) => {
            const message = `Failed to get information from instance "${name}."\nError: ${e.message}`;
            console.log(message);
        });
}

License

MIT