This is the Chile input dataset with new maps for the full area

VER060dbg
- Thorsten's last version before his Canada vacations 
- The following folder had to be deleted because filenames were too long
   ..\xlsInput\compiled_CreateRoutingGraphWithDotForEdic

VER061
- Thomas's consolidated version, including both aggregate and individual agents 
- see more detailed description in  ..\xlsInput\Notes.doc)

VER062
- Christian's version of Oct11, improved key files
- bugs in references of network.xls

VER063
- Thomas's attempt to fix both Christian's and Thorsten's bugs
- Region.xls is messy, hyperlinks set by hand (see Notes.doc)
- still bugs in map files for individual agents
- LP infeasible for aggegrate agents

VER064
- Christian's version of Oct15
- splitting of contract constraint, new activity (compare notes)
- network.xls references revised 
- minor data error fixing

VER065
- Christian's version of Oct 18
- cf. notes
- Thorsten's VER064gis maps copied into folder input/gis

VER066
- Thomas's consolidation

VER067
- Christian: fixed bugs in matrix.xls

CHI070
- Christian Update population.xls dairies

CHI071
- new executables (positive seeds)
- water rights in region file updated

CHI072
-water rights in region.xls corrected

CHI073
- missing integer information in matrix.xls added

CHI078

- new consolidated version
- a lot of corrections to input files and executables
- stable population file
- flowers (Lilies, Chrysanthemum) included
- NonZeroConstraints and Integers in Matrix updated
- changes to region.xls, CropWat.xls, Matrix.xls, Network.xls, Population.xls

CHI084
- corrected input file bugs (matrix.xls, CropWat.xls)
- corrected ScenarioManager
- new Executables
- updated XSolver

CHI093
lots of corrections on matrix.xls, network.xls, perennials.xls, routing, region:
	-links in perennilas
	-labour no investment any more
	-wrong soil requirements of pseudoperennials in matrix corrected
	-overall factor and waterrights corrected
	-population file calibrated again

CHI097 (TB)
- consolidated Carlos's revised files
- started hyperlinking Chris's data


CHI098 (EL)
- machinery requierements of annual crops corrected

CHI099 (TB)
- minor change in rice.xls

CHI100 (EL)
- introduced monthly machinery requirments feature for annual crops

CHI102 (EL)
- started filling labor requirments for irrigation in IrrigationInvestmentData.xls
- calculations of investments profitability in IrrigationInvestmentData.xls
- Change yield from absolute format to relative in Perenials.xls

CHI103 (CT)
- introduced Grow Cornseeds High Irr I+II into Matrix, CropWat, Market
 -> incorporate into AnnualsSummary and later into Matrix and Market

CHI104 (EL)
- Updated machinery requirements for annual crops in Matrix.xls
- Flowers growing activity introduced in matrix.xls

CHI105 (EL, Hamil Uribe)
- CornSeed.xls, calculated values for Labour, High Machinery, Variable Costs, Liquidity
- CropWat.xls, new activities for perenial crops introduced
- Matrix.xls, labor fixed in annual crops, production costs corrected
- IrrigationInvestmentAnnuals.xls, operational and investment costs fixed, labour requirments for irrigation techniques changed, yield increase due to new irrigation technique feature introduced

CHI106 (EL)
- Cropwat.xls, irrigation water demand values fixed
- Rearranged matrix in MatrixRearranged.xls

CHI107 (EL)
- cropwat.xls, new activities for annual crops introduced. Yield data revised and changed

CHI108 (EL, CT)
- Cropwat.xls and MatrixRearranged.xls connected via new ActCode and LPcolumn numbers
- New PriceDevelopmentData.xls, flowers included

CHI109 (EL)
- Improved annuals activities included to Perennials.xls

CHI110 (EL)
- MatrixRearranged.xls completed
- Potential yield for rainfed crops added to CropWat.xls
- Market.xls renewed

CHI111 (EL)
- New Matrix.xls completed and solved

CHI112 (EL)
- Future Selling activities and constraints for perennials added to matrix.xls
- Changed format of Market.xls

CHI113 (EL)
- Started working on Network.xls, activity codes uptated in perennials.xls. Some mistakes corrected in Matrix.xls

