Support for our reactive computational engine


Post by Exigo »

Hello! I hope this is the correct part of the forum to post the following.

I am experiencing problems modifying your Scheduling Engine when attempting to mix ALAP and ASAP scheduling. I have created a new Mixin class mixing SchedulerProEvent, ConstrainedLateEventMixin and ScheduledByDependenciesLateEventMixin - of which the latter two are from the Gantt part of the scheduler.

When I use webpack to generate a new schedulerpro.umd.js and then load a schedule, everything shows up fine when just using ASAP everywhere. However, upon trying to use the Backward direction on any event, it simply disappears. I have found this is because the LateStartDate and LateEndDates are not being calculated.

If I try to retrieve either of these parameters, it returns a Cycle during synchronous computation error. Upon inspecting the ScheduledByDependenciesLateEventMixin class, I can see that the model field lateStartDateIntervals has a calculate function called calculateLateStartDateConstraintIntervals. The class ConstrainedLateEventMixin has a calculate function, for the model field lateStartDateConstraintIntervals, named exactly the same. Is this intentional?
In any case, if I remove the 'Constraint' part of the function name, I get rid of the Cycle error, but now the LateStart- and LateEndDates are simply undefined.

Of worth noting is probably that simply importing SchedulerPro from SchedulerPro.js and loading a schedule from there, everything works and is calculated as expected.
This leads me to believe I might do something wrong when webpacking the files. Therefore I have attached the webpack config and index files I am using.

Just as a note: I have disabled any calculator functions in the custom Class.

I hope you are able to help!

Jesper @ Exigo

Attachments
webpack.config.js
(892 Bytes) Downloaded 288 times
index.js
(2.1 KiB) Downloaded 300 times

Post by arcady »

Providing your class code would also help to understand what happens (ideally a test case). :)
If you don't want to publish it here you can PM me.


Post by Exigo »

Hello arcady. Thank you for responding!

It seems that I have not been rigorous enough with my tests, as I have now resolved the issues.

The Cycle during synchronous computation error arose because of a cyclic dependency that has since been removed. (The dependency had fromEvent == toEvent.) The rearranging of the calculator function names seemed to make the calculations skip the dependencies, which is not what should happen.

As for the other part, I have found that the lateStartDate and lateEndDate parameters will not be calculated if a constraintDate is set. This seems to make sense for the usecases the Engine is built for, but is something I will have to figure a way around. This does fall outside of the scope of this topic though.

Thus it seems that this topic is not needed anymore. I apologize for the inconvenience. Should it be deleted?

Jesper @ Exigo


Post by arcady »

Ok I'm glad you are unblocked. No need for deleting I'll just mark it as resolved. :)


Post Reply