A list of memo notes about particular things and problems that may arise from time to time in the various projects in Capsis, and a list of people involved in the co-development community.
fc+mw-19.4.2022 A MacOSX configuration with no Capsis/AMAPstudio 3D problems
fc+jfb-5.4.2022 JOGL problem under Ubuntu 21.04 on a laptop
J'ai fini par reussir a demarrer Xplo en ajoutant la variable d'environnement suivante: LIBGL_ALWAYS_SOFTWARE=1
J'ai regarde l'effet de cette variable. Ca se passe au niveau de mesa (la lib opengl de linusque), elle oblige a effectuer un rendu soft et donc affranchit de la zoubia des cartes graphiques. Donc le probleme est contourne mais une solution est en place. Sur mon portable ca a l'air de repondre suffisamment bien pour l'usage que j'en attends.
fc-1.4.2022 Interesting article about threads and synchronization (fr)
http://blog.paumard.org/cours/java-api/chap05-concurrent-synchronisation.html
fc+ta-18.3.2022 Picking problem on Mac Book Pro Retina screens
Je viens de soumettre le pb à Fred Boudon (chez qui ça marchait bien), et il a de suite réagit en me disait qu'il connaissait ce pb. En fait ça vient des écrans Retina des MacBook Pro, (c'est assez flou) les pixels sont pris en compte différemment avec les Retina et il y a un facteur 2 qui rentre en jeu quelque part. Si je ferme mon mac et que je travaille uniquement avec un écran extérieur, alors tout marche bien. En revanche, si je laisse mon ordinateur ouvert, ça ne marche pas (que ça soit sur l'écran Retina ou sur l'écran extérieur). Il m'a dit qu'il a solutionné ça avec une fonction OpenGL add-hoc dans PlantScan3D.
Voila voila… information à garder en mémoire (et peut être dans un endroit plus perenne) car cela risque d'arriver à d'autres.
Ils ont l'air d'en parler ici:
ou encore ici:
fc-14.10.2021 TechnicalPackages
It is sometimes interesting to launch a simulation in the GUI context without seeing it in the projectManager. For this purpose, the technicalPackage feature of the ModelManager can be used.
2 possibilities :
capsis.lib.metatrom.module=false
).// E.g. in EcoafRadiativeBalance, we rely on the SamsaraLightLoader module // The projects with this model will not appear in the ProjectManager ModelManager.getInstance().addTechnicalPackageName("samsaralightloader"); (... simulation in script mode ... close the project at the end ...) // The projects with this model will appear again in the ProjectManager ModelManager.getInstance().removeTechnicalPackageName("samsaralightloader"); // The samsaraLightModule can be used normally with New Project again
script.init(ip);
by calling script.setTechnicalProject (true);
. This will give the best result: even in case Capsis is shut down abnormally, the project if reloaded will not appear in the projectManager.fc-30.8.2021 ListOfConfigProperties<T>
There was a configuration problem in DataExtractors: when two instances of the same extractor class were opened at the same time, a change in the config of one (e.g. perHectare) was reported in the second after a synchronization (e.g. moving the graphs to another step).
This old non blocking bug was tricky to find, it was in AbstractDataExtractor, ExtensionManager.applySettings(this), relying on a ParamMap with @Param like tags, not managing maps, and the concerned properties were in TreeMaps.
→ added ListOfConfigProperties<T> (With T: Boolean, Integer, String, Double…), based on a list, which is handled correctly by ParamMap.
The bug is out, we can configure extractors separately without choice propagations.
Next step: propagate when user wants with a dedicated button next to each propagable property (e.g. perHectare → propagate to all opened graphs).
Also removed a bunch of old specific properties, e.g. HECTARE was replaced by a standard boolean property named perHectare, checked by the standard isSet“perHectare”) method.
fc-16.6.2021 RGModelWithRemovalOfEmptyCohortSizeClasses
In capsis.lib.regeneration, we can have cohoerts (RGCohort) with sizeclasses inside (RGCohortSizeClass).
When managing these cohorts (have a number), the number may reach 0. Previously, the empty cohortSizeClasses were kept. Sometimes, it may be better to remove them. If the model class of a module implement the RGModelWithRemovalOfEmptyCohortSizeClasses interface, the empty sizeClasses will be removed in RGCohort.understoreyGrowth ().
This is used in Heterofor by Frédéric André.
fc-6.5.2021 ListOfCategories, Category and Calculator
ListOfCategory / Category (name, value) and Calculator have been added. They can be mixed to calculate e.g. basal area per species, See Samsa2SpeciesCategories (extends ListOfCategories) and SamsaBasalAreaCalculator (calculates basalArea for a list of trees).
See how they were made available for other tools (e.g. graphs) in the Samsa2MethodProvider :
public ListOfCategories getListOfSpeciesBasalArea(GScene stand, Collection trees) public ListOfCategories getListOfLargeDiameterBasalArea(GScene stand, Collection trees) public ListOfCategories getListOfQualityBasalArea(GScene stand, Collection trees)
And their possible use from an external tool, e.g. SVMaid :
fc-30.4.2021 Log headers
A way to declare a header for a specific log were formatted data is to be written (with columns separated by e.g. tabs). The header can be declared just before the Log.println () line, it will be written only once at before the first println (logName, message)
// E.g. in PHPlant // This header will only be written once in the log Log.prepareHeader("SureauClimateHourInterpolation", "time_s\t" + PHClimateHour.toStringHeader()); Log.println("SureauClimateHourInterpolation", "" + time_s + "\t" + interpolatedClimHour.toString ());
fc-9.3.2021 Statistics with ListOfValues
A tool to centralize statistics on a list of values.
https://capsis.cirad.fr/capsis/documentation/easy_statistics_on_a_list_of_values
fc-16.2.2021 Problems in DRGraph
If a DataExtractor based on DFCurves does not provide labels for its curves (Introgression, Mediterranea), the rendering in DRGraph may not show all the curves at opening time and a zoom out action may be needed.
A fix has been added in GraphConverter to add (1), (2), etc. if the labels are 'equals' to help the autoRange feature in the vertical (range) axis of the JFreeChart XYPlot.
fc-15.12.2020 Add Plotting features to a table
See CsvFileViewer. Warning: this feature relies on cells selection and may work badly in tables where row selection is allowed, e.g. SVController)
// fc-15.12.2020 Add the plotting features on Right-click PlottingPopup.addPlottingFeaturesToTable(table, false); // fc-15.12.2020 Add the standard popup menu on the header StandardTableHeaderPopup.addPopup(table);
fc-14.12.2020 Mac OS X problems
Problems were reported when using Capsis or AMAPstudio under Mac OS X.
fc-8.12.2020 SVN checkout problems
Lisa Grell (X. Morin) has repeated problems during a checkout:
This seems to be due to timeouts related connections problems or a slow machine. Repetitive cleanup and update actions could finally solve the problem.
fc-1.12.2020 Phenofit
fc-24.11.2020 CapsisExtensionManager, clarified isExport(className) Returned true if instanceof OFormat OR isExport () found by reflection and returned true OR in case of exception during the checking returned true
Now: returns true if className is subclass of OFormat
→ an extension is an export if it implements OFormat
→ StandRecordSet is a superclass for inventory file loaders, it was implementing OFormat so all subclasses 'could also be' exports, but only some of them actually implemented the export methods. Changed StandRecordSet, it does not implement OFormat any more and changed subclasses to add OFormat only when needed.
→ Deprecated all 'isImport ()' and 'isExport ()' methods, now unused
fc+jb-18.11.2020 Changed species typologies in RReShar and capsis.lib.regeneration
RGVegetationLayer (for vegetationLayers, match classes in regeneration lib)
RGSaplings (for saplings, match classes in regeneration lib)
RRSSpecies (for trees and cohorts, RReShar level, closed typology, see RRSSpecies.getCrownBaseHeight(), can be changed)
fc-18.11.2020 Viewer3D does not like large values of coordinates When data come from GIS, the coordinates may be very large, e.g. x=850000. They must be shifted back in the sketchLinker to have a correct drawing. A possible approach is to remove stand.origin to all x and y. See Samsa2SketchLinker
fc-17.11.2020 Popup does not open on Windows isPopupTrigger () must be checked on mousePressed() and mouseReleased (), see method comment in MouseEvent.isPopupTrigger (). See PlottingPopup (jeeb-util, CsvFileViewer)
fc-16.11.2020 Ubuntu: open a given file with a given Editor Right click on the file in the file manager > Properties > Open with > e.g. sublime text
fc-16-11-2020 Excel files contain extra quotes surounding values (e.g. “0.23”) Adapt the file loader' correctLine () method to replace them by empty strings
// e.g. Samsa2Inventory protected String correctLine(String line) { // fc+bc-16.11.2020 Remove extra " written by Excel at export time line = line.replace("\"", ""); return line; }