auto-js.js

A jobshop problem is stated with such a map:

{:job-nb-ops [3 3]
 :op-machine [0 1 2 0 1 2]
 :op-processtime [9 9 4 16 4 15]}```

As this namespace is extensively executed, it is optimized. Immutability is turned off and results are updated in place, it means that these functions are updating "in place" their arguments with `aset-...`.

canonical-repetition

(canonical-repetition representation {:keys [job-nb-ops], :as _js-pb})

Build the canonical repetitionI representation,

All operations of the first job, then all operations of second job, …

clojurify

(clojurify js-pb)

Turns js-pb into idiomatic clojure datastructures

compile

(compile {:keys [op-processtime job-nb-ops op-machine], :as js-pb})

Turns data of a jobshop instance into arrays, as expected by the rest of the functions below

create-representation

(create-representation {:keys [op-nb], :as _js-pb})

A representation is a mutable set of data

create-solution

(create-solution js-pb)

decode-rep

(decode-rep representation js-pb)

Turns representation - a representation with repetitionI - into a topoIlogical order.

topoI mutably updated with that result

evaluate-schedule

(evaluate-schedule representation solution compiled-js-pb)

Turns a topological order into a schedule

to-mermaid

(to-mermaid {:keys [op-start-timeI], :as _solution} {:keys [op-processtimeI op-machineI op-jobsI], :as _compiled-js-pb})

Generates the diagram.