French Forest Sector Model (FFSM++)

Laboratoire d'Economie Forestière - LEF - Nancy, France

User Tools

Site Tools


en:dev:gitlogfull

Author: Antonello Lobianco
Date: Fri, 25 Oct 2024 14:59:06 +0200
Added supply subsides to the expectation prices
This has an effect on the reported expected prices but also eventually in the choice of the regeneration

—————————–
Author: Antonello Lobianco
Date: Fri, 25 Oct 2024 09:49:10 +0200
Added the policy intervention in the demand equation also concerning substitution with non forest products

—————————–
Author: Antonello Lobianco
Date: Wed, 16 Oct 2024 15:51:05 +0200
Updated Streisand input to latest FFSM source code

—————————–
Author: Antonello Lobianco
Date: Wed, 16 Oct 2024 10:28:55 +0200
Just changed debug/release built directories and changed name to bau for streisand project dfault scenario

—————————–
Author: Antonello Lobianco
Date: Tue, 6 Jun 2023 15:10:55 +0200
Changed min inv death miomass reference to the first year instead of current year of inventoried resources

—————————–
Author: Antonello Lobianco
Date: Thu, 1 Jun 2023 14:21:45 +0200
Reverted initialisation of death timber to all zeros and min in_d
1. As harvesting is allocated primary to death timber, in “normal” conditions the stock of “usable” death timber is normally zero, or better
it is equal to only the last year harvesting.
We hence reverted to zero initialization of death timber.

2. We introduced, to avoid a division my zero, a fixed minimum of in_d_1 of 0.00001

—————————–
Author: Antonello Lobianco
Date: Wed, 31 May 2023 11:19:41 +0200
Removed debug cout messages

—————————–
Author: Antonello Lobianco
Date: Wed, 24 May 2023 16:25:20 +0200
Implemented (but still problems) the differentiated supply elasticity for death timber
The idea is that death timber have a different supply elasticity than alive timber.

DID:
- added prodData variables gamma_d_incr and gamma_d_decr
- addedd setting minShareDeathIn
- changed the initialisation of the deathTimberInventory map from all zeros to mortality in all years before simulation as in the first year
- implemented a way to reduce the variance in the ratio of potentially volatile small numbers, setting that both in_d and in_d_1 (that form the ratio to which
the elasticity is applied) are computed as in_d = max(in_d, in*minShareDeathIn)

