Skip to content
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

Directly Wrap MPA RTC Curves for DNC Compliance #14

Open
sbondorf opened this issue Apr 5, 2019 · 3 comments
Open

Directly Wrap MPA RTC Curves for DNC Compliance #14

sbondorf opened this issue Apr 5, 2019 · 3 comments

Comments

@sbondorf
Copy link
Collaborator

sbondorf commented Apr 5, 2019

Current behavior:

  • The MinPlus_MPARTC class dispatches operations to their MPA RTC implementation in ch.ethz.rtc.kernel.CurveMath.
  • The results is, of course, returned as an MPA_RTC curve, an instance of class ch.ethz.rtc.kernel.Curve.
  • In order to wrap this MPA RTC curve into an instance of a DNC-inferace compliant class, the code currently calls Calculator.getInstance().getCurveFactory().create{Arrival,Service,MaxService}Curve(String str).

In theory, this allows to create a DNC curve, yet, that is an option we never use. The calculator config does not change during runtime and therefore the DNC will always continue working with the MPA RTC backend. For that reason, MinPlus_MPARTC should directly create an instance of {Arrival,Service,MaxService}Curve_MPARTC_PwAffine that wraps the MPA RTC curve.

To achieve this, the classes {Arrival,Service,MaxService}Curve_MPARTC_PwAffine need to be extended by a {Arrival,Service,MaxService}Curve_MPARTC_PwAffine(ch.ethz.rtc.kernel.Curve curve) method each. It may be possible to just dispatch to another method creating a wrapper for curve.

@sbondorf sbondorf changed the title Cannot "just" wrap an MPA RTC curve Directly Wrap MPA RTC Curves for DNC Compliance Apr 5, 2019
@sbondorf
Copy link
Collaborator Author

sbondorf commented Apr 5, 2019

Ok, the methods are actually there. @phschon already implemented them, I simply overlooked them.

This is great as it means I just have to change the return-curve constructions in MinPlus_MPARTC.

@sbondorf
Copy link
Collaborator Author

sbondorf commented Apr 5, 2019

Implemented in commit cd2109e

In two unrepresentative runs of the functional tests, this change resulted in an overall speedup between 10% and 20%.

@sbondorf
Copy link
Collaborator Author

There is more to do here, I am re-opening the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant