MCPcopy Create free account
hub / github.com/Simple-Robotics/aligator / test_cost

Method test_cost

tests/python/test_example_problem.py:30–38  ·  view source on GitHub ↗
(self, nsteps)

Source from the content-addressed store, hash-verified

28 assert isinstance(ep.stage_model.dynamics, ep.TwistModelExplicit)
29
30 def test_cost(self, nsteps):
31 import example_problem as ep
32
33 cost = ep.cost
34 cost_data = cost.createData()
35 cost.evaluate(ep.x0, ep.u0, cost_data)
36 cost.computeGradients(ep.x0, ep.u0, cost_data)
37 cost.computeHessians(ep.x0, ep.u0, cost_data)
38 assert isinstance(ep.stage_model.cost, ep.MyQuadCost)
39
40 def test_stage(self, nsteps):
41 import example_problem as ep

Callers

nothing calls this directly

Calls 4

createDataMethod · 0.45
evaluateMethod · 0.45
computeGradientsMethod · 0.45
computeHessiansMethod · 0.45

Tested by

no test coverage detected