lume / kiwi

Fast TypeScript implementation of the Cassowary constraint solving algorithm (soon for AssemblyScript / WebAssembly).
https://codepen.io/trusktr/pen/abMLVxa
Other
144 stars 8 forks source link

[QUESTION] Timetable constrain solver #1

Closed WhatzzUpp closed 1 year ago

WhatzzUpp commented 2 years ago

Cheers Community,

I would like to build a lesson planner and am looking for a constrain solver in NodeJS. Currently I have found OptaPlanner as a Java variant and your kiwi.js npm package.

Does anyone have experience with constrain solvers in NodeJs environment (kiwi.js) and maybe with timetables?

Current "hard" constrains are:

The idea behind the constraint solver should be an automatic assignment of subjects/teachers/classes within given timeslots.

Thanks for your help!

GantMan commented 1 year ago

I'm working on something like this but hitting some limitations. Let me know if you want to se where I'm at. I could use a pair to help me solve the last piece.

trusktr commented 1 year ago

I'm sorry I missed this and am replying so late. It is an interesting use case. I don't have much experience with the problem set, as I forked this as part of a fork of autolayout.js to convert to TypeScript in order to compile to WebAssembly, ultimately for making UI layouts.

As for Node.js, this can definitely be used there. The output (dist/ folder) is just JavaScript with no browser- or node-specific dependencies. You can simply import it and use it.

trusktr commented 1 year ago

@GantMan yes, curious to see what you're working on!

GantMan commented 1 year ago

So I think you can't use Lume/Kiwi to do scheduling bc it's basically a linear optimizer, and schedules are multi-dimension. My code completely fails when I attempt to make a picker. I wound up using a custom solution.