Skip to content

Etcs integration#13

Open
Roli15 wants to merge 13 commits into
dkouzoup:innochequefrom
Roli15:etcs_integration
Open

Etcs integration#13
Roli15 wants to merge 13 commits into
dkouzoup:innochequefrom
Roli15:etcs_integration

Conversation

@Roli15

@Roli15 Roli15 commented Jun 17, 2026

Copy link
Copy Markdown

No description provided.

@dkouzoup dkouzoup left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work. Impossible to go through all of it in detail but left a few very minor comments.

Comment thread mseetc/ocp.py
@@ -1,12 +1,10 @@
import numpy as np

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are those imports removed? We do use np. later in the code (and it might still work due to nested imports but I think it's better practice to explicitly import what we need, or not?

Comment thread mseetc/ocp.py


def solve(self, terminalTime, initialTime=0, terminalVelocity=1, initialVelocity=1):
def solve(self):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am I right to assume that you introduce the journey index in the other PR?

Comment thread mseetc/ocp.py
solver = casadiSolver(train, track, journey, opts)

df, stats = solver.solve(1541)
df, stats = solver.solve(journey)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly confused, above I read the .solve() takes no arguments while here you pass the journey

Comment thread mseetc/train.py
self.r1 = convertUnit(data['rolling resistance r1']['value'], data['rolling resistance r1']['unit']) # linear term [N/(m/s)]

self.r2 = convertUnit(data['rolling resistance r2']['value'], data['rolling resistance r2']['unit']) # quadratic term [N/(m/s)^2]
self.r2 = convertUnit(data['rolling resistance r2']['value'], data['rolling resistance r2']['unit']) # quadratic term [N/(m/s)^2

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is the closing bracket removed?

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

Successfully merging this pull request may close these issues.

2 participants