CHI114 (EL)
- Averages calculated for all activities in perennials.xls, network.xls and perennials.xls are interlinked

CHI115 (EL)
- Mistakes with the investment lenght corrected in perennials.xls, more columns filled in network.xls, yields for perennials corrected 

CHI117 (EL9
- Redundant cell names in Matrix.xls are deleted, some investment contract activities added

CHI118 (EL)
- Zero ranges defined in Matrix.xls, water requirements added to matrix.xls

CHI119 (EL)
- Original coefficients restored in 1996 block. Animal traction constraint added
- Production costs inflated to 2005 level in Perenials.xls

CHI120 (TA)
- Some irrigation methods were changed (Rice)
- The links in sheet "CropWat"  from "ActivityKey" corrected.
- SoilTypes in ActivityKEY  modified  (which we dont use, only for linking to Hamils land use data !)

CHI120 (EL)
- SetToZero option added to matrix

CHI129 (CT)
- new formats for Market, Network CropWat, Perennials and Matrix implemented,
- Perennials and Network Keys revised and set up
- Network File filled with data
- first try of 1996 Population File
- some Irrigation Methods revised, introduced new irrigation methods


CHI142(TA)

- Routing: modified d, e and sector order
- Region: 
    x Edic calibration parameters now read from in sheet 'tableEdicCalibration'
    x Other tables cleaned, eventually discarded
    x modified order of sectors (sectorID changed. SectorName, SectorGisID same as before)
    x modified calibration factors b, g
    x modified Actual water rights
          Also contains rights normalized to one for each inflow and sector.
    x updated Sector-level WaterRights (for randomizer)

- MeteoFile
   x Here, both median and mean river flows are inserted. Actual flows follow the MEDIAN year. 
Melado flows set to higher values by hand, because these are artificially reduced by 
humans if water is sufficient?thus, flows reflect usage rather than availability.

	 x Precipitation was not yet modified.
	 
CHI152 (CT)

- corrected prices, lots of input errors
- corrected annuity claculation in perennials
- 1st calibration of Lottery done
- fine tuning coefficients introduced
- network: Activity COlumn corrected to growing activity
- Water Rights as Sector Shares

CHI153 (CT)

- new soil classification introduced

CHI158 (CT)

- new soil classifcation completed, introduced differentiated soil activities for pasture and dairy
- eucalyptus and greenhouse still to be done if wanted (for now greenhouse only on III and eucalytus only on IV)
- values for pasture handmovesprinkler still to be calculated
- corrected water demands in crop wat
- new executables

CHI162 (CT)

last version before going to CHile
 - new executables
 - bug correction
 - to be checked: setTozero areas!!!


CHI163 (EL)

- Renamed repeating sell names in matrix.xls. Added new activities to Xsingleagents.xls


CHI164 (TB) 23.06.08

Network.xls
- corrected LP activity index for 1996 perennials (lookup in references did not refer to column B)
- corrected soil type for Investment Beans Low IV Irr (1996)
- still inconsistencies for Investment Greenhouse all soils Irr (1996), name is wrong, greenhouse has entry for soil type 0 in matrix

Matrix.xls
- changed constraint names, investment upper bound

CHI165 (TA) 24.06.08

     CropWat.xls
     - ActivityKey: IPG hyperlinked from CropKey
     
     Region.xls
     - RegionKey: Updated canal efficiency  
     - RegionKey: Updated calibration factors b, g     (via sheet tableEdicCalibration)
     - RegionKey: Updated water rights at sector level (via sheet tableEdicCalibration)
     - Region: Two more columns for AncoaReservoir inflow
     
     MeteoData.xls
     - New sheet: DefinitionType, which defines how precipitation data was interpolated by each type. 
     - New sheet: SectorPrecipitation, with monthly (typical ~ median) precipitation data at sector level, also including standard deviation
     - Addition of Ancoa Reservoir. NOTE: Ancoa RIVER now always with appended "river", to avoid confusion with reservoir!
      
      New data file:
      - xlsInput\Data\Meteo Data\precipitation\precipitationData.xls
         contains precipitation data for all flow stations, annual and formated

CHI166 (EL, TA)
- Predefined landuse rows introduced in Matrix.xls. Corrections in RHS formulae. Corrections in coefficients for shorth term credit and savings.
     

CHI167 (TB) 01.07.08
- Added folder /xlsInput/Predefined containing all files needed for these scenarios

CHI168 (CT)
- updated links and names in network.xls

CHI172 (CT)
- corrected errors in matrix, market and cropwat


CHI174 (CT)

for exLU:

Network.xls
- set availability of all objects (including exoLU objects) to 1000

Population.xls
- switch off all other lottery objects (assets and household members)
by setting upper bound 100 to 0

Matrix.xls
- change equation for exoLU constraints from EE to LE


for both:
- Rainfall changed in meteodat & cropwat
- in CropWat: calibration factors for IPG -1, 3 & 4
- Matrix.xls: 
	- yield reserve equivalents are now automatically set to zero when predef switch is set (only those currently implemented if adding eqs for new crops please use if function as for the ones in use).
	- zero_yields... introduced to set all yields zero, have to come from CropWat
- BasicData: Maximum number of villages et to 20 to make different rainfall work

Thorsten's new executable (MPMas.exe) requires cc3270.dll, which I do not have! could not test!


CHI174offDyn (CT)
!!!!!- Dynamics are off now also in normal mode: No Investment (network.xls - switch in References), no asset and hh aging for debugging !!!!!

CHI176offDyn (CT)

- Evgeny and Thorsten worked on matrix
- Christian corrected zero_obj fpr ExLu

CHI177offWat (CT)

- dynamics still off
- changed object types ... introduced berry type
- new executables!!!
- set Water Demands indirectly off, for all plants by setting rainfall for all sector to 1000, (with calibration factors does not work as the model expect values > 0 there)
  used a rainfall type 9 for these sectors, switch to real rainfal by introducing real types

CHI178offWat (CT)
- market dynamics also off
- set yields for innvestments manually off by switch ( error in code!)

CHI179offDyn (Ct)
- water demands on again, rain set to type 3 for all sectors = pretty dry 
- unirrigated crop yields and irrigation demands seem reasonable now after correcting some formula mistakes in cropWat
- dynamics still off

CHI181 (CT)

- exLU-switch in Perennials file now also switches off labour and machinery demands

CHi181exLU (CT)

- Input Files currently in exLu-mode
- Fallow endowment of Setcor in exLU set to 1000 to give reserve if there are differences between land and landuse totals
- missing exLu links in Matrix corrected
- Fallow Water Demand set to 1 mm/month in CropWat to avoid internal error
- links of exLU in Population corrected (were shifted one up before).

CHI182

- Files for two Region set -up created

CHI183
- currently in exLu- mode
- Water Off
- Dynamics Off
- exLu mode is running fine (without water)
- changes made to population, predefind landuse in data
- CropWat.xls separated CropId and PrcieColumnId, all activties go to export column if available (except Meat and Wine, Blueberry)

CHi184
 - cleaned up CropWat

CHI185/6 (ct)
- CropWAT: Thorsten included additional "soil moisture" to precipitation file, as new column.
- CropWat: Thorsten cleaned up column names in ActivityKey and CropKey

CHI187 (ct)
- Thorsten added exLu WaterRight for Sector 04a
- Matrix.xls : change of extent of zero_predef0
- Matrix.xls: exLu-Constraints to LEQs
- CropWat: revised some Kcs and real Irrigation /Yielad irrelevant months to zero
- CropWat: 2005 InvestmentGrowing-Activity Yields set to zero
- MeteoData: Rain on 1000 to switch off Effective WaterDemands

TODO: 
- interest rates for short term credit and deposit cannot be included in changing production costs in market.xls
- redo updating of liquidity row (problems in labour, credit, savings, liq transfer...)
- review crop water demands

CHI188 (rta)
with corrected ExLu-CLU-Files in Population.xls (Land requriements set to one if appropriate)  is on the AFS.



---------------------------------
There is still a bug: 
- with our new source code, the model produces no land uses except for some stupid investment activities. 
- With Christian's version of the source code, the model solves propperly.
- MeteoData: Rain switched to "real" values (Effective WaterDemands  ON)

CHI189 (rta)
1) ExLu- Bug solved
- Population-ObjectFiles for ExLu now 2 (Symbolic Object)
- Population-Land requirement in ExLuConstr now 1 (same as in cluster files!)
- BasicData: NumSymbolicObjects 25
2) Additional files:
- xlsInputs/Predefined/HowTo_Predefined.doc
- xlsInputs/Predefined/Matrix_Manipulations.xls  XLS file that contains information on MILP 
  (information on constraints, on activities, etc)


