140 likes | 289 Views
ICES CM 2003/V:11. LECTURES: EXCEL (VISUAL BASIC) SYSTEM DEVELOPMENT FOR FISHERIES. P. Sparre Danish Institute for Fisheries Research. Department of Marine Fisheries. Development of model/software for fisheries assessment. 1) Who should develop it?.
E N D
ICES CM 2003/V:11 LECTURES: EXCEL (VISUAL BASIC) SYSTEM DEVELOPMENT FOR FISHERIES P. Sparre Danish Institute for Fisheries Research. Department of Marine Fisheries.
Development of model/software for fisheries assessment 1) Who should develop it? Answer A: Software/Model specialists with specifications from assessment experts Answer B: Assessment experts with the help of Software/Model specialists 2) How to access software (modify and check) ? Answer A: No access (Black box), to protect the source code. Answer B: Open source, easy access, user-friendly code
Assumption: Open source, easy access, user-friendly code 1) Which Software platform? Answer A: The most suitable platform for modelling biological/technical systems Answer B: A well-known platform, available to (almost) everybody 1) Does EXCEL qualify for answer B? Answer A: Yes, but it is not suitable for fisheries modelling. We don’t like it Answer B: It’s OK, although we don’t really like it very much. Note: This is not a commercial for Microsoft Office. (EXCEL has bugs by the thousands, and behave strangely! - but nevertheless, everybody has it)
Lecture notes used for a one week TRAINING COURSE under the TEMAS project, at DIFRES *) TEMAS Project: Technical Measures – Development of evaluation model and application in Danish fisheries.
TRAINING COURSE Content: Basic skill to develop a fisheries model/software. Example: TEMAS*) model, Target student: Fisheries biologist. Objective: Just enough knowledge to solve the specific fisheries problem. Key issues: 1) Presentation of results, 2) User-friendliness 3) Open source code. (with easy access) *) TEMAS Project: Technical Measures – Development of evaluation model and application in Danish fisheries.
Lecture notes contents • Introduction to Visual Basic for fisheries models 2. First Program for single species /single fleet dynamics 3. First Program for multi species /multi fleet dynamics 4. First program for spatial simulation 5. First program for bio-economics
Starting-Up programming in Visual Basic Sub Display_Parameters_And_Observations_On_Sheet() With Worksheets("OUTPUT") ' ------------- display growth parameters ---------- .Cells(1, 1).Value = "GOWTH PARAMETERS" .Cells(2, 1).Value = "Stock" .Cells(2, 2).Value = "Loo" .Cells(2, 3).Value = "K" .Cells(2, 4).Value = "T_Zero" For st = 1 To Number_of_Stocks .Cells(2 + st, 1).Value = st .Cells(2 + st, 2).Value = Loo(st) .Cells(2 + st, 3).Value = K(st) .Cells(2 + st, 4).Value = T_Zero(st) Next st End With End Sub
Single species Single Fleet Single Area By quarter
Multi species Multi Fleet Single Area By quarter
Multi species Multi Fleet Multi Area By quarter
Multi species Multi Fleet Multi Area By quarter Bio-Economics