Stll TODO/problems:
- in_ratio is about 1 in all years except 2014 when it is ab 0.5. This is strange and need to be investigated
- check productions without a big mortality event is not much different than previous version (it can't be the same, even if the elasticity is the same)

—————————–
Author: Antonello Lobianco
Date: Wed, 17 May 2023 11:27:00 +0200
Deleted unised Eigen lib and old libraries for win32

—————————–
Author: Antonello Lobianco
Date: Fri, 28 Apr 2023 18:30:48 +0200
Fix bug: additional mortality volumes are accounted twice
In certain variables additionalMortality volumes were accounted twice, as px→mort already included additional mortality but then there
was px→addMort.
Now px→mort no longer include these additional mortality, but we needed to change the volume dynamics in `runBiologicalModel` to
specifically consider both mort and addMort.

—————————–
Author: Antonello Lobianco
Date: Fri, 10 Mar 2023 12:28:06 +0100
Added vMortAdd to the deathTimberInventory and deathBiomassInventory maps
This allows accounting of “additional” mortality expressed in vol[px,ft,dc,y] for timber inventory (for mkt) and biomass (carbon) purposes.

—————————–
Author: Antonello Lobianco
Date: Fri, 10 Mar 2023 10:15:32 +0100
Added vMortAdd to the list of pixel variables that can be printed in debug mode

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Mar 2023 17:51:43 +0100
Added new setting variable debugVariablesToPrint

—————————–
Author: Antonello Lobianco
Date: Fri, 3 Feb 2023 14:09:55 +0100
Added table with model description to the input ods file (sheet : “meta”)

—————————–
Author: Antonello Lobianco
Date: Tue, 25 Oct 2022 12:26:40 +0200
renamed fireEffects to additionalMortality_multiplier (actually in the previous commit, this just applies it to the ods data)

—————————–
Author: Antonello Lobianco
Date: Tue, 25 Oct 2022 12:24:23 +0200
Merge branch 'MiguelFires'

—————————–
Author: Antonello Lobianco
Date: Thu, 20 Oct 2022 11:08:20 +0200
Defined scenarios for streisand

—————————–
Author: Antonello Lobianco
Date: Thu, 13 Oct 2022 13:50:54 +0200
Added project 2022_streisand

—————————–
Author: Antonello Lobianco
Date: Mon, 5 Sep 2022 17:11:09 +0200
Merge branch 'master' of github.com:/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Mon, 5 Sep 2022 17:06:06 +0200
Added 2022_streisand and updated julia output analysis script

—————————–
Author: Miguel Riviere
Date: Thu, 24 Sep 2020 09:47:55 +0200
Added the “fireEffects” variable to the input file (forestData sheet), which is the share of timber volumes killed by fires on areas affected by fires. It is defined for each region, forest type and diameter class. It is used in the code in ModelCoreSpatial, when computing fire-killed volumes. It is implemented as a multiplier to additionalMortality

—————————–
Author: Miguel Riviere
Date: Wed, 23 Sep 2020 17:31:47 +0200
Revert “Removed default argument for printForestData and printProductData and saved in LibreOffice the Elorang project input file”
This reverts commit fc5d15a7cb9f37ff0dc62aed1cd01700e9102967.

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Sep 2020 17:19:29 +0200
Removed default argument for printForestData and printProductData and saved in LibreOffice the Elorang project input file
The default argumennt in printForestData and printPropductData has been set to normal argument as these two functions are
declared friend in ModelData.h and it seeme newer versions of g++ complain about it.

Also, the input file of the project Elorang has been saved in LibreOffice as the version saved by Excell could not work.

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Sep 2020 17:18:35 +0200
Added include files in the src.pro

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Sep 2020 12:28:43 +0200
Added include files in the src.pro

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Aug 2020 09:25:17 +0200
Removed default argument for printForestData and printProductData and saved in LibreOffice the Elorang project input file
The default argumennt in printForestData and printPropductData has been set to normal argument as these two functions are
declared friend in ModelData.h and it seeme newer versions of g++ complain about it.

Also, the input file of the project Elorang has been saved in LibreOffice as the version saved by Excell could not work.

—————————–
Author: Miguel Riviere
Date: Fri, 31 Jul 2020 10:57:44 +0200
Merged with miguel_carbon and solved conflicts

—————————–
Author: Antonello Lobianco
Date: Fri, 31 Jul 2020 09:41:43 +0200
Removed default argument for printForestData and printProductData and saved in LibreOffice the Elorang project input file
The default argumennt in printForestData and printPropductData has been set to normal argument as these two functions are
declared friend in ModelData.h and it seeme newer versions of g++ complain about it.

Also, the input file of the project Elorang has been saved in LibreOffice as the version saved by Excell could not work.

—————————–
Author: Miguel Riviere
Date: Fri, 31 Jul 2020 09:38:39 +0200
Modified the Hartman framework. There was a problem which led owners to chose dc=0cm sometimes…. Has been fixed. Some more cleaning up to do before merging again.

—————————–
Author: Antonello Lobianco
Date: Fri, 19 Jun 2020 09:42:55 +0200
Updated Julia analysis to the latest DataFrame API

—————————–
Author: Miguel Riviere
Date: Mon, 27 Apr 2020 12:40:22 +0200
Added an output variable for forestData: vMortAdd. It is equal to the volume of mortality due to additionalMortality (fires). It is calculated just like vMort, but using additionalMortality instead of mort.

—————————–
Author: Antonello Lobianco
Date: Wed, 18 Mar 2020 16:57:53 +0100
Improved randomness in random seed initialisation
The random seed (for scenarios requiring new random seed) was initialisated only using time(), but in some set up parallel processes
started at the same time would have resulted in using the same random seed initialisation.
We now added the process id in order to have more variability in the random seed even for parallel processes running at the exact
moment in time.

—————————–
Author: Miguel Riviere
Date: Wed, 18 Mar 2020 16:55:17 +0100
Changed the input file a bit

—————————–
Author: Antonello Lobianco
Date: Wed, 18 Mar 2020 14:10:44 +0100
Improved randomness in random seed initialisation
The random seed (for scenarios requiring new random seed) was initialisated only using time(), but in some set up parallel processes
started at the same time would have resulted in using the same random seed initialisation.
We now added the process id in order to have more variability in the random seed even for parallel processes running at the exact
moment in time.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Feb 2020 11:16:41 +0100
Bug solved in getSTData: natoreturn parameter was not honored
The function getSTData has an optional parameter “natoreturn”. This was correctly honored if the data file was not founded, but if the data file was
found and the individual pixel data was NA, NA was returned instead of the natoreturn value.
This commit solve this bug making sure that the value of natureturn is returned even if the NA is given at the pixel level.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Feb 2020 11:08:35 +0100
Added (all null) additionalMortality for initial year
The function getSTData() for year t return normally the value for the smaller i of file#t-i, but if these not exist, it look for the smaller i file#t+i.
We hence added a (all null values) file for 2000 for sim1 and sim2 so that the data in the years between the starting of the simulation and the first
year with real additional mortality (2015) are returned with 0 and not with the value of 2015.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Feb 2020 11:03:25 +0100
Bug solved in getSTData: natoreturn parameter was not honored
The function getSTData has an optional parameter “natoreturn”. This was correctly honored if the data file was not founded, but if the data file was
found and the individual pixel data was NA, NA was returned instead of the natoreturn value.
This commit solve this bug making sure that the value of natureturn is returned even if the NA is given at the pixel level.

—————————–
Author: Miguel Riviere
Date: Wed, 5 Feb 2020 09:54:45 +0100
Fire data
- Added spatially explicit fire data in spatialParameters
- Changes scenarios file with fire scenarios
- Made new input file
New scenarios not working

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Jan 2020 14:04:39 +0100
Added optional additionalMortality; added option to look for an empty d2 in getSTData
(1) A new option has been added to consider for an additional (rather than multiplicative) mortality.
If one want to use it, one can just specify in the folder given by the settings spatialDataSubfolder a layer
additionalMortality#ft#dc#year.grd (with ft and dc optional);

(2) Added min(totalMortality,1.0) check where this wasn't already implemented;

(3) Added the option to lookup d2 for either an exact match or retrieve a match for “” in the function getSTData().

—————————–
Author: Antonello Lobianco
Date: Wed, 15 Jan 2020 15:04:16 +0100
Added optional additionalMortality; added option to look for an empty d2 in getSTData
(1) A new option has been added to consider for an additional (rather than multiplicative) mortality.
If one want to use it, one can just specify in the folder given by the settings spatialDataSubfolder a layer
additionalMortality#ft#dc#year.grd (with ft and dc optional);

(2) Added min(totalMortality,1.0) check where this wasn't already implemented;

(3) Added the option to lookup d2 for either an exact match or retrieve a match for “” in the function getSTData().

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Jan 2020 18:08:38 +0100
Added false to the print call in non-init years in order to print debug poixel values if asked.

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Jan 2020 16:11:50 +0100
Added false to the print call in non-init years in order to print debug poixel values if asked.

—————————–
Author: Antonello Lobianco
Date: Thu, 19 Dec 2019 10:21:08 +0100
Added pickling setting to input file

—————————–
Author: Miguel Riviere
Date: Thu, 19 Dec 2019 10:00:52 +0100
Merge branch 'miguel2'

—————————–
Author: Miguel Riviere
Date: Fri, 6 Dec 2019 09:19:59 +0100
Small adjustments to the carbon module

—————————–
Author: Miguel Riviere
Date: Wed, 6 Nov 2019 11:36:31 +0100
Changed GIS files to shift FFSM grid to fire grid based on SAFRAN

—————————–
Author: Miguel Riviere
Date: Fri, 4 Oct 2019 11:58:13 +0200
Commit changes to “runscenarios hartman.sh” before changing branch (nothing really important)

—————————–
Author: Antonello Lobianco
Date: Fri, 4 Oct 2019 11:57:19 +0200
Added project 2020_miguelFeu

—————————–
Author: Miguel Riviere
Date: Fri, 4 Oct 2019 11:11:47 +0200
Removed the pickling factor from the FFSM code (never used, some issues with it) and the excel input file

—————————–
Author: Antonello Lobianco
Date: Mon, 16 Sep 2019 14:19:39 +0200
Added a file to show the skeleton of FFSM as a program (opposite than as a model)
doc/programStructure.cpp

—————————–
Author: Antonello Lobianco
Date: Wed, 11 Sep 2019 11:30:04 +0200
Corrected nasty bug coming out in gcc8 release mode only
Functions Scheduler::setYear and Scheduler::advanceYear were declared with returning int instead than void.
This was causing a run-time pointer error, but only in gcc8 and release mode.

This commit fix the bug.

—————————–
Author: Miguel Riviere
Date: Tue, 23 Jul 2019 09:23:08 +0200
Added pickling factor in market model carbon opportunity cost to harvests to perform sensibility analyses

—————————–
Author: etiennelorang
Date: Tue, 16 Jul 2019 10:20:38 +0200
Adding elorang project

—————————–
Author: Antonello Lobianco
Date: Wed, 19 Jun 2019 09:40:17 +0200
Changed based ir to 3% (from 4%) and mr to 70% (from 50%)

—————————–
Author: Antonello Lobianco
Date: Wed, 19 Jun 2019 09:33:20 +0200
Modified output scripts on tiga, oracle and updated output_parser_lib.py for newer matplotlib

—————————–
Author: Miguel Riviere
Date: Wed, 22 May 2019 17:00:29 +0200
Modified the Hartman formula in the Management Module. Now carbon prices are constant when decision is taken at a given time, but is recursively updated every year.

—————————–
Author: Antonello Lobianco
Date: Tue, 9 Apr 2019 11:43:21 +0200
Corrected small bug (but leading to compilation error) in post-optimisation message output

—————————–
Author: Antonello Lobianco
Date: Tue, 9 Apr 2019 11:38:34 +0200
Added year info in post-solving, tiga: ma57 solver, using reg `in_beech`/`in_hardW` data for all variables, corrected `a` matrix, stronger avalCoeff local effect
Added the year info in post-solving output message

TIGA project:
- switched internal linear solver to ma57
- switched computation of da/dl/sa/sl variables for beech transformed products to corrsponding hardW products multiplied by `in_beech`/`in_hardW` at regional

level (as for beech primary products) instead of national average (this improve solver)\\

- corrected the `a` matrix to produce beech transformed products from beech primary products
- set stronger avalCoeff coefficients to better distinguish the local effect of the new sawmill

—————————–
Author: Antonello Lobianco
Date: Fri, 5 Apr 2019 14:09:19 +0200
tiga: changed avalCoeff: stronger but only on Grand Est

—————————–
Author: Antonello Lobianco
Date: Fri, 5 Apr 2019 13:58:05 +0200
TIGA: improved availCoeff generator script

—————————–
Author: Antonello Lobianco
Date: Thu, 4 Apr 2019 14:27:32 +0200
TIGA: Increased output of maps years

—————————–
Author: Antonello Lobianco
Date: Thu, 4 Apr 2019 14:22:51 +0200
TIGA: created scenarios
Created scenarios for the diga project, including the modification to the avalCoeff (see julia script in the gis/france folder)
To be tested if they work.

—————————–
Author: Miguel Riviere
Date: Wed, 20 Mar 2019 17:28:11 +0100
In ModelCoreSpatial, modified the function GetVHaByYear. The function receives a forest type and a year, and returns the expected volume/ha at that year. Before, volume was a “stairs” function of time (forest was not growing before reaching the next DC) Now volume is a succession of linear approximations between successive times of passage. Management module is a bit slower though….. The function is only used when carbon payments are implemented.

—————————–
Author: Antonello Lobianco
Date: Wed, 20 Mar 2019 16:13:19 +0100
Corrected sl poiunt and click error in sl_beechRoundW

—————————–
Author: Antonello Lobianco
Date: Wed, 20 Mar 2019 15:47:44 +0100
Ended (but not yet tested) beech integration in tiga input file

  1. added beech products to prodData (and updated supply/demand values according to the ratio of in_beech over in_hardW, updated a_pr, a and es_d)
  2. renamed beech to Fut_Hetre to be consistent with the other forest types and updated file names in exogenousFtInput
  3. corrected an error in diameter classes definition in forToProd table


—————————–
Author: Antonello Lobianco
Date: Wed, 20 Mar 2019 11:18:18 +0100
Tiga: cloned data for beech{RoundW,SawnW,PlyW} in forData
From respectively harWRounW, hardWSawnW and plyW.
Still to adjust a_pr, a, es_d and above all correct the demand/supply equations based on the ratio of in_beech / in_hardW.
The problem is that in_beech,year2 is 0, while in the original ash project it is well present, even if vol_ash,y1 is 0. Have to lookup the issue.

—————————–
Author: Antonello Lobianco
Date: Tue, 19 Mar 2019 13:49:54 +0100
Updated tiga input file to add Beeh_Feu forest type
Added in forToProd and forData. Still need to set prodData

—————————–
Author: Miguel Riviere
Date: Tue, 19 Mar 2019 11:25:08 +0100
Two things: - In ModelCoreSpatial.cpp, removed a line that was written twice (the OptDC was pushed back to pixel twice) - Added expectedAnnualIncome_timber and _carbon to pixel_level outputs

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Mar 2019 16:12:53 +0100
Added 2019_tiga project (for now just clone of master)

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Mar 2019 14:31:27 +0100
Updated the default to the new regions/new data

—————————–
Author: Miguel Riviere
Date: Fri, 15 Mar 2019 15:30:50 +0100
Added input file of carbon project and GIS files with new regions

—————————–
Author: Antonello Lobianco
Date: Wed, 13 Mar 2019 09:55:52 +0100
Merge branch 'miguel' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Miguel Riviere
Date: Wed, 13 Mar 2019 09:52:48 +0100
Changed region names in GIS files to new regions (2013 data) in project Miguel2019Hartman

—————————–
Author: Antonello Lobianco
Date: Tue, 12 Mar 2019 17:40:16 +0100
Added expectedReturnsNotCorrByRa and expectedReturns to printDebugPixelValues

—————————–
Author: Antonello Lobianco
Date: Tue, 12 Mar 2019 17:11:23 +0100
Moved printDebugPixelValues() within print() in order to honor printing years setting

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Feb 2019 15:00:53 +0100
Moded Miguel project to 00_private/2019_miguelHartman folder

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Feb 2019 14:50:08 +0100
Merge remote-tracking branch 'origin/miguel_carbon'

—————————–
Author: Miguel Riviere
Date: Tue, 5 Feb 2019 14:29:51 +0100
Added input file for carbon project and corresponding runscenarios file

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Feb 2019 12:46:10 +0100
Reorganised debugPx output - moved tp_multiplier and mortCoef_multiplier as normal variables rather than printing them on each line among the other variables - added printing of optDc, optFtChosen and optDcChosen - uncommented printing of deltaArea (trnsaction matrices of areas between harvested ft and regenerated ft)

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Feb 2019 12:12:58 +0100
Added (but not yet printed) information on optimal dc and ft chosen at regeneration time
The following px→vectors has been added:
px→optDc (by out ft): optimal dc of all forest types in a pixel (not necessarily those then chosen)
px→optFtChosen (by input - harvested - ft): the ft chosen by each ft harvested in a pixel
px→optDcChosen (by input - harvested - ft: the dc of the ft chosen by each ft harvested in a pixel

—————————–
Author: Miguel Riviere
Date: Tue, 5 Feb 2019 10:05:58 +0100
Added the pickling factor (Van Kooten 1995, 2015) to the carbon payment. It consists in a final payment at the moment of harvest for carbon stored in long lived products. When pickling is 0, this payment is 0. When pickling is 1, all timber harvested is considered to be stored in products for a long time. Pickling is defined for primary products in the prodData sheet of the input file, and used in ModelCoreSpatial/RunManagementModule

—————————–
Author: Miguel Riviere
Date: Mon, 28 Jan 2019 17:58:58 +0100
Small change in ModelCoreSpatial/RunManagementModule Carbon price in the calculation of revenues from carbon was price of indefinite sequestration instead of rental price for one year. Price was multiplied by discount rate to correct the mistake.

—————————–
Author: Miguel Riviere
Date: Mon, 28 Jan 2019 10:42:04 +0100
ModelCoreSpatial/RunManamgementModule was slightly changed, there were some mistakes with sending back results to pixel. Input file was changed: *exogenousReference was removed from settings *flagHartman was changed to stringsetting: “NONE” (no hartman payments), “ENDO” (endogenous reference levels) and “EXO” (exogenous levels) are now possible *flagHartman is now retrieved every year and can change over time!

—————————–
Author: Miguel Riviere
Date: Wed, 23 Jan 2019 18:30:04 +0100
ModelCoreSpatial, RunManagementModule was updated to account for when hartman payments use an endogenous carbon reference (the BAU), eg when settings “flagHartman” is TRUE and “exogenousReference” is FALSE In this case, the reference level is what would happen without carbon payment (a no policy case) After the regular loop where the optimal regeneration is decided based on EAI maximisation, a new loop has been created This new loop does the same thing again, but retrieves results from the first one to calculate BAU reference levels. It then erases results from the first loop and replaces them by the new ones. The new loop is omitted when there are no carbon payments or when the reference level is exogenous. In this case, results from the first loop are the final results for deciding regeneration

—————————–
Author: Miguel Riviere
Date: Wed, 23 Jan 2019 16:25:52 +0100
Modified input file and modelcorespatial.ccp to account for new way to implement hartman payments for carbon sequestration
- In inputfile/settings: new boolean setting called exogenousReference. Only has a sense if flagHartman is also TRUE.

  • If TRUE, reference levels for carbon are to be exogenously introduced, using the carbonRef variable in the forData sheet of the input file.
  • If FALSE, reference levels will be carbon in BAU, calculated endogenously by the Management Module.

- In ModelCoreSpatial.cpp, in RunManagementModule():

  • The new exogenousReference setting is retrieved
  • A new condition using this setting is added to the loop calculating revenues from carbon when reference is exogenous
  • A new rotation_dc vector of integers is created to store optimal rotation times calculated in the loop, for later use when exogenousReference will be false (see next commit)


—————————–
Author: Antonello Lobianco
Date: Wed, 7 Nov 2018 13:59:46 +0100
Further optimisation of Hartman payment computation in the management module
Now the time-to-first-optimisation on my pc is 45, down from 1:53 of last commit (and original 11':17!)

—————————–
Author: Antonello Lobianco
Date: Wed, 7 Nov 2018 13:20:36 +0100
Optimised the Hartman computation for carbon in the management module
The computation of the Hartman carbon payments has been optimised.
On my computer we pass to have the first optimisation done from 37 seconds without Hartman to 1:53 with Hatman (before
it was 11:17!).

It could be further improved cashing and passing to the getVHaByYear() function the extraBiomass_ratio and/or
the ir to calculateAnnualisedEquivalent().

—————————–
Author: Antonello Lobianco
Date: Tue, 30 Oct 2018 09:53:41 +0100
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Tue, 30 Oct 2018 09:47:36 +0100
Added possible exogenous additionalDemand for transformed product
It has been added to the sc equation, but still need to be checked. Production instead of jumping the year it is introduced and then remaining constant at the new levels,
start increase linearly from the moment it is introduced.

—————————–
Author: Thomas Beaussier
Date: Wed, 10 Oct 2018 16:58:27 +0200
Readded 2018_sustitution

—————————–
Author: Miguel Riviere
Date: Wed, 10 Oct 2018 16:12:24 +0200
Newer version of Hartman carbon payments
- Added a “flagHartman” setting in input file, to enable taking into account or not Hartman payments in the management module.
- Added an “if” loop in RunManagementModule to check for the flag
- Added “carbonRef” in input file, forestData sheet. It is the carbon reference level for each forest type against which additional sequestration is calculated for Hartman payments in the management module.

—————————–
Author: Miguel Riviere
Date: Wed, 10 Oct 2018 15:07:36 +0200
EAI from Carbon
- Added calculation of expected annual income from carbon payments following Hartman model in RunMarketModule
- Added carbonRef in input file, forestData sheet

—————————–
Author: Antonello Lobianco
Date: Wed, 3 Oct 2018 14:51:25 +0200
Updated output_analysis_julia.jl to consider mkt and policy variables

—————————–
Author: Antonello Lobianco
Date: Tue, 2 Oct 2018 17:16:57 +0200
Added Julia output analysis script

—————————–
Author: Antonello Lobianco
Date: Thu, 27 Sep 2018 13:13:46 +0200
Generalised the carbon price equation data to possible different values in different regions
The carbon price subside system was warking pulling data from 11042 (because a bug didn't allow 11000).
It has now been generalised to l2 region level without any hardcoding values of the region. This also allows to eventually define different
carbon subsides in different regions.

—————————–
Author: Antonello Lobianco
Date: Thu, 27 Sep 2018 13:02:58 +0200
Corrected a nasty bug in getNChildren() under debug mode

—————————–
Author: Miguel Riviere
Date: Wed, 26 Sep 2018 16:42:42 +0200
Merged migueltest branch

—————————–
Author: Miguel Riviere
Date: Wed, 26 Sep 2018 16:30:00 +0200
Added Carbon tax/payment scheme into market module - In ModelCoreSpatial.cpp, RunMarketModule, added the carbon price in definition of FF - In Opt.cpp, changed Market Equation 5 (supply ProProducts) to add carbon price - In ModelCoreSpatial.cpp, created function getVHaByYear

—————————–
Author: Antonello Lobianco
Date: Thu, 20 Sep 2018 13:19:35 +0200
Added elastiticy of substitution for non-forest (exogenous price) products
Added options `othExogenousProducts` and `othExogenousProductsLongName` in settings and updated `pl` and `es_d` to account for them.
Modified demand equation in Opt.

—————————–
Author: Antonello Lobianco
Date: Tue, 18 Sep 2018 16:53:45 +0200
Added the avalCoef###.grd files forgot in the 25/06/2018 commit
Also modified the source cose so that if avalCoef is asked for but not found rice an error.
Other than that, it has been added other forgot fiels, like gis folder in 2015_oracle/data and scenarios files in
2018_mgm2cbal/data/scenarios.
Output data are not always complete for the 00_private/* subfolders. IF there are problems in the output it is better copy the output folder from master.

—————————–
Author: Antonello Lobianco
Date: Mon, 17 Sep 2018 17:13:52 +0200
Added #include <random> to BaseClass.h

—————————–
Author: Antonello Lobianco
Date: Mon, 9 Jul 2018 10:50:57 +0200
[mgm2cc] Added national sums in the output

—————————–
Author: Antonello Lobianco
Date: Fri, 6 Jul 2018 11:34:19 +0200
[mgm2cbal] ready to run the simulations, 3 points per parameter
In the mgm2cbal project, all is ready to run the simulations for 81 scenarios: 3 points for 4 parameters

—————————–
Author: Antonello Lobianco
Date: Fri, 6 Jul 2018 10:05:44 +0200
Added modern output analysis, scenario generator. Updated input data for debug scenarios.
Addedd to this commit the script to analyse the output.
Added to this commit the script to generate the scenarios.
Udated the input file (ffsmInput_2018_mgm2cbal.ods) to run the scenarios used for testing the approach.

Now it will be a matter of implementing the files obtained with the scenario generator, run them and parse them.

—————————–
Author: Antonello Lobianco
Date: Thu, 28 Jun 2018 10:26:37 +0200
Added 2018_mgm2cbal project
Added the project for working with Philippe and Raïssa Jekinnou on the effect of different hipotesys on mgm characteristics (risk aversion, expectations, management ratio)
on the carbon balance in the long term, eventually with a regional characterization.

—————————–
Author: Antonello Lobianco
Date: Thu, 28 Jun 2018 09:55:53 +0200
Added condition “no output variables ⇒ no output”
Leaving outForVariables or outProdVariables empty in the input file will avoid printing of respectively forest output and products output.

—————————–
Author: Antonello Lobianco
Date: Wed, 27 Jun 2018 18:00:27 +0200
Added possibility to load scenarios settings fro mfile instead of spreadsheet sheet.
It is now possible to specify the scenarios from csv file instead of sheets.
Just indicate the relative file path in sheet `scenarios`, field `settingFile`
IMPORTANT: the csv parser is very rought and it accept only files with `;` as field separator and no multirow fields, even if quoted. So, if you save from the settings in the
spreadsheet, erase the “comments” column or the resulting csv will not be conform to what will be required.

—————————–
Author: Antonello Lobianco
Date: Tue, 26 Jun 2018 17:25:21 +0200
Completed regionalisation of management parameters.
Parameters mr, expType, expType_cv, expTypePrices, expTypePrices_cv, heterogeneousRiskAversion, riskAversionAgentAverage and riskAversionAgentSd can now be expressed
on a regional base.
For mr only, it is still possible to set it in the forData table (and so it would have priority) for compatibility with the foret-cc project.

—————————–
Author: Antonello Lobianco
Date: Tue, 26 Jun 2018 16:15:48 +0200
Regional query (incl overriding) completed (but never yet used) in get{Int|String|Double|Float}{|Vector}Setting() functions.
Now the query of get{Int|String|Double|Float}{|Vector}Setting() functions can include a region parameter. This can be either WORLD(default), a L2 or L1 regId.
If it is WORD the function return only a memorised WORLD setting, if L1 look for a L1 or, if it doesn't exist, return eventually the WORLD value.
Finally, if an L2 value is asked, the function look-up in the order for an L2, L1 or world value.

At this commit the new query system is not yet used in the code.

—————————–
Author: Antonello Lobianco
Date: Tue, 26 Jun 2018 12:00:16 +0200
Started adding region dimension to settings. Scenario settings can introduce new settings
1) Started working on adding an (optional) “region” dimension to the settings variables.
This is now memorised but it is not yet queried.

2) Also, scenario settings now can not only override existing settings, but can define new ones (e.g. mr is defined in “settings” only at national level, and one scenario
define it for a few regions only).

—————————–
Author: Antonello Lobianco
Date: Mon, 25 Jun 2018 16:55:54 +0200
avalCoef split by forest type and new getSTData() function.
The availability coefficient can now be expressed by forest type and year.
According, it has been moved from a static layer read at startup to inside the spatialParameters folder.
The new getSTData() function allow to get spatial and temporal data from input files inside the spatialParameters foder that follow the name convention
parName#ft#d2#y
The function getMultiplier now uses this function (after checing we don't simply want the multiplier from table).

—————————–
Author: Antonello Lobianco
Date: Wed, 30 May 2018 10:15:16 +0200
Updated julia output script to latest julia data ecosystem changes
cvs.read instead of readtable and usage of … in vcat
This is (could) be the latest commit before working on changing the avalCoef system for the TIGA project.

—————————–
Author: Antonello Lobianco
Date: Wed, 28 Mar 2018 09:59:39 +0200
Added layer pixelIds and printed all layers (including the nondynamic ones) the first year
Actually because of a bug (use of iteration zero instead of first year) all nonDynamic layers are printed twice, the first and second year).

—————————–
Author: Antonello Lobianco
Date: Mon, 19 Jun 2017 10:03:56 +0200
Started replacing supply_fromForestShare with supply_fromNonForVol
The idea is that supply from non forest source will remain constant while only those from forest will go trough a dynamic.

—————————–
Author: Antonello Lobianco
Date: Fri, 19 May 2017 14:50:18 +0200
Added vMort variable in the list of variables to output

—————————–
Author: Antonello Lobianco
Date: Mon, 15 May 2017 17:34:27 +0200
splited shareMortalityUsableTimber parameter by ft, foret-cc: corrected tempest scenarios mortCoef

  The shareMortalityUsableTimber parameter has been divided by specific forest type in the code and in the all the input files.\\
  The mortCoef parameter in the risk crisis scenarios for the project foret-cc was wrong due to half accounting of the current volumes at the denominator.\\


—————————–
Author: Antonello Lobianco
Date: Thu, 11 May 2017 19:29:29 +0200
split shareMortalityUsableTimber parameter by ft, foret-cc: added tempest scenario and data
The shareMortalityUsableTimber parameter should be divided by specific forest type. This has been done in the data for the project foret-cc but still needs
to be done for the input data sheets for the other projects and in the code.
Other than that parameter, in the projet foret-cc we implemented the mortCoeff parameter for the tempet/scolidites/fires in 2027 and implemented the scnearios.
Finally, in the same project, default maximumYears that a death timber can be used has been reduced.
The mortality not due to the crisis has been handled as before, i.e. 0.5 - 0.7 usable timber, to avoid rerunning all the non-crisis scenarios (i.e. we do not
apply a 100% withdraw of the timber deriving from additional mortality due to dryiness)

—————————–
Author: Antonello Lobianco
Date: Fri, 5 May 2017 17:34:10 +0200
foret-cc project: calibrated betaCoef to 0.85 (this is v4 returned to ign and Alice)

—————————–
Author: Antonello Lobianco
Date: Thu, 4 May 2017 14:10:23 +0200
foret-cc: adjusted betaCoef in order to go closer to ign forest volumes in 2050
Calibrating the forest harvesting lead has reasult that we had too many volumes left in the forest, e.g. the volumes in 2050 for the extensification scenario
was leading to too high volumes.
We hence multiplied betaCoef to 0.95 (actually its difference to 1) in order to go closer to ign data.

—————————–
Author: Antonello Lobianco
Date: Wed, 3 May 2017 13:15:15 +0200
Formatted output for foret-cc project

—————————–
Author: Antonello Lobianco
Date: Wed, 3 May 2017 11:15:34 +0200
foret-cc: aligned harvesting data with IGN, oracle: used area change coefficients form Anna v4
1) foret-cc project: we implemented supply_fromForestShare coefficient as to allign reported model harvesting in 2012 in each region with the observed data at regional level.
2) oracle project: we implemented forestChangeAreaIncrementsRel using the coefficient from Anna v4. Sometimes forest loss where higher than harvesting, so bound tooke effect.

Simualtions of yesterday and today are made under this commit.

—————————–
Author: Antonello Lobianco
Date: Fri, 28 Apr 2017 14:11:23 +0200
Added supply_fromForestShare option (not yet actived anywhere), corrected bug rcp86 instead of 85 in project foret-cc
1) Concerning supply, set a clear framework where from st can then be derived st_fromFor and st_fromHarv.
The first one include also non-forest sources, the second one includes death biomass, the third one is the actual harvesting.
2) Corrected a bugs in the data/scenarios/output data, where RCP86 was indicated instead of RCP85.

—————————–
Author: Antonello Lobianco
Date: Tue, 25 Apr 2017 15:00:49 +0200
foret-cc: improved output scripts
inserted a formattedOutput_template.ods that is copied and then filled with actual data in the output elaboration script.

—————————–
Author: Antonello Lobianco
Date: Mon, 24 Apr 2017 17:55:27 +0200
project foret-cc: correcte a bug for the compute of stock_products
variable co2content_products was not copied correctly in the input data resulting in very small stock_products

—————————–
Author: Antonello Lobianco
Date: Fri, 21 Apr 2017 21:10:34 +0200
Improved julia output for foret-cc
Including export to ods and carbon balance with nice subtotals

—————————–
Author: Antonello Lobianco
Date: Thu, 20 Apr 2017 18:46:51 +0200
Updated with rcp86 and simplified output analysis of foret-cc project
Removed lot of unused stuff, used pivot() and ods_write() functions.

—————————–
Author: Antonello Lobianco
Date: Thu, 20 Apr 2017 09:21:13 +0200
Added deltaAreas (ft origin → ft destination) in the px level debug output
This has been used to produce the results for the bird project.
Output level must be set to debug to print these px level results.

—————————–
Author: Antonello Lobianco
Date: Wed, 12 Apr 2017 15:04:07 +0200
Implemented px→deltaAreas ft_from/ft_to matrix
Notes:
1) Updated every year;
2) Tested with forest area change and pp presence/replanting;
2) Matrix not yet printed.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Apr 2017 14:17:37 +0200
Added 2007_bird project

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Apr 2017 14:05:08 +0200
foret-cc project: just changed some output analysis script.
Also removed a bug that in debugging comiling mode was giving an error when there was some area change.

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Apr 2017 22:16:55 +0200
Project foret-cc: added rcp86 base multipliers of tp and mortality
Added already as new tp and new mortality rather than as multipliers, as tp goes into dc detail.

—————————–
Author: Antonello Lobianco
Date: Wed, 22 Mar 2017 15:07:54 +0100
Bugfix: added the new cacheDynamicSettings() function to runInitPeriod() in ModelCoreSpatial()

—————————–
Author: Antonello Lobianco
Date: Wed, 22 Mar 2017 14:30:41 +0100
Added time dimension to many settings (as it is not on by default). foretcc: removed fixed mr
1) Added explicitly DATA_NOW to the getXSetting() calls when the parameter may have a dynamic, as for settings the default is the first position, not those
corresponding to DATA_NOW. ATTENCTION! expectations and ra coeff can not have a time dimension, as they are sampled and assigned to agents (pixels)the first year

2) Furthermore, foretcc input time had mr (=0.7) fixed in forData, so it wasn't changing with the scenarios. Also set variations of expectations/ra on the first year
as from point (1)

—————————–
Author: Antonello Lobianco
Date: Tue, 21 Mar 2017 18:12:15 +0100
foretcc: relaxed a bit subsides (hence harvesting) harvesting in 2020

—————————–
Author: Antonello Lobianco
Date: Tue, 21 Mar 2017 16:37:59 +0100
foretcc: set minimum values for Corse data, set stronger subsidies, corrected data-bug areachange. Set investment balance cost float division.
1) Setting minimum values from 0.001 to 0.002 for Corse makes the model solving.
2) Set back stronger subsidies
3) Corrected a bug in area change: it was relative instead of absolute, so no area change in the model!
4) In the code the division of investments balance to get in milion euros is made using floats. Now balance for forest investment subsidies are correctly reported.

—————————–
Author: Antonello Lobianco
Date: Mon, 20 Mar 2017 21:52:15 +0100
foretcc: changed dc0 of reforestation forest types and softer policy support
The model considers dc0 fixed across time, otherwise there are problems in setting vReg according to exogenous or endogenous harvesting.
Hence the “good growth rate” of reforestation forest types that are starting in 2020, only for dc=0, as bee nanticipated to the first year.
Still the time of passages for the other d classes are long enought that these ft are not choosen before 2020.

As the model wasn't solving I softener the policy options. But we have to check the results.

da set minimum to 0.001 (before also 0.0001 values!). Maybe this will help the solver!

—————————–
Author: Antonello Lobianco
Date: Mon, 20 Mar 2017 16:34:32 +0100
ffsmInput_foretcc.ods: Changed wprices for RCP00 to Buongiorno a2 scenario and cleaned input file
1) “Default” RCP00 world prices set to Buongiorno a2 scenario (lower increase) rather than a1b (that will be used for RCP86)
2) Cleaned scenarios and sheet names. Now “default” is RCP00, cc and risk scenarios will override them. Also in the names of the sheet no cc mention mean RCP00

—————————–
Author: Antonello Lobianco
Date: Mon, 20 Mar 2017 15:58:47 +0100
Updated ffsmInput_foretxx.ods with new da from Sylvain email, new sub-scenarios
1) new da from sylvain's email of today (old where broken)
2) partial scenarios of ADAPT rethinked to have on one side agent behaviour, on the other structural and/or market subsides.

—————————–
Author: Antonello Lobianco
Date: Mon, 20 Mar 2017 08:44:04 +0100
Set initial da,fuelW to 2006 values in ffsmInput_foretcc.ods, implemented printing of detailed hV by scenario,country,region,ft,dc,prd,year, improved pivot julia function
1) Initial da of fuelW were too small, leading with increasing int prices and no domestic policies to go almost zero and blocking the solver. Set them to the 2006 values
2) New setting option outDetailedHv, Option::printDetailedH() function and glue code for printing hV by scenario,country,region,ft,dc,prd,year (in a separate file)
3) Various improvements to the pivot() julia function
4) Calibrated subsides and policy interventions.

This should be the version we use to report the harvested volumes to IGN for the project foretcc.

—————————–
Author: Antonello Lobianco
Date: Wed, 15 Mar 2017 18:50:00 +0100
Corrected bug in reporting polBal_mktDirInt_s, corrected ffsmInput_foretcc.ods and created pivot.jl
- polBal_mktDirInt_s was reporting money as revenues (tax) instead as costs (subsidies)
- extensive scenario in ffsmInput_foretcc.ods was still using now removed bound on IN ratio instead of gamma for increasing inventoried resources
- removed opnemarkets subscenario and all open market related policies as still difficult to interpret
- set all policies, behaviours and “appetibility” of new reforestation forest types (using crazy high tp that nobody will chose them for years below) in 2020
- implemented a nice pivot() function in /data/output/pivot.jl so that df can be easily vicoted in a single command

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Mar 2017 17:03:16 +0100
Updated scenarios of foretcc input file
All policy options uses the new policy variables

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Mar 2017 14:38:15 +0100
Completed and tested adding new forest types for reboissement, added +40000ha/y of forest in the foretcc input file
New forest types for reboissment can be added leaving the memType set to 2. Tested.
in the foretcc input file, forestAreaChangeMethod set to relative with +40000ha/y of forest, proportionally in each region to the current one.

—————————–
Author: Antonello Lobianco
Date: Mon, 13 Mar 2017 18:05:35 +0100
Inserted data about reboissment forests to foretcc input data
Still to check memory type what imply. We want new forest types with their own layr but no initial volumes/areas.

—————————–
Author: Antonello Lobianco
Date: Fri, 10 Mar 2017 17:06:11 +0100
Added reporting of average productivity (hProductivity)
This is initially obtained by px,ft,dc computing the hVol*hArea/age (where age is obatained in turn in the new getAvgAgeByDc() function from the cumTp vector).
It is then aggregated by px and ft using harvested area.
Not used, but it is eventually available also the hProductivityByDc.

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Mar 2017 16:58:46 +0100
Added reporting of surplus_cons and surplus_prod
surplus_cons use a demand function cutted at 0.5dc0, otherwise the reported surplus is negative: the integral of a The integral of a power function p=q^a with
a < -1 (derived from an q=p^b function with b between 0 and -1) is indeed negative ranging from -inf at q=0 to 0- with q = +inf.

As the reported value depends a lot from the cut point, we used dc0 to keep constant the cut and provide interannual comparations.

The optimisation itself doesn't use the cutted strategy, as it doesn't change the solver solution, it is just a matter of the “reported” surplus.

—————————–
Author: Antonello Lobianco
Date: Mon, 6 Mar 2017 15:13:14 +0100
Removed 0.5 dc0 from the obj function and added subsides to the obj functions
Both doesn't change results.
1) removed the 0.5 dc{t=0} from the objective function
2) Added in aa and bb (the coefficients respectivelly for the consumer and producer surpluses in the obj func.) the ratio pol_mktDirInt_{s,d}_1 / pol_mktDirInt_{s,d}

Also tested removing the dc and sc equation from the contraint, as they are already implicitly defined in the obj function that maximise their integrals.
Removing them however optimize only for the first year (with an obj value slightly bigger and a few differences, notably in fuelwPulpW).

Not tested introducing substituted products in the obj function.

—————————–
Author: Antonello Lobianco
Date: Fri, 3 Mar 2017 14:28:20 +0100
Implemented pol_fiSub
Still to do surplus balances

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Mar 2017 19:23:49 +0100
Started implementation of cumputeEconomicBalances()
Policy balances of pol_mktDirInt_s, pol_mktDirInt_d, pol_trSub and pol_tcSub completed.
Still to do those of pol_fiSub and to compute producers/consumers surpluses.

New ModelRegion::getSiblings() function.

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Mar 2017 17:42:16 +0100
Added pol_trSub, pol_tcSub and pol_fiSub
pol_trSub are subsides (or taxes) to the transformation, pol_tcSub are subsides (or taxes) to the transportation and pol_fiSub are subsides (taxes) to
the forest investments.

The input file of the foretcc project need still to be amended for the scenarios.

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Mar 2017 10:36:13 +0100
Renamed mktPol_{s|d} to pol_mktDirInt_{s|d}, added pol_mktStr_{d|s}
1) mktPol_{s|d} has been renamed pol_mktDirInt_{s|d}
2) pol_mktStr_{d|s} has been added to change t1/q1 (the “b” weights of the CES functions) toward 0.5, so to give less power to initial conditions and let market react
more to prices in their allocations between exports (imports) and local supply (demand).
3) Some cleaning of code of non used “corrections”

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Feb 2017 16:15:54 +0100
Solved subside bug, remove upper bound on the ratio In_t/In_t but still problems with the armington elasticity (supply side)
1) subsides/tax (in relative terms) should now work
2) The bound on the ratio on In_t/In_t has been removed as the equivalent effect can be achieved by setting the relevant sigma to zero
3) The problem of the negative elasticity but sa/sl = f( (pl/pw)^e ) is still present
4) The default input file is “polluted” with lots of debug scenarios

—————————–
Author: Antonello Lobianco
Date: Thu, 23 Feb 2017 16:27:23 +0100
Split of elasticity of supply over resources (gamma), introduction of upper limit to its base (ratio in_t/in_t-1) and scenarios projet foret-cc for plenaire
The elasticity of the supply over forest resources (gamma) has been split up in gamma_incr and gamma_decr to consider different elasticities when resources
increase (normal) or when they decrease (stronger elasticity).
On the same equation, a parameter representing a upper bound on the ratio In_t/In_t has been introduced to “cap” resources in order to implement scenarios where
the supply equation do NOT consider volume increments (but would still do for reducing volumes) (altought this can be achieved by just setting to zero
the new gamma_incr).

The foret-cc input data has been arranged to implement the scenarios presented at the plenaire meeting of 23/2/2017.

IN THIS COMMIT THE BUG OF THE SUBSIDES IS STILL PRESENT

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Feb 2017 12:27:12 +0100
Changed calibration method in dl and sl for foretcc project input file
Operations to manually correct the data:
- the original sl_pulpWFuelW has been multiplied by 1.45466 to follow the second round of data from Sylvain that consider autoconsumption
Running the model for 2012 and comparing sl with dl:
- when dl was more than 100% bigger than sl (sometimes - expecially when 0.001 values were used, it was at 8000%), sl was set at avg(sl,dl)*0.8 and dl at avg(sl,dl)*1.2
(I didn't set them equal in order to consider byproducts)
- when dl was smaller than sl, dl, both has been set equal to avg(sl,dl)
- in the data only sl_tp, sl_pp and dl_tp has been reinserted (as these are the input data currently used by the model)
(these modifications correspond to the table corrections_final2 in file corrections_sl_dl_to_get_initial_balance_2012_almost_in_eq.ods).
Note that if we multiply all dl and sl by a fixed 0.8 coeffiicent we end up with hV(2015) = 54.40 and vol(2050) = 4265

—————————–
Author: Antonello Lobianco
Date: Mon, 23 Jan 2017 14:54:01 +0100
Allowed mr to be defined either on forData table (if so, it prevails) or in settings table. Improved error system. As sometimes it is simplier to put mr in the settings data (when regional declination is not required), mr now can be set in either of the two tables, settings or forData. If it is in both, it prevails the one in forData. In order to implement this, the error notification system as being reimplemented as an exception, so that even critical errors can be caught at any level within the code. The input data of ffsmInput_2015_oracle.ods has been reverted to this system (any how the nomgm scenarios were not working).

—————————–
Author: Antonello Lobianco
Date: Thu, 15 Dec 2016 16:12:27 +0100
Added further fixed regeneration scenarios in ash and changed input file for foretcc project
On ash project, we add several fixed regeneration scenarios (runs of 14 Dic 2016).

On foretcc project we changed the algorithm to adjust initial dl and sl to make them closer to their reported average (this is NOT in the prodData but
still in prodData_changed2 sheet).
Also an initial implementation fo the 8 scenarios has been set, with initial values for:
- management rate;
- expectations (both price and physics);
- subsides for fuelwood (around 30% of pl);
- elasticities with world HWPs (eta & psi - to be checked the direction);
- risk aversion.

Implementation of the scenarios stil lis not declined across the temporal and spatial dimensions (all changes are still implemented now and for the
whole France).

—————————–
Author: Antonello Lobianco
Date: Tue, 13 Dec 2016 12:18:39 +0100
Cleanup of ffsmInput_foretcc.ods (removed old data)

—————————–
Author: Antonello Lobianco
Date: Tue, 13 Dec 2016 12:03:52 +0100
Added scenarios in ash (simulations of 7 and 12 Dic 2016) and manually fixed sl and dl data in foretcc input data
Scenarios P0-Mi-Ei_fxRepl and P1-Mi-Ei_fxRepl (fixed regeneration) has been added to the ash project (runs of 7 and 12 decembre 2016 use these new scenarios).
Data on sl and dl in the input data of foretcc has been manually fixed to allow initial balance in 2012 (pre-simulation year) to “almost” close, otherwise
with original data the balance was too much far from closing for the solver in 2013 then manage to adjust prices and export to make it closing.
This evidences a problem of hyper-definition of initial data in all versions of FFSM.
Data has been manually “corrected” following this algorithm:
- the original sl_pulpWFuelW has been multiplied by 1.45 to follow the second round of data from Sylvain that consider autoconsumption
Running the model for 2012 and comparing sl with dl:
- when dl was more than 100% bigger than sl (sometimes - expecially when 0.001 values were used, it was at 8000%), I set sl at 60% of dl (I didn't set it to 100% to consider byproducts)
- when dl was smaller than sl, dl has been increased and set equal to dl
- in the data only sl_tp, sl_pp and dl_tp has been reinserted (as these are the input data currently used by the model)

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Nov 2016 12:07:06 +0100
Updated forest area change from Anna v3 in ffsmInput_2015_oracle.ods

—————————–
Author: Antonello Lobianco
Date: Thu, 3 Nov 2016 14:27:00 +0100
Corrected error with the previous manual fix to exclude ash from broadL expectedReturns
With the previous manual fix a bug has been introduced that ash expectedReturns were not reported at all. This commit solve this newly introduced bug.

—————————–
Author: Antonello Lobianco
Date: Mon, 31 Oct 2016 17:22:58 +0100
Added new scenarios in ash project and manual fix to exclude ash in expectedReturns of broadL
The input file of the ash project (ffsmInput_2015_ash.ods) has been updated to include new variables defined in sept/october (without consequences), include
scenarios with substitution elasticity of 10, 100 and 1000 and with a detailed output to get volume by diameter class in the output and a manual fixed has
been implemented to avoid having ash expected returns included in the generic broadL expected returns. I don't know if we should keep this fix or remove it.

—————————–
Author: Antonello Lobianco
Date: Mon, 24 Oct 2016 11:21:17 +0200
Working input file for the project foret-cc
With the correction of sl,11008,hardWRoundW to 0.001 instead of zero, the input file for the project foret-cc (ffsmInput_2016_foretcc.ods now works (solve).
Still things to be done after this commit:
- a bit of clean-up of old tables and scenarios name
- check if results are fine/smooth or calibration is required
- pave the way for scenario implementation

—————————–
Author: Antonello Lobianco
Date: Tue, 11 Oct 2016 17:32:05 +0200
Removed sc, dc and pc from the data
dc_sp, sc_pp, and pc_pp are computed in the initMarket() function, so they are not needed in the data (checked).

—————————–
Author: Antonello Lobianco
Date: Tue, 11 Oct 2016 15:39:43 +0200
Set for i=j ct_i,j = 1 and dist_i,j=0 in code
For i=j, any value higher than zero in ct_i,j would cause (correctly) the solver to not choose regional trade within the same region, so I fixed
ct_i,j=1 in the code.
Set also dist_i,j=0 so not needed to include it in the data.

—————————–
Author: Antonello Lobianco
Date: Tue, 11 Oct 2016 13:32:04 +0200
Ended recalibration for 2011 (but it doesn't work)
The input file should now have all the needed data recalibrated.
However, the optimisation (solver) doesn't work.

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Oct 2016 17:27:01 +0200
Working on the data for the foret-cc project
The input data for the foret-cc inra project is almost done. It should miss just transport costs between regions (ct) and the supply from local (sl) of the
transformed products, both in the prodData table.

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Oct 2016 14:06:26 +0200
Allow the management rate to change in the different regions
mr has been moved from the setting table to the forestData table, so it can depends frol the region.

—————————–
Author: Antonello Lobianco
Date: Mon, 3 Oct 2016 16:11:17 +0200
Introduced the possibility to use subsidies to demand or to the supply
Added two new prodData variables: sub_s(pp,t) and sub_d(tp,t) (rispectivelly the subsidies to the supply of priumary products and the subsudues to the demand of
transformed products).
These two variables enter the composite supply and demand equations (bonds) but, as agreed with Sylvain, they do not enter the obj equation.

—————————–
Author: Antonello Lobianco
Date: Fri, 30 Sep 2016 15:14:33 +0200
Finished (and tested) the option to allow using timber from death trees for the market module.
The following functions has been implemented in the code:

ModelCoreSpatial::allocateHarvesting()
Allocates the supply (st) first to available death timber and then compute how much to leave it for the “normal” harvesting.
It goes looking into the deathTimberInventory map and for each year (newer to older), dc (higher to smaller) and ft find which primary product are still possible
and allocate the deathTimber of that specific combination to them in a way proportional to the st still available of them.

ModelData::getMaxYearUsableDeathTimber()
Returns the longest number of years that it is possible to still use the death timber for all the ft/dc/primary product combinations

ModelData::MD→getAllocableProductIdsFromDeathTimber()
Returns the primary products (positions in the vector) that is still possible to use in a given year the timber for the specific ft/dc/death year combination

Some results from the debug scenario for Aquitaine, 2010:

                                hV     st      in\\

old (not using death timber) 4.74 4.740 952
new (using the death timber) 3.37 4.780 1025

(so, because of the elasticities, minimal direct effect on the market module, but relativelly big effect in the resource module)

—————————–
Author: Antonello Lobianco
Date: Wed, 28 Sep 2016 17:40:28 +0200
Removed references to subRegionMode (still in the code remain some dirty subX, subY…)

—————————–
Author: Antonello Lobianco
Date: Wed, 28 Sep 2016 17:13:50 +0200
Corrected a bug in the formation of the REG→inResByAnyCombination and created REG→inResByAnyCombination_deathTimber
The REG→inResByAnyCombination, that is the bound used in the optimisation, where not using the UNION of the various resources available for the pproducts in each
combination, but their sum. We corrected that.
We created a similar REG→inResByAnyCombination_deathTimber vector that store only the resources from death timber (while REG→inResByAnyCombination stores the total ones).
In order to create the unions we modified getAvailableDeathTimber() to takes as input a vector of pproducts. We also created an equivalent funaction
MD→getAvailableAliveTimber() that takes the union of in for a set of pprod using px→vol_l as source.

TODO:
- Still split the total harvested in volumes coming from death timber and those from alive timber
- Solve a small bug that if the subRegionMode setting is not present in the input data (even with false) the model crash in gui mode

—————————–
Author: Antonello Lobianco
Date: Tue, 27 Sep 2016 18:30:44 +0200
Created debugMap() in BaseClass and corrected a bug in reporting in_DeathTimber (it was repeated on each pixel)

—————————–
Author: Antonello Lobianco
Date: Tue, 27 Sep 2016 13:28:23 +0200
Added foretcc inra project, added scenarios in ash project and started (not yet completed) introduction of reusable timber after mortality events.
INRA PROJECT
Added folder 00_private/2015_ash and started working on the input file.
TODO:
- add the missing variables tp_0, entryVolHa (calibrate to match current volume entry), agr, sStDev (weight current data)
- integrate prod data from Sylvain

Ash project
Added several new scenarios with different cross elasticities between ash and general hardwood secondary products demands.

Reusable timber after mortality events
The idea is that a share of the timber removed from the Forest Dynamic module due to mortality can still be used for the market module in the subsequent maxYears years.

In the input files:
- new useDeathTimber, shareMortalityUsableTimber and maxYears settings (the latter one actually already present but not used).
In BaseClass:
- new iiskey class
In MapData:
- new deathTimberInventory map
- new related eathTimberInventory_xx(), getAvailableDeathTimber(), getMaxYearUsableDeathTimber() methods.
In ModelCoreSpatial:
- new initialiseDeathTimber() method
- in computeInventary() “in_DeathTimber” is created (“in” continues to store the alive trees only). The REG→inResourcesByAnyCombination now store the sum of the two.
- in runMarketModule() the optimisation use both in and in_DeathTimber. A new stFromHervesting is split from “st” that now contain the total used supply (working on this)
- in runBiologicalModule() “in” and “stFromHarvesting” are used. The mortality is registered using ModelData::deathTimberInventory_incrOrAdd()

TODO:
- the registration of the mortality has some errors, check it.
- writing the part on splitting up stFromHarvesting from st (and distribuite it on the deathTimberInventory map)

—————————–
Author: Antonello Lobianco
Date: Wed, 31 Aug 2016 08:11:37 +0200
Corrected a bug in the reported expected returns at forest level and improved the merge script.
The px→expectedReturnsNotCorrByRa vector (by ft) was not cleared each year, resulting that the following year expected returns were just
appended rather than substitute the previous year ones. As the reported expected returns at forest level are computed from the maximum
of this vector, these would only get a sort of multiyear maximum instead of a yearly value.
This was only an issue for reporting the expected returns at forest level, internally the model uses px→expectedReturns that was already
correctly cleared each year.

Also, the script that performs the merge between oputput files has been improved to provide various filter capabilities.

—————————–
Author: Antonello Lobianco
Date: Thu, 25 Aug 2016 06:26:44 +0200
Changed weighting of reported expected return by ft (python output script not yet updated) and pandas output largelly improved.
The expRet_ft,r are now sum_px {expRet_ft,px * fArea_px} / fArea_r rather than sum_px {expRet_ft,px * fArea_px,fr} / fArea_r,ft as in this way
they do not dynamically change just because the weight change.
expRet_r are not changed and remains intended as sum_px {expRet_ftbest,px * fArea_px} / fArea_r where expRet_ftbest,px are the not-ra adjusted expected returns of the best ft for the specific pixel.

The python code has still to take into account this cange, but in any case it will continue to report the expReturns at forest level as the
weighted average of the various forest types.

We also largelly improved the reporting using the pyomo script.

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Jul 2016 16:35:58 +0200
Just added some draft output script for ash (copied from the oracle project, not yet adapted)

—————————–
Author: Antonello Lobianco
Date: Wed, 8 Jun 2016 16:17:44 +0200
Creation of R and jupiter/pandas scripts for the output
Worked in the output of 201_oracle project. Also the lib, example and global parts of the traditional python output hase been moved to the output
subfolder.

—————————–
Author: Antonello Lobianco
Date: Fri, 20 May 2016 15:49:06 +0200
Added option expandByFt to the gis_france.xml file of 2015_oracle project
Without adding that option (set as false in all but volumes and expected return layers) the model wouldn't work.

—————————–
Author: Antonello Lobianco
Date: Fri, 20 May 2016 15:33:06 +0200
Added option to print maps only on specific years.
The setting “mapsOutYears” has been added to specify which years to print the maps, as these take LOT of disk space.

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Apr 2016 13:43:48 +0200
Added first script to analyse product_data outputs (a jupiter notebook).

—————————–
Author: Antonello Lobianco
Date: Thu, 24 Mar 2016 17:41:30 +0100
Add expansion by ft of input gis files, added vol and expectedReturns output for ash and slighly changed expectations for ash.
Added in Gis::initLayers() the possibility for layers defined in the gis input xml file to be expanded by ft (use the new expandByFt option
in the xml file).
We used this new option to define for the ash project vol_ft and exectedReturns_ft and, as these are now defined in the xml file,
ModelCoreSpatial::updateOtherMapData() take care to update the data annually taking the data from the px object.
Still on the ash project, we changed the expectations behaviour to account that the first years there was no perception of the pathogen threat, and
not the expectations are introduced gradually in the first period of the model running.
We also removed (very) old reclassification rule code that was referring to reclassification rule in the xml file, while the rules are now defined
in the ods input file.

—————————–
Author: Antonello Lobianco
Date: Mon, 7 Mar 2016 14:38:25 +0100
Output parser ported to python3. Working on adding product variables reports.

—————————–
Author: Antonello Lobianco
Date: Tue, 1 Mar 2016 15:48:13 +0100
Added sa scenarios to the oracle project and start working on market variables in the output scripts.
Sa scenarios has been added to ffsmInput_2015_oracle.ods, and market variables (from productData_xxx.ods) has been added to the variables in the
scripts that analyse output.

—————————–
Author: Antonello Lobianco
Date: Mon, 29 Feb 2016 10:31:30 +0100
Removed old no longer used forest variables: tCV, tStDev, dispor
These variables has been removed from the main ods input file.

—————————–
Author: Antonello Lobianco
Date: Tue, 23 Feb 2016 11:36:13 +0100
Adapted the output tables and charts generator script for the ash project.
The python script that generate the tables and charts has been adapted for the ash project (file output_parser_ash.py).
Please consider that still this file does not include analysis on the market variables (prices, supplies..) that should instead be part
of the discussion for this project.

—————————–
Author: Antonello Lobianco
Date: Fri, 19 Feb 2016 14:16:17 +0100
Introduced overharvestingAllowance as a parameter and increas output level for ash.
Rather than keeping hard-coded in the model, the “fake overharvesting” necessary to let the model solve when the resource goes down has been
set as a new parameter “overharvestingAllowance”. Just set its value to the lowest possible one to have the model working.
Also here we increased the output level of the ash scenarios so we are reporting also the spatial maps of ash.

—————————–
Author: Antonello Lobianco
Date: Fri, 19 Feb 2016 09:51:47 +0100
Introduced elasticity of substitution in trasformed product demand.
A new parameter, es_d (Elasticity of substitution in the demand side) has been introduced in the data and in the market module in the equation
of the composite demand.
We set -1 for the combinations hardWRoundWood price –> ashRoundWood demand and hardWPlyWood price –> ashPlyWood demand in the partially heterogeneous
scenarios. In both partially and fully homogeneous scenarios from ash ft you can only make ash roundwood, what it changes is only the demand of
ash transformed products to depend from own or own+crossed prices.
We tested the scenarios and all except P0-Me-Ei run till the end, with very little overharvesting.

—————————–
Author: Antonello Lobianco
Date: Fri, 12 Feb 2016 10:56:06 +0100
Added for area change in ffsmInput_2015_oracle.ods and corrected a parameter in ffsmInput_2015_ash.ods
ORACLE INPUT FILE: Added the version 2 of for area change from Anna (obtained from a panel data that relate forest area with forest expected returns,
email 3/02/2016) in the file ffsmInput_2015_oracle.ods, for all constant, a1b, a2 and b1 scenarios (variable forestChangeAreaIncrementsRel).
ASH INPUT FILE: the a(pp,pt) coefficient for both hardWRoundW and ashRoundW to hardWSoftW (original “2”) has been reparted according of the in of the
two primary products as it was otherwide double counted! Neverless this still imply a fixed ratio production function with no space for
substitution. We are still looking on how to integrate sustitution into the model.

—————————–
Author: Antonello Lobianco
Date: Tue, 9 Feb 2016 17:36:51 +0100
Corrected bugs in computeInventary() and runMarketModule() and changed overharvesting limit to +1
In computeInventary() the REG→inResByAnyCombination[] was not considering all the inv for the multiproduct combinations.
In runMarketModule() the comparitions between the st and the inv (for resetting the st to min(st,inv) ) were not doing correctly and also not
reported correctly.
We created now a new variable st_or that state the original st not corrected to match the inventoried resources.
Finally we let an overharvesting of 1 Mil mc in the harvesting<resources constrain (function eval_contraints() ).

—————————–
Author: Antonello Lobianco
Date: Mon, 8 Feb 2016 16:29:51 +0100
Added a merge oputput script and set an overharvesting level of 0.2 (big)
A new script in data/output (merge_lib.py to be simplinked and merge_example.py to be copied in project specific output folder) has been created
in order to merge several scenarios in a single file to be further analysed with excel, as this one do not support more than 2-3 scenarios at a time.
Also, a big overharvesting of 0.2 Milion of cubic meters (for each region) has been set on the resource constrain in the market module to let the
model solve.
It is unclear if this bound is really hitted, but for sure it has consequences in the solvibility of the model (larger the overharvesing allowed,
lukely the model solve).
A new debug message has been introduced in the marked module to chack in the log if the model solved using a overharvesting. The resource model is then
equipped with several chack that put back this overharvesting to the maximum inventoried resourced.

—————————–
Author: Antonello Lobianco
Date: Fri, 5 Feb 2016 17:10:20 +0100
Added several ckeck in the resource and management module for dealing with overharvesting and corrected vReg of ash forest type
In several parts of the resource and management module (ModelCoreSpatial.cpp) chakcs has been introduced to deal with eventual overharvesting
coming from relaxation of the contrain on maximum harvesting (not implemented in this commit).
Opt::createCombinationsVector() has been moved to ModelData because it is used also in the market module to rescale st to the corresponding inv(s).
In ash input file the ash exogenous vReg (for the fist periods) has been rescaled to account of the volume difference between ash and broadL_HF.

—————————–
Author: Antonello Lobianco
Date: Wed, 3 Feb 2016 16:44:02 +0100
Corrected bugs where extreme mortality could have lead to negative volumes.
In cachePixelExogenousData() we got sure that the natural plus the pathogen mortality never go over 1.
In runBiologicalModule() we get sure that also in the dc=1 the value (1-1/tp-mort) is not negative. For dc > 1 this was already
implemented, so that even if in the market module we relax the resource constrain to allow a supply a bit higher than the inventory (to make
the model working) this should not cause problems in the resource model.
However for now we still have a problem in the area if we allow for a relaxation of such constrain.

—————————–
Author: Antonello Lobianco
Date: Tue, 2 Feb 2016 16:22:03 +0100
Corrected ash demand and supply using inventory ratio with hardWRoundW as weight.
In 00_private/2015_ash/data/ffsmInput_2015_ash.ods, prodData sheet, sa,sl and sc of ashRoundW (wich data, as the rest of ash variables, was copied
from the harwood values) has been corrected by the ratio at regional level of inv for ashRoundW over inv of hardWRoundW.
At the same time da, dc, dl and sl for ashSawnW and ashPlyW has been corrected with the same ratio at national level.

—————————–
Author: Antonello Lobianco
Date: Mon, 1 Feb 2016 12:20:23 +0100
Added description of the variable in the declareVariable() function

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jan 2016 15:42:18 +0100
Just use true on “isResidual” field to exclude a region from the simulations.

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jan 2016 15:16:04 +0100
Added possibility to remove regions just not inserting them in the list of regions of the simulation.
This works even if other product, forest or reclassification rule data refer to this now not existing region.

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jan 2016 10:05:15 +0100
Added output 2d vector sums charts and removed Corse from Ash modelling

—————————–
Author: Antonello Lobianco
Date: Fri, 15 Jan 2016 14:47:51 +0100
Updated ffsmInput_2015_oracle.ods to work with the latest source code and updated output verbosity codes.
In the input file added the settings (unused here) corresponding to the latest features added at source code level and refactored the input file
to use the new explicit ovverriding tables for each scenario. These should not have consequences in the output. In the same file, removed all the
sa scenarios except those to determine the price vs physical impact of cc.
The vebosity codes has been updated so that detailed forest and product output can be printed without printing all the ascii grid maps if one wish.

—————————–
Author: Antonello Lobianco
Date: Thu, 10 Dec 2015 18:00:27 +0100
Implemented ash scenarios, new scenario load method, setting table reordering
We implemented the scenarios for the ash paper, with the differentiation between fully homogeneous, pattially homogeneous and fully heterogeneous
scenarios.
In order to avoid tens of tables we introduced a new method where in the scenario main table we indicate the names of the overriding tables for
forData, prodData, etc. In this way a single table can be shared between scenarios that have the same overriding requirements.
We also reordered the various settings options between the various categories.

—————————–
Author: Antonello Lobianco
Date: Wed, 2 Dec 2015 15:58:52 +0100
Corrected bug on transaction cost sign and introduced asymmetric transaction costs toward ash.
A bug has been solved in the computation of expected values corrected by transaction costs. Also, transaction costs
toward ash has been increased
to account that moving from a specific to a generic forest type is on average more easy than from a generic to a specific case, where this embeds
in reality also a spatial heterogeneity factor.

—————————–
Author: Antonello Lobianco
Date: Wed, 2 Dec 2015 11:47:16 +0100
Removed old 2014 papers data

—————————–
Author: Antonello Lobianco
Date: Mon, 30 Nov 2015 15:11:36 +0100
Added a new method to compute the spatial multiplier depending on observed presence of a given ft rather than random.
While with useSpatialRegionalVariance the multiplier is random, based on a normal distribution, with the new useSpatialVarPropToVol
parameter (implemented in ModelCoreSpatial::assignSpMultiplierPropToVols()) the multiplier is based on observed presence of a given ft:
the idea is that more presence of a gived ft is observed at beginning of simulations, more that pixel is likely to be suited for that ft.
Still multipliers are scaled to be avg 1 and sd of the growth level in the region.
“average expected returns” however could be very different for the way we average: if we average (like we do) by surface, having the
highest expected return in the pixels where there is more surface will result on “regional average” higher expected returns compared to
when they are random, even if the avg and sd is the same. Aslo, expected returns for ft with the same regional growth rate may appear
different just for the way a given ft is spatially distributed. This is however just an artifact of computing the “average” by area. What
really matter in the model is the expected return at pixel level.
Also corrected a bug in ModelCoreSpatial::loadExogenousForestLayers(“area”) for dc=0.

—————————–
Author: Antonello Lobianco
Date: Fri, 20 Nov 2015 16:14:23 +0100
Created a debug function for pixel values
Created Output::initDebugPixelValues() and Output::printDebugPixelValues(). Discovered WHY expected returns of ash, initially equal to
those of broadL_highF (as it should be, as they have equal parameters), tend to diverge (increase) with time: its initial area is much
smaller, but as there is no current mechanism to reallocated based on ft area, the chances it got an ha of regeneration is equal to
the much bigger broadL_highF ft. So, compared wit it, it's gain area. However the gain on area is not uniform: he gain more in the
pixels where expectedReturns are high: hence “average” (by area) expected returns increase with time.
We need to rebalance this artefact of the model that depends on the size of a ft.

—————————–
Author: Antonello Lobianco
Date: Tue, 17 Nov 2015 15:26:33 +0100
Corrected bug in px→getPathMortality()
If year for the computation of getPathMortality() was over the maximum simulation year, the function would not have
found the layer and hence returned 0. Now the year requested is set to the last simulation year if this is over the
maximum simulation year.

—————————–
Author: Antonello Lobianco
Date: Tue, 17 Nov 2015 11:56:19 +0100
Corrected two bugs with pathogenous module.
First bug the data about mortality was expressed in percent in the input file. Second bug in the computation of the mortality
by d.c. from the annual mortalityu a minus sign was missing. Now added it, also together to a max to be sure we do not exced
mortality of 1 (this second bug was causing negative mortality by d.c. and hence enourmous vHa and expected profits).

todo: Still to check why pathMorth_dynamic is 0 for dc=4, possible an other bug.

—————————–
Author: Antonello Lobianco
Date: Fri, 6 Nov 2015 15:52:53 +0100
Implemented the additional mortality part in the pathogen module (resource part)
Pathogen module has been almost ended concerning the resource part, that is changing the mortality depending on how many years the pathogen
is present in the pixel above the treeshold.
Multiple “minor” forest types and multiple pathogen by forest types are supported, altough untested.
There is still to be done the switch in forest type depending on mortality on first diameter class and all the market side of the ash
products modelling. Also, maybe big job, we must be sure that the model doesn't stop solving as ash disappear.

In the data file, the module is activated by the usePathogenModule option and uses the new pathogenRules sheet.
In gis::initLayrsPielData() exogenous spread models are loaded and in ModelData::loadPathogenRules the “rules” are loaded.
The key function is Pixel::GetPathMortality() that, calling ModelData::getPAthMortalityRule, get the morthality rule(s), check the historical
presence of the pathogen(s) on the pixel and return the correct additional mortality due to the pathogen.

—————————–
Author: Antonello Lobianco
Date: Thu, 5 Nov 2015 15:08:01 +0100
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Thu, 5 Nov 2015 14:58:57 +0100
Introduced ash project directory and completed initialisation of volumes and areas from spatially explicit forest types.
The ash project has been given his own directory under 00_private, with spatial data on volumes of ash coming from the
different forest types.
The function loadExogenousForestLayers() has been rewritten to account for forest types where volumes are spatially explicit.
Volumes are tranferred from input forest types to output forest types according to this spatial data (multiple output
spatial forest types are supported). Then areas are computed proportionally to the volumes transferred. DC0 areas are
then comuted proportionally to areas in DC>0 tranferred, and finally px→map layer maps are created/updated.

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 15:47:10 +0200
Just renamed an icon

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 15:42:11 +0200
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 15:39:52 +0200
Decorative elements added for release 1.1.0
Added trees image and changed names from old regmas/pythia in the setup script for windows installer.

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 11:03:51 +0200
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 11:00:33 +0200
Set the linearSolver default option to mumps, as ma57 is not present in the libraries compiled for windows.
Please note that ma27 IS present and working, but requires a free (in monetary term) academic licence to operate, while mumps is totally free.

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 10:08:14 +0200
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 09:56:04 +0200
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp
One “branch” is the removal of random_device, the other one relates to cosmetic changes in 2015_wdulef. Files interested are different, here is the merge.

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 09:53:22 +0200
Just cosmetic changes in 2015_wdulef stuff (this is the version used in JFE 2015 #R1)

—————————–
Author: Antonello Lobianco
Date: Tue, 29 Sep 2015 09:41:34 +0200
Removed random_device as not portable
Removed random seed generators crerated with mt19937 seeded in turn with random_device with just mt19937 generator seeded with time(0), as more than
enought for our scope, while the hardwere random_device is not fully portable, e.g. not implemented in old MinGw compilers.

—————————–
Author: Antonello Lobianco
Date: Mon, 28 Sep 2015 11:24:26 +0200
Just moved a uint to unsigned integer as uint seems not supported in windows

—————————–
Author: Antonello Lobianco
Date: Tue, 25 Aug 2015 10:26:21 +0200
Renamed various spatial parameter files from tp_multiplier#broadL_con##2021.grd to ..broadL_copp.. (also 2081). Changed expType and expTypePrices to 0.5 from 0.7 (I don't know why there were setting to 0.7) in ffsmInput_2015_wdulef.ods

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Aug 2015 15:36:49 +0200
Added scenarios in the 2014 papers file for sa on transaction costs under het space and ra under cc
Added the following set of scenarios in the 2014 papers input file: reference_hS, lowerTrCosts_hS and
higherTrCosts_hS (for the sensitivity analysis of transaction costs under heterogeneous space);
ccPhImpact_rA (for risk aversion effect when cc is also considered).

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Aug 2015 17:35:21 +0200
Changed transaction costs for forest investments and added scenarios for lower and higher transaction costs
reference scenario now use 50% of difference natural/artificial regeneration as transaction costs.
Also added lowerTrCosts (20%) and higherTrCosts(100%) scenarios.
Note that these SA gives very heterogeneous resulults because space in this context is homogeneous. I bet
that under heterogeneous space results would be much more smooth.

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Aug 2015 11:52:20 +0200
Added scenario areaIncrease for the 2014 management paper.
Attenction that to override in a specific scenario a variable defined in forData or prodData under the national
level, also the override should be done at national level.
If regional level are requiored, the data should be specified as regional also in the forData or prodData sheet.
The opposite is also true (data overrided as nartional should first specified using national level).

—————————–
Author: Antonello Lobianco
Date: Sun, 2 Aug 2015 15:25:00 +0200
Solved a bug introduced with the new forest area framework when natRegAllocation is not set to pp
When the natRegAllocation is not set to pp a division by zero could have happened when there was no harvesting in a
given pixel. Solved.

—————————–
Author: Antonello Lobianco
Date: Sat, 18 Jul 2015 13:43:02 +0200
Changed transaction cost - Attenction that this lead to big effects
Transaction costs has been moved from a multiplicative coefficient of the eai to an additional term to the npv (in turn computed as eai/ir).
This itself would have no consequences, but the way transaction costs has been defined (difference from artificial regeneration vs natural
one, got from technical literature) leads to very high transaction costs that mean much more likely a ft to remain what it was before.

—————————–
Author: Antonello Lobianco
Date: Fri, 17 Jul 2015 17:53:03 +0200
Added option for forest area change
Added option for forest area change at regional level (default off).
In case of positive new area, this is allocated, for the managed share, to the ft with the highest expected return (without
considering transaction costs), for the unmanaged area, according to pp at ft group or proportional to the harvested area.
In case of decreasing forest area, the decrease rate is applied to the harvested rate, with the maximum leaving forest area
set equal to the harvested area, even if manually set to a higher level.

Agorithm has been tested.
Allocation according to “replanting” doesn't solve, but this is independent on this new algorithm.

—————————–
Author: Antonello Lobianco
Date: Wed, 15 Jul 2015 17:12:19 +0200
Unzeroed extraBiomass_ratio and added extraBiomass to the death pool on harvesting.
Set a value of 0.764(B)/0.716(C) for extraBiomass_ratio from the (2003) IPCC Land use Good Practices (using Loustau, 2004 would have been
0.63(B)/0.64(C) ).
Set that this extra biomass, when harvesting, is added to the deathBiomassExtra pool.

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Jul 2015 18:04:27 +0200
Implemented the new energy substitution in code, updated cashedInputs and added autonomous gis data to the 2015_wdulef paper
1) Energy substitution is now computed from end of life products using the new function HWP_eol2energy(). Before it was in
registerCarbonEvents() → registerProducts() → addSavedEmissions();
2) Cached inputs has been updated and a problem in the ods files that was making cahed input unusable has been solved;
3) avgLife_products for fuelwood has changed to 0.001 in order to force its eof on the first year after production and not longer;
4) Data for paper 2015_wdulef has been given its own cachedInput and data directories (before they was just seemlinks) in order to fully
differentiate these scenarios from the standard “default” one.
5) Still refering to 2015_wdulef, added new scenario LandF_L to simulate a lower landfill usage (20% HWP goes to energy valorisation at eol)

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Jul 2015 11:19:12 +0200
Unzeroed co2sub_material, added eol2e_share and modified co2sub_energy (require code adjustment yet!)
co2sub_material added based on Sathre(2010). Energy substitution mechanism changed (but yet to be implemented in code!): instead of computing co2sub_energy
from the PRODUCTION of HWP, it will be computed from the oxidation at end of life. This allow to distinguish from each HWP the share to go to landfill from
those that will go to energy valorisation (thanks to the new variable eol2e_share - end of life to energy share). This also allows to precisely attribute
the energy substitution to a given year (depending to avgLife_products). The default scenario still have eol2e_share set to zero except for fuelwood (set to 1), that is all HWP except fuelwood go to landfill.

—————————–
Author: Antonello Lobianco
Date: Tue, 2 Jun 2015 17:21:53 +0200
Updated world prices from Buongiorno to smooth-freezing for the period 2061-2070

—————————–
Author: Antonello Lobianco
Date: Mon, 18 May 2015 08:34:28 +0200
Added options to ffsmInput_2015_oracle.ods and split output parser in common lib + default settings + case-specific settings
ffsmInput_2015.ods now include the options of considering only a sub-set of the resource d8for epending on availability
(actived) and option to take volume input for selected species directly from spatial data (for Ash, unimplemented here).

The python script has been rewritten in a common library, a common default settings and a case-specific script that call that
override the settings and call the library to generate the desired charts/tables.

—————————–
Author: Antonello Lobianco
Date: Thu, 12 Mar 2015 15:46:40 +0100
Added option to add forest type from known spatial data of area and vol
New option useSpExplicitForestTypes (and related spExplicitForTypesVols and spExplicitForTypesAreas options) has been added
to allow load further (specific) forest types from data, where the two tables define on each pixels the volumes and area of the
ft and “from which” general forest type this should be subtracted.
Tested with ash and a few pixel sample data, waiting for the “real” data from Claudio.

—————————–
Author: Antonello Lobianco
Date: Tue, 10 Mar 2015 17:03:01 +0100
Removed the generic set parts

—————————–
Author: Antonello Lobianco
Date: Tue, 10 Mar 2015 16:40:06 +0100
Tentative version of implementing a generic SET
This version try to implement a generic set (vector, or vector of vecvtor..), but it does it a compile-time, while it should be done
at run-time using class and subclass.. and it's just too complicated.
Saving it in this commit and then removing it on the next one.

—————————–
Author: Antonello Lobianco
Date: Fri, 20 Feb 2015 10:13:11 +0100
Updated cached input/prodData.csv to include the bug solving of last commit

—————————–
Author: Antonello Lobianco
Date: Wed, 18 Feb 2015 18:52:11 +0100
Corrected a bug with co2content_products and co2sub_energy
Due to the idiot libreoffice removing the reference to an other sheet in the cell computation these two values was wrong. Correted.

—————————–
Author: Antonello Lobianco
Date: Thu, 5 Feb 2015 13:19:01 +0100
Some more order Removed some old files, updated NEWS and README and updated doxygen config file.

—————————–
Author: Antonello Lobianco
Date: Wed, 4 Feb 2015 17:29:53 +0100
Clean-up, splitted repository by project
Aside minor clean-up, the main objective of this commit was to repository (and in particular the input file
ffsmInputFile.ods file that was growing too big) in a folder for each project/paper.
In particular ffsmInputFile.ods has only the main deault settings and a debug scenario and it has been clean of the Oracle
multipliers, for which we don't have the copyright, so that we can publish it.
All specific papers/oracle stuff are in a separate 00_private folder.

—————————–
Author: Antonello Lobianco
Date: Fri, 23 Jan 2015 15:22:16 +0100
Cleaned-up input file.
Removed from the input file some old debug scenarios and uniformed scenarios for the space paper #rev1. Put attenction to the “reference”
scenario if scenarios for the management paper needs to be run again.

—————————–
Author: Antonello Lobianco
Date: Thu, 22 Jan 2015 11:49:13 +0100
Added a spatially-dependent availability coefficient and included source code in documentation
A new spatially-explicit availCoef parameter has been added to account for forest resources not harvestable due to local characteristics
(e.g. in this implementation protected area and altimetry).
This coefficient reduce the inventoried resources available for harvesting and reditribute the harvesting rate according to the
available resources (that is, harvesting rate in the region is omogeneous over the available resources but it is NO LONGER homogeneous
over total volumes).
The GRASS comands to obtain such coefficients are in file /data/gis/scripts/commonCommands.txt.

According to the switch of FFSM++ as open source project, the source code has now being added to the reference manual.

—————————–
Author: Antonello Lobianco
Date: Mon, 19 Jan 2015 17:10:17 +0100
Updated licence info
Updated the file COPYINGand the header of each file to reflect the switch of the license to GPL 3 + exceptions, starting from this commit.

—————————–
Author: Antonello Lobianco
Date: Mon, 19 Jan 2015 16:18:11 +0100
Completed bounds for each prim. product combination.
The same resource can be used for different primary products. So bounding each primary product supply to its associated resourse is not enought.
In the previous commit we computed the inventoried resourced, in this one we actually implemented the dynamic bound for all possibe primary
product combinations.
A new domain type “DOM_PRI_PR_ALLCOMBS” and a new constrain has been added to eval_constraints() and declareConstrains () functions, while
the various helper functions (gip(), getDomainElements().. ) has been updated to consider the new domain.

—————————–
Author: Antonello Lobianco
Date: Fri, 16 Jan 2015 17:07:24 +0100
Added regional inResByAnyCombination() vector for detailed inventory resources
Big problem: the same resource (vol by ft and dc) can be used in several primary products, hence appear in multiple inventories.
Bounding each primary product supply with its inventory base is not hense enought to guarantee overharvesting, neither is to bound total
supply to total resources.
We need a bound for each possible combination of primary products (2^number of prim. pr.).
Today we have computed such inventories (and put the values in the regional inResByhAnyCombination() vector). We still have to create the
bounds in the optimisation code (TODO).
Obviously this is a problem that arise only if the harvesting interest the whole resource.

—————————–
Author: Antonello Lobianco
Date: Wed, 14 Jan 2015 14:14:31 +0100
Added mortMultiplier_link coefficient and changed some first year data on region 11030
A coefficient has been introduced to scale down the mortality rate in consideration that we are interested in mortality of already established
populaments and not mortality in natural environment.
Further the following variables has been rescaled down of a 0.3 factor in the non-forested region 11030 to prevent exaustion of the resources:
{da,dc,dl} → {fuelW,pulpW,softWfuelW}
{sa,sc,sl} → {pulpWFuelW,softWRoundW}

—————————–
Author: Antonello Lobianco
Date: Tue, 13 Jan 2015 12:04:03 +0100
Corrected mortCoef_multiplier not applying bug
in getMultiplier() function, if the multiplier was defined using table (that is, not on a spatial layer) the function was returning always
the tp_multiplier instead of the one requested to the function (e.g. the mortCoef_multiplier).

—————————–
Author: Antonello Lobianco
Date: Mon, 12 Jan 2015 17:11:57 +0100
New cc multipliers and st bounded to actual resourses.
New cc multipliers:
Contrary to what tought, tp_multipliers was still embedding the consequence of variation in species frequencies
(that is, of mortality). Now tp_multipliers reflect only variations in species productivity and relative specie frequency
within the groups of species. mortCoeff_multiplier has been also changed to account for situations where the sum(frequencies)
goes above zero, that has been interpreted as a reduction of mortality. However this second change has a very small impact, as
sum(freq)>1 is a very rare event.
St bounded to inventory instead of (fixed) disposal:
Before, st was bounded to a fixed exogenous parameter (“dispor”), now it is bouded to the current (endogenous) inventory.
Please note that however the actual application of the bound make the model crash (non solving for that year). We still
didn't find a way to introduce a bound that limit the st without braking the solver.
Removed the min 0.003 in the inventory:
As now the st is guaranteed to never go bihond the inventory, the previous setting of a minimum inventory is no longer needed.
Added code \(unused\) to set a variable as bound:
While trying to get the model working we expanded the definition of the variables as to associate it with a parameter
(defined over the same sets) that gives the variable bounds. We saw hovewer that nothing change in the solver if a bound
is defined using the solver bound api or trough a constrain, so this code is there but all variables are defined with a
fixed bound + constrains.
(Unused) code to decrease harvesting when resources are very scarse:
Some code has been added (and, for now, commented) that change the supply elasticity to price and resources when these
are very small. However the effect is very small (changing the first year supply in the data produces a much bigger effect).

—————————–
Author: Antonello Lobianco
Date: Wed, 10 Dec 2014 17:25:20 +0100
Added possibility to explicit bonds for variables In Opt.cpp it is now possible to explicit bonds for individual variables, together with their domain, in the function addVariables(). Before it was necessary to hardcode it in the get_bounds_info() function.

—————————–
Author: Antonello Lobianco
Date: Wed, 10 Dec 2014 14:12:01 +0100
Added option overridenScenarioName

—————————–
Author: Antonello Lobianco
Date: Mon, 8 Dec 2014 16:17:26 +0100
Updated agr and sStDev Upgraded the coefficients used to sample spatial eterogeneity (agr and sStDev) using the updated set of data from JDB

—————————–
Author: Antonello Lobianco
Date: Mon, 8 Dec 2014 15:44:28 +0100
Updated tp_multiplier Updated tp_multiplier with the new (second) version of the multipliers of JDB. freq, freq_norm and mortCoef_multiplier didn't eed to be changed as are the same (freq is not changed).

—————————–
Author: Antonello Lobianco
Date: Tue, 2 Dec 2014 16:32:03 +0100
Modified computeExpectedPrice() function As pw is a “weighted” price local/word, the expected price should .. actually is the same. I think this commit doesn't change anything, but if it does, this is the right way :-) EDIT: itproven it doesn change anything, but like this is more clear, even if a little bit slower.

—————————–
Author: Antonello Lobianco
Date: Sun, 30 Nov 2014 11:00:14 +0100
Added scenarios with different sd on risk aversion coefficient As requested by reviewer #1, added three new scenarios (withRisk08-01, withRisk-08-03 and withRisk08-04) in order to provide a sensityvity analisis also on the standard deviation of the risk aversion coefficient.

—————————–
Author: Antonello Lobianco
Date: Wed, 12 Nov 2014 15:59:59 +0100
Corrected scenario vRegFromHr The scenario vRegFromHr was still using regType=fromHr that in the code is no longer supported. The equivalent scenario is instead now obtained setting regType=end and setting a mr equal to zero. Also, corrected the output_parser.py for using the printChartsFlag and printTablesFlag.

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Nov 2014 15:22:01 +0100
Added explicit setting of mr=0.5 to all old scenario As the defualt setting value of mr has changed to 0.7, added esplicitly the settings of mr=0.5 to the ond scnearios.

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Nov 2014 17:31:18 +0100
Updated world prices Updated world prices up to 2013 with FAO France export unit price (primary products) and FAO France import unit price (secondary products). The default prodData table use the Buongiorno “Outlook to 2060” trend (scenario a1b) to make forecast up to 2060. Prices after 2060 are frozen. Oracle scenarios: bau works with post-2013 frozen prices, a1b* use default, a2 uses Buongiorno a2 scenario and b1 uses Buongiorno b2 scenario. All management, risk, space heterogenity scenarios hence work with FAO + Buongiorno a1b scenario.

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Nov 2014 08:46:58 +0100
Added two test scenarios on corrected world prices oracle_bau_wpc1 just update 2006 roundwood price, oracle_bau_wpc2 update all world prices to 2013. These test scenarios will be eventually cancelled and the new prices merged in the main forProd table.

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Oct 2014 15:20:52 +0100
Management module now uses expected prices
While up to now the management module was using the current observed weighted local/world prices to compute the expected returns now it uses expected
weighted prices where the current weighted prices are transformed firstly in fully expected prices using the ratio worldFuturePrices/worldCurrentPrices
and then in expeced price using the expTypePrices parameter of forest manager sampled from random distribution. Defaults: average of the normal
distribution: 0.5, coeff of var: 0.3 (same as the expectation for biological parameters).

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Oct 2014 11:19:47 +0100
Changed expReturns at forest level to NOT include ra
While expReturns at forest type level continue to be reported including ra (hence, lower), expReturns at forest level are now reported without considering
forest owners ra.

—————————–
Author: Antonello Lobianco
Date: Wed, 29 Oct 2014 18:13:41 +0100
Added expected returns of the best forest type
In addition to the expected returns of any given forest type,
a new expected return, computed as if in any given pixel is choosed the max expected return forest type, has been provided.
In homogeneous space this is equal to the exp. return of the best forest type, but in etherogeneous space this is always much higher,
due to the fact that here always the best expected return is selected. This is a better indicator of overall forest profitability.

—————————–
Author: Antonello Lobianco
Date: Wed, 29 Oct 2014 16:07:34 +0100
Merge branch 'master' of https://github.com/LEFNancy/ffsm_pp
I don't understand this.. possibly because I changed the readme using directly the online text editor at github..

—————————–
Author: Antonello Lobianco
Date: Wed, 29 Oct 2014 16:01:35 +0100
Corrected output scenarios
In output_parser_oracle.py the output scenarios was bau instead of oracle_bau.
Also added the {new|no}Exp scenarios and shortered the tables to output.

—————————–
Author: Antonello Lobianco
Date: Wed, 22 Oct 2014 13:44:06 +0200
Updated readme to use the Qt5 and no longer the Qt4
The readme was still saying to use the Qt4. Updated it to say that now Qt5 is needed.
—————————–
Author: Antonello Lobianco
Date: Tue, 16 Sep 2014 11:53:10 +0200
Added mortCoef_multiplier for oracle scenarios

—————————–
Author: Antonello Lobianco
Date: Thu, 11 Sep 2014 10:30:27 +0200
Replaced the tabs with 2 spaces

—————————–
Author: Antonello Lobianco
Date: Mon, 25 Aug 2014 18:33:25 +0200
Minor update of carbon balance coefficients

—————————–
Author: Antonello Lobianco
Date: Fri, 8 Aug 2014 12:34:37 +0200
Changed carbon decay mode to use single exponential mode in place of averageLife; Corrected errors in scenarios a1b_{no|full}Expectations; Introduced default notFoundValue in findMap()

—————————–
Author: Antonello Lobianco
Date: Thu, 7 Aug 2014 16:22:46 +0200
Added the two new scenarios in the runscenarios_oracle.sh and saved the prodData and forestData from excel to cached files.

—————————–
Author: Antonello Lobianco
Date: Thu, 7 Aug 2014 16:01:36 +0200
1) changed the default mr coefficient to 0.7 in place of 0.5 as now we have investment switch costs; 2) default output set to output_oracle; 3) Added two new scenarios of arpege_a1b with full or no expectations; 4) transport emissions increased to 0.049 in place of 0.045

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Aug 2014 17:29:32 +0200
Changed the meaning of co2content_extra variable to be the Kg CO2/m^3 of extra wood; introduced a more clear co2content_extra variable that shows the ratios between extra and inventoried biomass; updated the source code. However the demo output don't show the new biomass extra, to check it !

—————————–
Author: Antonello Lobianco
Date: Tue, 5 Aug 2014 12:34:20 +0200
Finished adding real data for the carbon module. Adding now latex referencedirectly in the excel tables. Attenction, not yet save in cache form and changed the name of few avgLife variables not yet sync in the c++ code.

—————————–
Author: Antonello Lobianco
Date: Fri, 25 Jul 2014 10:58:35 +0200
Added call graph and set graph depth limit to 2 to doxygen settings.

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Jul 2014 11:23:25 +0200
Updated the google analytics in the referenceManual to use the new one created for ffsm-project.org.

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Jul 2014 11:00:14 +0200
Test commit. Nothing really changed

—————————–
Author: Antonello Lobianco
Date: Wed, 23 Jul 2014 10:21:48 +0200
Reviewed in-code documentation to be used with doxygen to produce the Reference Manual

—————————–
Author: Antonello Lobianco
Date: Fri, 18 Jul 2014 17:21:29 +0200
Updated transportEmissionsCoeff, forOperEmissions and co2content_inventory. Still to do the remaining CO balance variables (and in particular understand why co2content_products is empty) and export the data in the cached files

—————————–
Author: Antonello Lobianco
Date: Fri, 18 Jul 2014 11:47:52 +0200
Introduced a randSample() function in BaseClass to bounded sampling with repeated sampling instead f using min/max and used it to sample the expType parameter (that was already randomised using min/max). Not much changes really..

—————————–
Author: Antonello Lobianco
Date: Thu, 3 Jul 2014 12:37:47 +0200
Completed introduction of transaction costs in investments

—————————–
Author: Antonello Lobianco
Date: Fri, 27 Jun 2014 16:20:36 +0200
Still working on investment switch costs.. there is a nasty bug that if I implement the way it should be implemented I have changes in total area that I don't have if I leave it the way it is….

—————————–
Author: Antonello Lobianco
Date: Fri, 27 Jun 2014 15:25:54 +0200
Just code refactoring..

—————————–
Author: Antonello Lobianco
Date: Fri, 27 Jun 2014 15:12:18 +0200
Added a (useless as it doesn't support tempalte??) CommonLib file, corrected pivot table range in excel output, on the way to model investment friction costs.

—————————–
Author: Antonello Lobianco
Date: Thu, 26 Jun 2014 11:33:11 +0200
Verified and corrected the measure units. Carbon emissions in milions t CO2.

—————————–
Author: Antonello Lobianco
Date: Thu, 26 Jun 2014 09:39:52 +0200
Finished carbon balance module and excel file to quick get the results. Still to be checkked the unit of measure to be sure.

—————————–
Author: Antonello Lobianco
Date: Fri, 20 Jun 2014 17:56:45 +0200
Corrected two typos that was preventing the model to work. Still to be ckecked that the new carbon module works as intended

—————————–
Author: Antonello Lobianco
Date: Wed, 18 Jun 2014 17:54:35 +0200
IMPORTANT: changed the market module to introduce imports and export in the balance contrain equations, added distance matrix between regions, completed carbon module. TODO: test it and make the output client module. It crash.. check it

—————————–
Author: Antonello Lobianco
Date: Tue, 17 Jun 2014 10:15:53 +0200
Added Carbon module. Module itself almost done (miss testing and output) but need to be implemented yet the client side of the module

—————————–
Author: Antonello Lobianco
Date: Thu, 15 May 2014 16:36:59 +0200
expectation (expType) changed to be a sampled value, starting working with portfolio analysis (added in ods the variables portfolioVarRa, portfolioVarRa and portfolioShare), added in the ods - but not yet used - a spreadshit for regional variables instead of settings.

—————————–
Author: Antonello Lobianco
Date: Wed, 14 May 2014 15:06:36 +0200
Replaced diamClass with freeDim in forestData to generalise the input matrix of forest variables (in particular to introduce covariance). Still in the code many variables refer to the diamClass.

—————————–
Author: Antonello Lobianco
Date: Tue, 8 Apr 2014 12:00:47 +0200
Renamed reference in homSpace scenario and included the output with new area method and new spatial sd, used in the spatial paper, and possible in the management one and for oracle

—————————–
Author: Antonello Lobianco
Date: Thu, 3 Apr 2014 14:25:02 +0200
Added scenarios with stronger cc mortality and option oldVol2AreaMethod that when used together with the old spatial sd is tested to give the same results as the version of cachier du lef

—————————–
Author: Antonello Lobianco
Date: Wed, 2 Apr 2014 12:37:25 +0200
Corrected a bug in getProdData() that was preventing summing up the data with a thirdDimension if this was not explicitly indicated. This was luckily important only in reporting the rt variable in the output, no model effects.

—————————–
Author: Antonello Lobianco
Date: Sat, 29 Mar 2014 11:20:51 +0100
Added a minimum volumes in the inventory definition as otherwise it doesn't solve the model with 0 volumes

—————————–
Author: Antonello Lobianco
Date: Thu, 27 Mar 2014 13:49:57 +0100
Added api to deal with maps and forest type parents

—————————–
Author: Antonello Lobianco
Date: Thu, 27 Mar 2014 12:29:04 +0100
Added initial regeneration to the dc0 during initial fixed regeneration period, as area was leaving dc0→dc1 but none was entering from before-the-run period.

—————————–
Author: Antonello Lobianco
Date: Thu, 27 Mar 2014 09:03:12 +0100
Corrected tp_modifier with tp_multipier var name in scenario sheets

—————————–
Author: Antonello Lobianco
Date: Mon, 24 Mar 2014 16:37:31 +0100
Corrected some sheets with crazy values (Excell ??) and set back pre-oracle defaults for output styles

—————————–
Author: Antonello Lobianco
Date: Fri, 21 Mar 2014 17:04:48 +0100
Added a separate area matrix in addition to volume matrix. Still to be ckecked as volumes seem to explode.

—————————–
Author: Antonello Lobianco
Date: Thu, 20 Mar 2014 11:12:10 +0100
Added checks for negative values

—————————–
Author: Antonello Lobianco
Date: Wed, 19 Mar 2014 14:09:49 +0100
Replaced the modifiers with 1/modifier and added script to run multiple scenarios with GNU parallel

—————————–
Author: Antonello Lobianco
Date: Wed, 19 Mar 2014 11:51:01 +0100
Added option to use relative or absolute frequency of probability of presence in reallocation of unmanaged harvested area

—————————–
Author: Antonello Lobianco
Date: Tue, 18 Mar 2014 12:06:40 +0100
Added data in the cached input and ability in the code to use modifiers at regional level and probability of presence for unmanaged forest. Added functions Pixel::getMyRegion() and Pixel::setMyRegion()

—————————–
Author: Antonello Lobianco
Date: Mon, 17 Mar 2014 12:05:49 +0100
Added the oracle scenarios.

—————————–
Author: Antonello Lobianco
Date: Mon, 17 Mar 2014 10:18:16 +0100
Rearranged (same values) variables agr and sStVar and added variables freq, freq_norm and modif_gr_norm to froData sheet

—————————–
Author: Antonello Lobianco
Date: Thu, 13 Mar 2014 10:10:07 +0100
Replaced parameters agr and sStDev with data from Lerfob

—————————–
Author: Antonello Lobianco
Date: Thu, 13 Mar 2014 10:03:09 +0100
Corrected bugged data in forData sheet. Past simulations are ok as they were using cached data (sometimes I am lucky).

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Mar 2014 19:07:31 +0100
Removed the big data.7z

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Mar 2014 19:05:03 +0100
Version corresponding to the 2 working papers for the chadre du LEF sent to Ahmed, Sylvain and Philippe. In his commit is included the big output data as single 7zip archive

—————————–
Author: Antonello Lobianco
Date: Fri, 28 Feb 2014 14:21:44 +0100
Riadded all scenarios and improved the output_parser.py

—————————–
Author: Antonello Lobianco
Date: Tue, 25 Feb 2014 17:32:45 +0100
Changed output and ods zip to made parallel-safe also scenarios with the same name (as long as new random seed and different output file per scenario); Re-added old scenarios withSpVariance and randomSpace for simulation as they were affected by the wrong sampling bug

—————————–
Author: Antonello Lobianco
Date: Fri, 21 Feb 2014 16:31:17 +0100
Spatial variance multipliers sampled from cv instead of sd, with better data with more reasonable cv. Further the sampling is bounded in the range [0.3-1.7] to avoid negative time of passage. The simmetry allow to keep the average equal to 1

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Feb 2014 17:18:59 +0100
Changed the unit of forArea so that now there are less round problerms and the forest area remains constant within a region; added scenarios for strong cc effect and for debugging the multipliers

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Feb 2014 09:05:04 +0100
Corrected a bug in the area computation in both modelcore and modelcorespatial; corrected a bug in the computeCumulativeData in modelCore; corrected name of the mortCoef multipliers file; removed resuts.xls file from results (just leaved the template)

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Feb 2014 09:38:44 +0100
Added multipliers for high mortality in south lowland coniferous; removed old scenarios and just left bau (ex withSpVarianceAndRisk), debug and cc1; cleaned the default settings page according to the new reference

—————————–
Author: Antonello Lobianco
Date: Tue, 21 Jan 2014 11:35:26 +0100
Removed the output data of istanbul 2014 and edited the gitignore

—————————–
Author: Antonello Lobianco
Date: Tue, 21 Jan 2014 11:32:58 +0100
Version corresponding to paper for istanbul. Output is in a 7z archive

—————————–
Author: Antonello Lobianco
Date: Fri, 20 Dec 2013 16:43:46 +0100
Working (and debugging) the random simulations

—————————–
Author: Antonello Lobianco
Date: Thu, 19 Dec 2013 16:31:01 +0100
Output parser now makes plots.

—————————–
Author: Antonello Lobianco
Date: Mon, 16 Dec 2013 16:06:13 +0100
Risk moved from intertemporal growht variance to cumulative mortalily coefficient at harvesting time

—————————–
Author: Antonello Lobianco
Date: Mon, 16 Dec 2013 11:12:25 +0100
Introduced a scenario for old TP and beta coefficient, but not actually implemented the new ones. Keeping them for now, but eventually if I am not gonna implement the new ones I'll drop it.

—————————–
Author: Antonello Lobianco
Date: Fri, 6 Dec 2013 16:54:31 +0100
Modified mortality rates

—————————–
Author: Antonello Lobianco
Date: Fri, 6 Dec 2013 09:16:15 +0100
Removed forest types con_coppers and con_mixed, volumes and hence rescaling coefficients assigned to con_highForests

—————————–
Author: Antonello Lobianco
Date: Thu, 5 Dec 2013 11:52:45 +0100
Added debug information for expectedReturns, added option to (now optionally) compute them as weighted average; added multiple scenarios, addedpython script for output formatting and shell script for running multiple scenarios on different cores.

—————————–
Author: Antonello Lobianco
Date: Fri, 22 Nov 2013 18:34:42 +0100
Working on spatial variance a risk scenarios. New data computed with the python script from INF data

—————————–
Author: Antonello Lobianco
Date: Wed, 13 Nov 2013 15:43:59 +0100
Added stochastic simulation for both spatial variance and temporal risk. To be chech temporal variance and if use like now st.dev. or coefficient of variation for the temporal variance

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Dec 2012 17:20:12 +0100
Corrected missed variables in the oputput and linear solver default back to MUMPS2

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Dec 2012 10:57:53 +0100
Solved small bug in output options.

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Dec 2012 09:49:28 +0100
Corrected a bug in tp 2007 u45 AL.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Dec 2012 17:39:47 +0100
By a mistake the bug correction over the entryVolHa didn't go in the previous commit, this commit solves it

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Dec 2012 17:52:11 +0100
Added options to explicit say which years to output and to specify the linear solver. Also added derivative check for nan/inf (this may however crack the application if detected). TODO: catch this without making the whole application crash

—————————–
Author: Antonello Lobianco
Date: Sun, 2 Dec 2012 15:10:09 +0100
Made a mess with GIT. This is actually the 'good' version. The problem is that we had to exclude the first 3 or 4 fields in each record as these are not of type value_YYYY

—————————–
Author: Antonello Lobianco
Date: Sun, 2 Dec 2012 15:02:56 +0100
Solved a nasty bug on over 100 years data (getting only 100 years data was fixed in the code, now no limits)

—————————–
Author: Antonello Lobianco
Date: Sun, 2 Dec 2012 15:01:29 +0100
Solved a nasty bug on over 100 years data (getting only 100 years data was fixed in the code, now no limits)

—————————–
Author: Antonello Lobianco
Date: Sun, 2 Dec 2012 14:49:09 +0100
Solved a nasty bug on over 100 years data (getting only 100 years data was fixed in the code, now no limits)

—————————–
Author: Antonello Lobianco
Date: Sat, 1 Dec 2012 14:59:34 +0100
Correct a bug in the entryVolHa forData and modified default scenario to run with a mr of 0.3

—————————–
Author: Antonello Lobianco
Date: Thu, 29 Nov 2012 11:49:49 +0100
Removed leaving volumes from last diameter class also in the spatial explicit version and updated curBaseDirectory to use the full path in all cases (to have the 'Go to results' button working also in win7)

—————————–
Author: sylvain caurla
Date: Wed, 28 Nov 2012 16:03:51 +0100
for the last diameter class, we impose that trees won't go to an upper class when growing

—————————–
Author: Antonello Lobianco
Date: Tue, 27 Nov 2012 14:40:43 +0100
Added configuration option for windows in src.pro to handle exceptions. Without it in some environemnt it was giving a compilation error.

—————————–
Author: Antonello Lobianco
Date: Mon, 26 Nov 2012 17:08:15 +0100
Corrected a bug in the generation of expected revenues for forest types with no previous harvested volumes

—————————–
Author: Antonello Lobianco
Date: Wed, 21 Nov 2012 14:39:54 +0100
Added src/ThirdParty/win32/lib/libadolc-1.dll (left away from the git repository by error) and updated windowsInstallerScript with new FFSM name and new placement of dll files.

—————————–
Author: Antonello Lobianco
Date: Wed, 21 Nov 2012 11:38:59 +0100
Made release and debug having two different executable names, so qtcreator correctly recompile when the current mode executable is outdated

—————————–
Author: Antonello Lobianco
Date: Tue, 20 Nov 2012 10:16:41 +0100
finished renames to ffsm

—————————–
Author: Antonello Lobianco
Date: Tue, 20 Nov 2012 10:06:44 +0100
First steps in introducing usage of death trees and renaming the model back as FFSM

—————————–
Author: Antonello Lobianco
Date: Tue, 13 Nov 2012 17:46:13 +0100
Put order (and corrected bug of mort annual) also in the traditional code, keeping the same division as in the pixel based version. Now they works and lead to similar results.

—————————–
Author: Antonello Lobianco
Date: Mon, 12 Nov 2012 10:05:41 +0100
Finished the model for the spatial explicit version and check results are very similar to the old version (slighly different because of vHa|vHa_ext and expected returns for not produced forest types). Now implementing these two things also in the traditional version and putting order on it.

—————————–
Author: Antonello Lobianco
Date: Fri, 9 Nov 2012 16:26:44 +0100
Added the updateMapArea() and sumRegionalForData() functions

—————————–
Author: Antonello Lobianco
Date: Fri, 9 Nov 2012 12:14:27 +0100
Corrected bug in getDoubleValue() getting 0 for notvalue

—————————–
Author: Antonello Lobianco
Date: Thu, 8 Nov 2012 16:57:36 +0100
Big bugs corrected: 1) all pixel vector was using empty() instead of clear() to reset them; 2) new computed vol data was never assigned to px→vol and 3) any how the newly computed vol data was wrong as is was using regional volumes instead of pixel ones

—————————–
Author: Antonello Lobianco
Date: Thu, 8 Nov 2012 15:05:14 +0100
Bug correct in using entryVolHa instead of vReg

—————————–
Author: Antonello Lobianco
Date: Thu, 8 Nov 2012 14:22:53 +0100
Two bugs corrected: 1) a 0/0 leading to a na value in diam class 0 in a pixel vector was leading all the sum by diam of tat vector to be na; 2) in calculating vHa the mortality is by year, not by diam class. This second but still need to be fixed in the traditional model

—————————–
Author: Antonello Lobianco
Date: Tue, 6 Nov 2012 11:21:03 +0100
Working (but slow and need test) the pixel based version. Moved external libraries to src/ThirdParty folder.

—————————–
Author: Antonello Lobianco
Date: Thu, 25 Oct 2012 10:09:32 +0200
Volumes layer built at init time and then every year (initLayersPixelVolumes() ) and new (tested) function getMultiplier()

—————————–
Author: Antonello Lobianco
Date: Tue, 23 Oct 2012 10:26:39 +0200
Working on pixel level

—————————–
Author: Antonello Lobianco
Date: Wed, 17 Oct 2012 14:51:46 +0200
Testing the reading of files in a directory

—————————–
Author: Antonello Lobianco
Date: Wed, 3 Oct 2012 09:43:56 +0200
Initial working on a pixel based version and discovered that the saving tapes don't save time

—————————–
Author: Antonello Lobianco
Date: Fri, 21 Sep 2012 18:51:31 +0200
- updated the windows dll of adol-c to trunk rev 350 as 33% much faster than adol-c 2.3.0; - removed “console” config in windows qmake project; - solved a bug in pythia crashing when user was pressing the stop button; - updated version to 1.0.2

—————————–
Author: Antonello Lobianco
Date: Wed, 19 Sep 2012 18:17:02 +0200
Finished conversion of using hv2fa to using initial vHa with beta and mort. This corrected some bugs, e.g it was multiplied by hv2fa instead of dividing for that.

—————————–
Author: Antonello Lobianco
Date: Tue, 18 Sep 2012 17:17:54 +0200
Added finalHArvestedFlag parameter and renamed futureTPBelief in futureBelief as it will be used more generally, not only for time of passage

—————————–
Author: Antonello Lobianco
Date: Tue, 18 Sep 2012 11:59:25 +0100
Corrected entryVolHa, as it was completelly wrong. vHa is also wrong but is due to be abandoned, as it will be calculated instead from entryVolHa, beta coefficient and mortality. tp_u1 is correct.

—————————–
Author: Antonello Lobianco
Date: Thu, 13 Sep 2012 15:23:01 +0200
Added log about optimisation

—————————–
Author: Antonello Lobianco
Date: Thu, 13 Sep 2012 13:03:26 +0200
Corrected bug in the calculation of pw (and so indirectly to the expected returns)

—————————–
Author: Antonello Lobianco
Date: Wed, 12 Sep 2012 20:08:33 +0200
Corrected output year range, schduler accounting for number of years to run and extended the data to account for over 100 years of simulations

—————————–
Author: Antonello Lobianco
Date: Wed, 12 Sep 2012 12:26:28 +0200
Two changes. A) Lighter output, suitable for long term simulations. Variables tp be printed in the output must be explicitly declared now. B) The function calculateAnnualisedEquivalent() has been rewritten to directly compare yearly incomes (e.g. agricultural gross margins). The values of the expecetd results changes, but the order between them, except of the case of 1 year values, doesn't change.

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Sep 2012 12:55:16 +0200
updated version string

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Sep 2012 12:46:54 +0200
Merge branch 'master' of 147.100.156.83:/opt/git/pythia

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Sep 2012 12:46:38 +0200
Corrected bug if regeneration was fixed or fromHrLevel. Now expected returns are always calculated, even if then they don't affect replanting decisions for these scenarios

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Sep 2012 12:44:10 +0200
corrected positioning of ui_mainwindows.h in the right directory, added an explanation hovering the new “go to results” button, removed some remaining C++11 code from BaseClass.cpp

—————————–
Author: Antonello Lobianco
Date: Mon, 10 Sep 2012 09:54:15 +0200
Reverted type convertion functions as a bug in MinGw prevents using the new C++11 functions in windows. Forced C locale also in GUI mode

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Sep 2012 18:20:11 +0200
Inserted a link in the GUI to the results

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Sep 2012 15:06:55 +0200
Solved a bug that was counsing gui to crash, related to data type conversion

—————————–
Author: Antonello Lobianco
Date: Fri, 7 Sep 2012 09:07:17 +0200
Completed name changes, but I realised there is a bug the program crash used in gui mode, but I guess it has been introduced during code optimisation.

—————————–
Author: Antonello Lobianco
Date: Thu, 6 Sep 2012 17:32:15 +0200
Created a spreadsheet with macro to import csv output; Printed region short name instead of code; inputData now use better names for products and forest types; inputData has updated scenarios. Less debug and start sens analysis.

—————————–
Author: Antonello Lobianco
Date: Wed, 5 Sep 2012 15:38:53 +0200
Option added to place all scenarios on a big file. If choosed, a cleaning of previous data with that scenario is performed at init output stage

—————————–
Author: Antonello Lobianco
Date: Tue, 4 Sep 2012 16:35:13 +0200
Slighly improved doxygen documentation and corrected a nasty bug in ModelData::calculateAnnualisedEquivalent()

—————————–
Author: Antonello Lobianco
Date: Mon, 3 Sep 2012 20:54:09 +0200
A) Changed the qmake project file to allow different folders for intermediate debug and release objects. This will let us to switch between the two without giving always a clean all. B) Further last optimisation with also forest data as maps. Bye bye forDataVector

—————————–
Author: Antonello Lobianco
Date: Mon, 3 Sep 2012 15:34:16 +0200
Further small optimisations (still missing converting forData in map like prodData) and updated doxygen file

—————————–
Author: Antonello Lobianco
Date: Sat, 1 Sep 2012 03:10:52 +0200
Improved the output system. Now user can choose if data human readable or good for processing

—————————–
Author: Antonello Lobianco
Date: Fri, 31 Aug 2012 17:54:29 +0200
Optimised code to run faster, mainly with passing references instead of values also for integers and doubles. Also optimised type conversion functions.

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Aug 2012 13:56:35 +0200
This is version 1.0.0 Major change: - opt.cpp uses now the bocop rielaboration of generate_tapes() and memory deallocation. Minor change: - using the console mode in windows; - displaying stats on current iteration also in gi mode.

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Aug 2012 09:23:13 +0200
Merge branch 'master' of ssh:147.100.156.83/opt/git/pythia

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Aug 2012 09:22:34 +0200
Updated the windows libraries to adol-c 2.3.0 WITH colpack 1.0.8

—————————–
Author: Antonello Lobianco
Date: Thu, 30 Aug 2012 08:50:00 +0200
Added a debug_large scenario that while still manageamble make the app crashing in windows

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Aug 2012 18:38:53 +0200
Just inserted some info about the current time

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Aug 2012 16:51:05 +0200
Rearranged the OPT pointer (the problem) to be defined only once and reused during the various years

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Aug 2012 16:36:48 +0200
Optimised some code, but actually most in the not-optimisation part.

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Aug 2012 15:33:40 +0200
Version working with sparse matrix. Around 1 min/year on my pc. Needs code cleaning.

—————————–
Author: Antonello Lobianco
Date: Tue, 28 Aug 2012 12:11:09 +0200
completed the updateMapAreas, but it change of very little

—————————–
Author: Antonello Lobianco
Date: Mon, 27 Aug 2012 18:03:59 +0200
solved a bug in calculating regeneraton areas in case of endogenous choices

—————————–
Author: Antonello Lobianco
Date: Mon, 27 Aug 2012 13:40:08 +0200
working on updateMapArea

—————————–
Author: Antonello Lobianco
Date: Fri, 24 Aug 2012 11:01:10 +0200
Merge branch 'master' of 147.100.156.83:/opt/git/pythia

—————————–
Author: Antonello Lobianco
Date: Fri, 24 Aug 2012 11:00:12 +0200
Introduced updateMapAreas() (still empty)

—————————–
Author: Antonello Lobianco
Date: Thu, 23 Aug 2012 15:27:59 +0200
cleaning old function code to part-manually calculate the sparsity

—————————–
Author: Antonello Lobianco
Date: Thu, 23 Aug 2012 15:20:24 +0200
jacobian and hessian spearsity patterns calculated automatically by ADOL-C

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 16:08:46 +0200
Removed old regmas garbage and updated the NSI installer script.

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 14:47:09 +0200
Updated the included windows dlls of ipopt including ASL and HSL.

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 14:40:14 +0200
Error in naming the setting scenario tab for default_midi

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 13:21:08 +0200
Updated copyright disclaimers assigning copyrights to LEF

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 12:15:15 +0200
Rationalised the debugging scenarios (with a debug_micro and a debug_midi ones) and sincred the verbosity level of the input data files with the enum in the code.

—————————–
Author: Antonello Lobianco
Date: Thu, 16 Aug 2012 11:59:26 +0200
Set the project file for making debug or release, updated the anyoption library that was giving a segfault in release mode, and removed the semicommas at the end of function definitions as this was an error using pedantic-errors. Actually with everything in release (included ipopt and adol-c) it doesn't change much :-(

—————————–
Author: Antonello Lobianco
Date: Wed, 15 Aug 2012 15:44:19 +0200
Introduced oracle_default scenario, switched to ma27 and… it solves the whole model :-) 5:30 minutes and 364 iterations for the first year, 3:48 minutes and 290 iterations for the second year\!

—————————–
Author: Antonello Lobianco
Date: Wed, 15 Aug 2012 15:17:46 +0200
Verified (and currected many bugs) the calculation of sparsity in the jacobian. It now solve the 3 regions but it is still slow to solve the whole model (it's still running so I don't even know if it will ever solve it)

—————————–
Author: Antonello Lobianco
Date: Tue, 14 Aug 2012 17:33:54 +0200
Solved a bug in getting the index of the constrain. Checked and implemented. Also implemented the exploitation of sparsity, but not yet checekd or used (it will be suuuuurelly buuuged :-) ).

—————————–
Author: Antonello Lobianco
Date: Mon, 13 Aug 2012 16:33:58 +0200
Full implementation of contrain index from the cons vector. However moving the contrains for the previous order to match the vector order slightly increased the number of iteration to reach the optimum (101 form 89). Using the gix() function to retrive the contrain index insterad of just cross the loop increased the iterations to 144 (same optimum). I may implement the constrains container as a map instead of a vector, with name as key, bt I'm worried this would further increase the iterations.

—————————–
Author: Antonello Lobianco
Date: Mon, 13 Aug 2012 14:47:12 +0200
Implemented caching of the positions.

—————————–
Author: Antonello Lobianco
Date: Mon, 13 Aug 2012 12:43:03 +0200
Implemented gip(), gix_uncached(), gdt() functions for constrains.

—————————–
Author: Antonello Lobianco
Date: Mon, 13 Aug 2012 11:32:01 +0200
Refactoring the code on smaller functions and started using the cons vector

—————————–
Author: Antonello Lobianco
Date: Sun, 12 Aug 2012 16:42:03 +0200
A version with macros and inverted some loops putting r1,r1,pro,r2to instead of r1,r2,r2to,pro. It shoudl have not changed anything (checked)

—————————–
Author: Antonello Lobianco
Date: Sat, 11 Aug 2012 21:53:47 +0200
introduced declaration of constrains, to be used for the exploitation of sparsity, but not yet used.

—————————–
Author: Antonello Lobianco
Date: Thu, 9 Aug 2012 16:06:35 +0200
Added a debug completed scenario over 3 regions and worked on the way of generalisation of the model

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Aug 2012 18:18:37 +0200
Checked with gams, incredible, it keeps the same results even on 2020\!

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Aug 2012 17:38:04 +0200
Wroted a quick output system

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Aug 2012 15:58:49 +0200
Corrected a bug in hr and cleaned up

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Aug 2012 15:28:36 +0200
Model completed, compiling and running without crashes.. now check values are ok git push origin :-)

—————————–
Author: Antonello Lobianco
Date: Tue, 7 Aug 2012 14:25:53 +0200
Model completed, but it doesn't compile.. now bughunting :-)

—————————–
Author: Antonello Lobianco
Date: Mon, 6 Aug 2012 18:44:59 +0200
Solved a silly bug in ⇐ regIds.size() and started coding of the management module

—————————–
Author: Antonello Lobianco
Date: Fri, 3 Aug 2012 17:04:37 +0200
Added some minor post-solve equation.. with errors, but we'll see them next week :-)

—————————–
Author: Antonello Lobianco
Date: Fri, 3 Aug 2012 15:05:25 +0200
WORKING, WORKING, WORKING :-) :-). Corrected three bugs in mkeq2, mkeq14 and mkteq24, leading finally to the model solving. Now we have to sollect the solving results and prepare the model for the next year

—————————–
Author: Antonello Lobianco
Date: Thu, 2 Aug 2012 09:49:15 +0200
corrected a bug in the returning the position of a variable in the concatenated array when the variable is a ALLPRD domain and a secondary product is required.. but still it doesn't solve :-(

—————————–
Author: Antonello Lobianco
Date: Wed, 1 Aug 2012 18:07:42 +0200
corrected a bug in the definition of constrains bounds and in the trasformation between primary products obj function part, but still it doesn't solve :-(

—————————–
Author: Antonello Lobianco
Date: Wed, 1 Aug 2012 16:47:09 +0200
corrected a bug in the calculation of ff and gg parameters, but still it doesn't solve :-(

—————————–
Author: Antonello Lobianco
Date: Wed, 1 Aug 2012 09:15:04 +0200
Sorted an error with timing, but still not working

—————————–
Author: Antonello Lobianco
Date: Mon, 30 Jul 2012 19:11:25 +0200
working on the map instead of vector

—————————–
Author: Antonello Lobianco
Date: Mon, 30 Jul 2012 09:16:37 +0200
Working on changing the product data from vector to map. Still need to fix the setdata function

—————————–
Author: Antonello Lobianco
Date: Tue, 24 Jul 2012 17:19:03 +0200
Corrected the maximisation direction and introduced a debug version to work on a subset of regions and products

—————————–
Author: Antonello Lobianco
Date: Mon, 23 Jul 2012 17:28:58 +0200
Inverted the maximisation inverting the obj function and disequality constrains. Reverted to the non-sparse structure

—————————–
Author: Antonello Lobianco
Date: Mon, 23 Jul 2012 12:44:52 +0200
Version using the exploitation of sparsity drivers, but ColPack libray has problems. Almost all opt code commented, but still it crash. It is enought to run double times the example and it crashes.

—————————–
Author: Antonello Lobianco
Date: Sun, 15 Jul 2012 11:36:48 +0200
Finished the optimisation part as well. Now thee things remains to be done: (1) invert the maximisation and mound contrains (by default ipopt minimise); (2) add the post-optimisation part of the model; (3) uses the exploitation of sparsity library otherwise too big model

—————————–
Author: Antonello Lobianco
Date: Fri, 13 Jul 2012 13:37:39 +0200
Don't know why previous commit didn't go mainstream. Commit it again

—————————–
Author: Antonello Lobianco
Date: Thu, 12 Jul 2012 14:36:51 +0200
Implemented most of the contrains.

—————————–
Author: Antonello Lobianco
Date: Thu, 12 Jul 2012 12:01:26 +0200
Finished obj_value calculation and added a_pr to inputfile

—————————–
Author: Antonello Lobianco
Date: Wed, 11 Jul 2012 19:08:28 +0200
Added initialisation of the variables and functions to map the dimensional indexes with the unique concatenated variable vector.\nAdded also initialisazion of the regional trade to zero.

—————————–
Author: Antonello Lobianco
Date: Tue, 10 Jul 2012 11:46:10 +0200
Missed prodData.csv

—————————–
Author: Antonello Lobianco
Date: Tue, 10 Jul 2012 11:45:10 +0200
Implemented a cached system for the two big input tables forData and proData. If the program found on disk cachedInput/{tableName}.csv then it uses them instead of looking at the ooffice file. Much faster

—————————–
Author: Antonello Lobianco
Date: Wed, 4 Jul 2012 12:01:32 +0200
Version working with a OPT pointer at model level and one OPT pointer for each year. Now Gonan try cancelling the yearly one and reusing the same OPT pointer.

—————————–
Author: Antonello Lobianco
Date: Tue, 3 Jul 2012 15:33:53 +0200
Added windows precompiled libraries and headers to the project. libadolc-1.dll needs to be manually copied from src/win32/lib to the project root.

—————————–
Author: Antonello Lobianco
Date: Tue, 3 Jul 2012 13:42:37 +0200
Version that includes a test with the ADOL-C library for Authomatic Differentiation. I have also tried with ColPack for working with sparce matrices, but it segfault.

—————————–
Author: Antonello Lobianco
Date: Sat, 30 Jun 2012 12:11:31 +0200
Version with all the init stage completed and tested. Now it's time to write the simulation ;-)

—————————–
Author: Antonello Lobianco
Date: Thu, 28 Jun 2012 18:02:23 +0200
Added functions to get/set forestry data and assess production from specific forest types/diameter classes. More GAMS equation in the model.

—————————–
Author: Antonello Lobianco
Date: Thu, 28 Jun 2012 09:45:54 +0200
Option for optional overriding and get rid of warning.

—————————–
Author: Antonello Lobianco
Date: Wed, 27 Jun 2012 18:52:13 +0200
Added model equations, but check reclassification, as it seems that a-11042 isn't there.

—————————–
Author: Antonello Lobianco
Date: Wed, 27 Jun 2012 12:04:43 +0200
Changed functions that retrive regions to avoid residual regions by default; implemented setProdData()

—————————–
Author: Antonello Lobianco
Date: Tue, 26 Jun 2012 18:13:24 +0200
Finisced the getForData() function and the overriding of forData, prodData and reclRules. Need little bit of clean-up. Found a problem in the model related with pri_prod→sec_prod transformation.

—————————–
Author: Antonello Lobianco
Date: Mon, 25 Jun 2012 11:38:21 +0200
Corrected raw input of values, strangelly I was harvesting the visualisated value rather than the memorised one. Ended also the forest reclassification.

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jun 2012 15:19:55 +0200
Completed reclassification rule

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jun 2012 10:36:27 +0200
Added results to ignore files.

—————————–
Author: Antonello Lobianco
Date: Thu, 21 Jun 2012 10:29:36 +0200
Corrected error of Picardie wrongly been assigned code 11052 and fixer reclassification rules (only one rule by input type allowed)

—————————–
Author: Antonello Lobianco
Date: Wed, 20 Jun 2012 14:46:47 +0200
the pythiaInput.ods has an error in the region 11052 used for two different regions

—————————–
Author: Antonello Lobianco
Date: Tue, 19 Jun 2012 17:41:58 +0200
Finished the loading from input file part. Next step: set space and reclassify the layers

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Jun 2012 14:47:10 +0100
Optimised RedData::loadInput and renamed RegData to ModelData to avoid confusion with model regions.

—————————–
Author: Antonello Lobianco
Date: Mon, 18 Jun 2012 12:42:37 +0100
Cleaned the code from Regmas. Issues: 1) Still to clean the attribution headers (licence info) 2) It compiles but it doesn't load the map

—————————–
Author: Antonello Lobianco
Date: Sat, 16 Jun 2012 16:45:28 +0100
Ended transferring of input data on pythiainput.ods Did little bit simplification over the code.

—————————–
Author: Antonello Lobianco
Date: Wed, 13 Jun 2012 11:30:26 +0200
A first cleanup

—————————–
Author: Antonello Lobianco
Date: Tue, 12 Jun 2012 19:13:03 +0200
improved gitignore

—————————–
Author: Antonello Lobianco
Date: Tue, 12 Jun 2012 18:36:58 +0200
Initial version of pythia**

—————————–

en/dev/gitlogfull.txt · Last modified: 2024/12/02 02:14 (external edit)