-
Notifications
You must be signed in to change notification settings - Fork 2
Version: 0.2.0 - Multiple Models #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…solver, and vector modules. test: Update tests to reflect recent changes.
…features build: Migrate from Parcel to Vite feat: Enable simultaneous compilation and solving of multiple models.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @acosta-leandro, this looks great. A few minor points below
|
||
// @ts-expect-error | ||
let stderr = new SimpleOpenFile(wasi.fds[2].file); | ||
const defaultBaseUrl = "https://compbio.fhs.um.edu.mo/diffeq"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if you meant to do this, but I'm happy if you want to run the default server :)
static get(id?: string) { | ||
if (id) { | ||
return this.models.get(id); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if an id
is supplied but not in the registry, you might want to throw an error here. I can imagine that it would be easy to just have a typo in your id name and you would want to know about that rather than just get the default model
// Solve code1 (default model) | ||
let options1 = new Options({}, 'model1'); | ||
let solver1 = new Solver(options1, 'model1'); | ||
let times1 = new Vector([0, 2], getModel('model1').vectorFunctions); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this api a bit inconsistent. To construct a solver you pass in the id, for example "model1", but to construct a vector you pass in the vectorFunctions? Why not make it the same as the solver api, that is just pass in the id "model1" to the constructor?
No description provided.