Skip to content

Commit

Permalink
Close TerraME#16 Update Doc Dam model
Browse files Browse the repository at this point in the history
  • Loading branch information
afancio committed Aug 11, 2017
1 parent c3bb99d commit 1e81733
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lua/Dam.lua
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
--- A water in the dam model.
-- @arg data.water The initial stock of water measured in m³. The initial value is 5,000,000,000.
-- @arg data.inFlow1 The flow of water into the dam each first season. The default is 2e9.
-- @arg data.inFlow2 The flow of water into the dam each second season. The default is 1.5e9.
-- @arg data.population The total amount of inhabitants. The default value is 1e5.
-- @arg data.consumePerPerson The total amount of water per inhabitant. The default value is 10.
-- @arg data.kWh2cubicMeters The total amount of kWh produced by cubic meters. The default value is 100.
-- @arg data.growth The comsumption amount of kWh produced by cubic meters. The default value is 100.
-- @arg data.countYear The flag in which defines whether count or not the years . The default value is false.
-- @arg data.changedYear The year in which water values change. The default value is 1970.
-- @arg data.currentYear The current year in which water values change. The default value is 1950.
-- @arg data.finalTime The final time of the simulation in months. The default value is 1000.
Dam = Model{
water = 5e9,
Expand Down
4 changes: 2 additions & 2 deletions tests/Dam.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ return{

model:run()

unitTest:assertSnapshot(model.chart, "Dam-chart-1.bmp")
unitTest:assertSnapshot(model.chart, "Dam-chart-1.bmp", 0.15)

model = Dam{countYear = true}

model:run()

unitTest:assertSnapshot(model.chart, "Dam-chart-2.bmp")
unitTest:assertSnapshot(model.chart, "Dam-chart-2.bmp", 0.12)

end,
}
Expand Down

0 comments on commit 1e81733

Please sign in to comment.