CHI190 (ct)

- Readme.txt :  Introduced new Section at the end (see above) - please always keep updated. 
Hope it improves our communication and documentation!
- CropWat.xls : Crop Irrigation Type corrected: crops that are in perennials.xls have to be marked as perennials here as well, although they are annuals in reality.
- CropWat.xls: irrigation methods corrected
- Matrix.xls: corrected formulae for LHS calculation

- Stata-Lottery-Analysis files ( in out/analysis) updated
- region.dats in seedset folders updated
- Population.xls: started lottery tuning again

CHI191 (rta)
- Region.xls      ... some b-factors tuned
- Basic.xls       ... Switching for PREDEF not necessary any more.
- SCENARIOmanager ... Inserted switch "SWITCH_SCEN"  for 
				0   Normal
				1		Predefined Landuse
				2	  Small area ("_05") and water switched off
- MeteoData	 ... Switch		SWITCH_SCEN for precipitation
- Matrix 		 ... Switch		SWITCH_SCEN for PREDEF

--> continue version history here...

CHI192 (ct)
- CropWat.xls			implicit deficit irrigation introduced for 1996 perennials (See new file in Data/WaterDemand)
- CropWat.xls: 		apple and pear september water demands set to zero
- Population.xls:	 - Corrected error in exLU0_1 Liq entry in wrong row
									 - Set all agent expectations to 0 (naive)
									 - continued tuning of lottery 

