hgourvest / glpk.js

GNU Linear Programming Kit for Javascript
GNU General Public License v2.0
146 stars 22 forks source link

No good example of how to use it #5

Open Blackening999 opened 7 years ago

Blackening999 commented 7 years ago

Hello!

This library looks great! However, it seriously lacks of documentation. Can you write a step-to-step example on how to use it?

Like you did with .todd (model) + test.lpt but in a more guide/tutorial like way. It's unclear for me how everything should work here, what constraints are available, what should be order for that exact implementation. (for MIP as a separate chapter)

this file is the only source on getting the idea how API works. https://github.com/hgourvest/glpk.js/blob/master/test/test.js

Regards and waiting for feedback!

MingweiSamuel commented 3 years ago

The code is transpiled from C so the API is almost completely identical to the C API: https://cse.iitkgp.ac.in/~abhij/course/lab/CompLab-I/Autumn19/glpk.pdf

(Pdf is also included with the source code from https://www.gnu.org/software/glpk/#downloading)

hgourvest commented 3 years ago

It's not transpiled, everything was done by hand, but you're right about the documentation and the API.

MingweiSamuel commented 3 years ago

It's not transpiled, everything was done by hand, but you're right about the documentation and the API.

Wow that's very impresive