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.
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.
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:
where
,
and
are the skill points to process
Common
materials, and
is 1 if
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.
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:
where
,
and
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.
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.
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.