- ScenarioManager/MeteoData/Matrix/BasicData: Thorsten*s switch does not work correctly (explanation in mail), 
	--> to switch to PREDEF only switch in Matrix.xls (BasicData	then automatically switched)	 
	--> switch in ScenarioManager serves only to switch between Regional and Full
	--> switch in MeteoData does not exist anymore

- new executables
- rain is on

CHi193 (ct)
- Matrix.xls: corrected some minor errors (Perennials Transfer row s other then I+II soil ) should not have any effect for now, as no perennials on other soils were on
- Population.xls - Set all agent expectations to 1 (naive)
									 - continued tuning of lottery - reached preliminary satisfying result, apt to first continue further debugging and checking of the LP


CHI194 (ct)

- Population.xls: introduced switch to set all fixed costs to zero for debugging
								- set Liquidity very high
- Matrix.xls: set Year1 Liquidity of all annuals to zero (for now without effect because of bug 4.1)
							eliminated liquidity entries of labour

CHI195 (ct)

CropWat.xls
--> 1996 Unirrigated Wheat: Potential Yields tuned, so that with type 8 rain, the expected yields are the yields we want to have
--> Pasture Ky set to 0.5 as a first attempt

Matrix.xls
--> all ExLU Constraints (except Fallow) set to EE (as required by Tbe)

Stata
--> updated stata routines

--new executables!!!

To change to exLU at the moment only change the PREDEF switch in Matrix.xls, 
make sure the Region_Switch in Matrix is not set to 2!!!

CHI197 (ct)

CropWat.xls
--> defined risk assessment factor for IPG 3 & 5 to reduce asssumed water demands

Matrix.xls
--> introduced transfer activities for exLu and set all exLu constraints to EE, seems to work fine
(as I have not used the new executables, still there is the lottery error of course)

MeteoData/CropWat.xls
--> ActualPrecipitation-Link of CropWat linked to Melozal water instead of Type 8 rain for expectations of agents

Region_Test.xls
--> new, convert for 0 water interaction (Initital ReUse 0 and b,g also 0)

new executables were buggy, find them in subfolder newexec, old ones left in version

CHI199 (ct)

- corrected minor errors in cropWat
- new executables
- updated stata procedures

CHI200 (ct)

- corrected errors in Matrix.xls, CropWat and PriceDevelopment, Matrix.xls
- new folder in /data with profitability calculation and Calibration Protocol

CHI201 (ct)

