Coder Social home page Coder Social logo

mineopt's Introduction

Mine optimizer is a tool based on linear optimization to minimize the time required to get the materials necessary to build a given ship.

The page is divided in three forms: the skills, the ship target and the result form. The computation is performed each time a field is modified and the result is updated accordingly in real time. The forms are saved in the browser using the window.localStorage property.

Skill form

The first form lets you fill your processing and manufacturing stats. It also lets you enter the maximal volume of materials that your cargo can take, as well as the time to mine one batch of material.

Processing skills

The processing skills are used to compute the processing efficiency. For the material Veldspar, of type Common, the base quantity of materials processed is given in the file base_yield.json, and it is multiplied by the coefficient:

0.3 + 0.3(0.1 X_{Basic} + 0.05 (X_{Advanced}+\delta_{Advanced} )+ 0.05 X_{Expert})

where X_{Basic}, X_{Advanced} and X_{Expert} are the skill points to process Common materials, and \delta_{Basic} is 1 if X_{Advanced} \geq 1 and 0 otherwise. The final number gives the quantity of processed materials used for the coefficients of the matrix in the linear optimization problem. The formula is the same for all the materials.

Manufacturing skills

The manufacturing skills are used to compute the cost reduction to build a ship. The base cost of the ships is given in the file targets.json, and is multiplied by the coefficient:

1 - \frac{6 X_{Basic} - 4 X_{Advanced} - X_{Expert}}{150}

where X_{Basic}, X_{Advanced} and X_{Expert} are the skill points to process a ship of the corresponding type. The result is used for the lower bounds in the linear optimization problem.

Ship form

The ship form lets you choose the ship you want to build, and the desired quantity. The right column will be filled with the corresponding cost, and the left column allows you to input the materials that you already have. The costs in the right column can also be edited freely.

Result form

The field in this form are read only. They display the total number of trip and time to collect all the raw materials necessary to reach the desired quantities of processed materials. These fields are updated each time another field is updated, using the simplex algorithm implemented in the software glpk, interfaced for javascript with the library glpk.js.

mineopt's People

Contributors

guyomes avatar johnnorad avatar

Watchers

 avatar  avatar

Forkers

johnnorad

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.