Opened 10 years ago

#26 new enhancement

create SimulationCost class

Reported by: Niklas Korsbo Owned by: henrik
Priority: major Component: component1
Version: Keywords:
Cc:

Description

simulation cost keeps track of all the information (init, cost template stuff, etc) needed to run and evaluate a single simulation. It will be owned by the Estimator class instance, and will in turn own CostFunction? class instances.

SimulationCost? should have the following things:

  • init_ and costTemplate_
  • a vector of CostFunction? class instances.
  • a means of receiving the current state, y_, vector from the solver. And a way of passing this to the cost functions.
  • a vector for the weighting of the different cost functions.
  • a parser which takes an inputstream and determines what to do.

Basically, it needs:



initiate init_, timepoints, cost...

parseInput (on initiation of the program)

costFunctionVector=...

anytime the solver calls for an update of the cost do:
  for i
    costFunctionVector[i]::updateCost(y_)
done

for i
  cost += costFunctionVector[i]::executeCalculation()
done
  

Change History (0)

Note: See TracTickets for help on using tickets.