- corrected and calibrated Values in Matrix.xls, CropWat, Market Market_Dbg (priceDevelopment, COstDevelopment etc)
- annuals now contains a folder with the old fichas_b3 of Bergers Lp and revisions
- there were errors in the MILP Master (so in case of any doubt, consult these files e.g. wheat96.xls) and this versions Matrix/CostDevelopment!
- new executables were buggy, find them in subfolder newexec, old ones left in version
- created import routine for expWaterSupply in Stata folder...

CHI202 (ct)
- further corrections and calibration
- change in Market /Market_Dbg: minimum consumption set to 97. (was 1000 before!)
- new executables!
- new Region_sCE: b,g are on, Initial Reuse to 1.01, Canal Efficiency to 1
- new xla and change in Matrix.xls set-up

CHI205 (ct)

- new executables (TestMPMAS!!!)
- new format of BasicData, MeteoData, CropWat, ScenarioManager
- Infrastructure Projects_05 to be used for debugging (invented objects)
- Region_05 updated

CHI207 (ct)

- change of Clusters and Population!

The area has been divided into for subareas, whose agents constitue one population:

Pop:
0	Comuna de Colbun
1	Comuna de Linares
2 	Comuna de Longavi (al Norte del Liguay)
3	Comuna de Longavi (al Sur del Liguay)

In each Population there are four Clusters (more or less as before)
based on the boundaries values of ODEPA for Depresion media y Riego between Rio Muale and Longavi

Cluster
0	subsistencia	< 5 ha	 (im Modell nur alles über 3.5 ha)
1	pequeña		< 25 ha
2	mediano		< 60 ha
3	grande		~

So in the end now there are 16 Clusters
some examples for illustration:
0_3	large farmers in Colbun
2_0	subsistence farmers in Longavi, north of Rio Liguay
1_1	small farmers in Linares
etc.

like before Clusters 0 and 1 form Network zero, and Clusters 2 and 3 form network 1 independent of the population



CHI208 (ct)

- version produces error after first period: Agent sells farmstead though still having plots
- saved for debugging

CHI211 (ct)
- version before TBerger's vacation

- introduced management groups info in Perennials
- avoided use of imroved technology in network and population.xls
- lot's of calibrations in Population.xls

CHI214 (ct)
- new perennials.xls of Evgeny: corrected 1996 Investment Prices
- new 2005 do-file firstAnalysis_upk.do
reviewed matrix.xls, network.xls, population.xls:
	- improved technology not an independent constraint anymore - to be able too smooth in as innovation
	- new independent constraint "deliberate switch off", used to switch off all 2005 activities we currently do not want to have in the model
	- 2005 actitivities generally switched on, but most of the switched off via deliberate switch off 
	- activated SweetCorn and all activties which have 1996 activties and weren't classified by Chris as improved technology
	- yield tuning for SweetCorn, price and yield correction Tomato, Wheat Non-Irr, Watermelon, SweetCorn of 2005
	
CHI215 (ct)
- again changes to cropWat, matrix, population, network, market, market_dbg, pricedevelopment etc
-	corrected yields, prices Sweetcorn, Sugarbeet, Tomato, Peas(!!!)

- made vegetable ability binding, estimated as a yes/no variable
- made labour hiring ability binding not giving everybody at least 4 anymore.
- classified all 2005 Activities for which a corresponding 1996 activity exists as improved technology,
- allowed improved technology investment from 3rd year on to check what happens

CHI216 (ct)

- canal efficiency on
- Thorsten's new executable with extra water redistribution
- calibrations
- (changing water not yet implemented)

CHI218 (ct)

- corrections of raspberry, milk, meat coefficients and prices
- prices for 2008 implemented

CHI220 (ct)
- calibrations and corrections in matrix.xls and CropWat.xls

CHI222 (ct)

- new switches in network.xls and population.xls

Chi223 (ct)
- added RunMPMAS_V2.4.exe: Thorsten's latest and stable executable
- for everything else please refer to my documentation at the end of my Chile stay sent to you via email

