Skip to content

Commit

Permalink
Ducumentation of SAMDE updated. Some TODOs missing. #109.
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-andrade-inpe committed Nov 20, 2015
1 parent af97b45 commit fb7342d
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions lua/SAMDE.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@ metaTableSAMDE_ = {
__index = SAMDE_
}

--- Type to calibrate a model, returns a SAMDE type with the fittest individual,
-- the fit value and the number of generations.
-- @arg data a table containing the described variables.
-- @arg data.model A model.
-- @arg data.parameters A table of parameters to be calibrated.
-- @arg data.fit A function that receives a Model and calibrated parameters
-- to calculate the instance fitness value.
-- @arg data.size the population size for each generation.
-- @arg data.maxGen If a model generation reach this value, the function stops.
-- @arg data.threshold If a model fitness reach this value, the function stops.
-- @arg data.maximize An optional paramaters that determines if the models fitness values.
--- Type to calibrate a model using genetic algorithm. It returns a SAMDE type with the
-- fittest individual (a Model), its fit value, and the number of generations of the
-- simulation.
-- @arg data.model A Model.
-- @arg data.parameters A table with the possible parameter values. They can be
-- values or Choices. All Choices will be calibrated.
-- @arg data.fit A user-defined function that gets a Model as argument and
-- returns how good is the result of such Model. This value is executed after
-- the simulation of the model, which means that the attribute values are the results.
-- TODO: Which kind of values are possible
-- to be returned by this function? A value between 0 and 1?
-- @arg data.size The (TODO: maximum?) population size in each generation.
-- @arg data.maxGen The maximum number of generations. If the simulation reaches this value,
-- it stops and returns the Model that has the fittest result? TODO.
-- @arg data.threshold If the fitness of a model reaches this value, SAMDE stops and
-- returns such model.
-- @arg data.maximize An optional paramaters that determines if the fit will be maximized (true)
-- or minimized (false, default value).
-- @arg data.seed Optional seed parameter for Random(), default is system time.
-- must be must be maximized instead of minimized, default is false.
-- @usage DONTRUN
-- @usage -- DONTRUN
-- c = SAMDE{
-- model = MyModel,
-- parameters = {x = Choice{min = 1, max = 10, step = 2}, finalTime = 1},
Expand Down

0 comments on commit fb7342d

Please sign in to comment.