Chi224 (ta)
- Added input data
   > BasicData-sheet "SpatialExchangeInfo"  
      .  specifies, how spatial data is treated (both internally, meaning if it is stored at grid or sector level, 
            and which data is written as maps to file, and how often.
   > MeteoData-sheet "RiverFlows_FullTimeSeries"
      . Dynamically updates river flows
      . If exported to file (ScenarioManager), then automatically recognized and used. 
   > Region.xls sheet "Region"  updated. 
      . Water availability corrected after comparision with coupling results.
      . Hamil has added some external water sources, which give additional water to some of the northern
        sectors (04a-c), especially MauleSur.
   > COUPLING
      . Input data for coupling (EdicInflows_coupl, Region_coupl, ActualWaterRights_coupl) added 
        as extra sheets. With flag "-T30", source code changes name and reads those.
      . Thus, for running coupled runs, only difference in BasicData ("HYDRO_MODEL == 2"), and flag -T30.  
        
CHI226 (ct)
- New format of the network files implemented (except for exLU)

- new executable
       
CHI227 (ct)
- set yields for investments equal to basic crops in CropWat
- changed matrix.xls (deleted ones for non-export selling activities)

CHI228 (EL)
- vegetable industry access investments and greenhouse investment are restricted by setting upper bound in Matrix.xls to 0
- In Network.xls parameters of investments revised and corrected
- Marketfiles_expectation folder contains market.xls files with different calculations of expectation. Always run model with naive expectation, when using these files
- Yield reserves changed in Matrix.xls

CHI230 (ct)
- InfrastructureProjects renewed (95)
- set yields for investments equal to basic crops in CropWat missing 1996 completed

CHI232 (CT, EL)
- Minimum investment feature in matrix.xls implemented
- Changes in investment scenarios in Network.xls

CHI236 (CT)

- cleaned up links
- new format of network.xls also for exLU
- changes in basicdata required for new executable
- Scenario (Market, POpulation, Investment) available from Scenario Manager
- changes for changing production costs implemented but not activated yet

CHI249 (CT, EL)
- all irrigation technologies separated from perennials, 
- introduced management groups, corrected exLU

CHI260 (EL)
- ExLu-mode is functioning now with all the changes

CHI261 (CT)
- stable version

CHI262 (CT)
- increased lifetime of T0 Machinery
- set liquidity reserve from 0 to 1
- corrected infrastructure project subsidy shares!

CHI263 (CT)
- decreased maximum age of assets at start 
- corrected bounds for fixed costs matrix
- increased initial liquidity

CHI275 (CT)

- corrections for exLu
- changes for Cash Financing Constraint
- changes in Stata rountines

CHI286 (CT)

- last version before Chile Dec 2008 Presentation

CHI287 (CT)
- back from Chile included missing Water for Bullileo and Thorsten's recalibration
- included seedsets into Region file and ScenarioManager

CHI288 (CT)
- split 1996 annuals machinery over months


CHI294 (CT)
- version used for dynamic pretests in C.Troost's thesis
- irrigation technologies have been revised and now consist of a head unit and an area dependent part
- general clean-up and consistency check

CHI299 (CT)
- version used for policy analysis stage in C.Troost's thesis

CHI301 (CT)
- first clean-up version after C.Troost's thesis

CHI301pub (CT)
- cleaned for publication on institute homepage



------------------------------------------------------------------------------------
1)	Know Issues and Rules for input file changes (to avoid known errors):

1.1	Readme.txt: Please note all updates in the version history above and temporary workarounds, 
known issues, bugs and to dos here!!!! Don't forget to take them out if not necessary anymore!

1.2	MeteoData_05ab, Region_05ab, Routing_05ab and BasicData_05ab serve to have only the 05a and 05b sectors in the model.
 Choose them in ScnearioManager instead of the originals. Please update these as well when you update the originals!

1.3	Region.xls:

If you made changes in Region.xls make sure, that the Region Sheet is the last in the list of sheets to be converted, 
because the other sheets have links into red-marked cells of that sheet (ct 17/07/08)

1.4	Population.xls/Network.xls:

If you make a change in Network.xls, which affects Population.xls as well, check if Population.xls is correctly updated. 
If not go to Data/origPopulation.xls reestablish the link to Network.xls 
(Edit - Links - Change Source  resp. Bearbeiten / Verknüpfungen / Quelle ändern...), 
then update origPopulation and Population.xls). (ct 17/07/08)


