GithubHelp home page GithubHelp logo

r-and-gama / gamar Goto Github PK

View Code? Open in Web Editor NEW
13.0 8.0 3.0 32.9 MB

An R interface to the GAMA platform (https://gama-platform.github.io)

Home Page: https://r-and-gama.github.io/gamar

License: Other

R 87.89% GAML 12.11%
r gama-platform agent-based-simulation agent-based-model gama

gamar's People

Contributors

choisy avatar luciecontamin avatar meta00 avatar roiarthurb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gamar's Issues

Update documentation

Need to update the documentation to the new interface of rama.
Also, we need to add:

  • in README, run_experiment and load_experiment: a message saying that we advice the user to test their models on GAMA before using it in rama.
  • in the README, we need to improve the documentation on the setup of gama
and follow instructions. Otherwise, you can use your own version GAMA engine

setup_gama("path/to/gama")

tutorials

At least one model to be selected (from Toy Models and Tutorials of Gama) and to be showed case in rama, preferably done before July. Please generate the tutorial and update the website.

Failed to install `GAMA` on Windows10

When I tried to install GAMA with the function setup_gama(), I had an error:

Error in defpath(gama_path) : Gama configuration failed!
In addition: Warning message:
In untar(distrib_file, exdir = path_test, compressed = "gzip") : 
     'tar.exe -zxf "C:/Users/Lucie/Documents/workspace/temp/downloaded_gama.tgz" -c "C:/Program Files/"' returned error code 1 

and when I try on the command line I got as error:

tar.exe: Truncated input file (needed 11207680 bytes, only 0 available)
tar.exe: Error exit delayed from previous error

Improve test coverage

Currently, we have a test coverage of:

rama Coverage: 41.75%
R/tidyverse.R: 10.04%
R/base.R: 13.70%
R/utils.R: 33.63%
R/create_output_dir.R: 53.85%
R/map_experiment.R: 56.25%
R/output_dir.R: 57.14%
R/plot_params.R: 60.71%
R/fill_experiment.R: 66.67%
R/name.R: 66.67%
R/obs_rates.R: 66.67%
R/parameters.R: 66.67%
R/zzz.R: 71.62%
R/model.R: 72.22%
R/experiment.R: 74.60%
R/repl.R: 75.00%
R/is.experiment.R: 77.78%
R/show_experiment.R: 84.21%
R/as_experiment.R: 85.71%
R/call_gama.R: 90.00%
R/load_experiment.R: 92.11%
R/run_experiment.R: 95.92%
R/save_to_gama.R: 96.61%
R/fullfact.R: 100.00%
R/get_names.R: 100.00%

add codecov badge

setup codecov so that it show in badge but not run in CI for every commit

Add a glossary in the documentation

To make it easier to understand the terminology between rama and gama, we should add a text or a table explaining the link between the specific terms.

Bad setup_gama path directory

Hi !

Bug

I tried to install gamar on R-Studio and the initialisation failed.. I'm using Ubuntu 18.04 LTS and the gamar's function setup_gama isn't working properly :

> setup_gama("/home/gama/.local/bin/GAMA1.8.0")
Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") :
  cannot open file '/home/gama/.local/bin/GAMA1.8.0/Contents/Eclipse/Configuration/config.ini': No such file or directory

The problem is that the auto-path used to find the config.ini file is that MacOS path and not the linux one, the correct path on Linux is /home/gama/.local/bin/GAMA1.8.0/configuration/config.ini

Desktop (please complete the following information):

  • OS: Ubuntu 18.04 LTS
  • GAMAR version: git autoinstall
  • GAMA version: 1.8.0

Workaround
A quick solution is to create a symlink to the correct location :

$ cd /path/to/gama
$ # Create folders for path
$ mkdir -p ./Contents/Eclipse/Configuration
$ # Create symlink
$ ln -s /full/path/to/gama/configuration/config.ini ./Contents/Eclipse/Configuration/config.ini

Incomplete tutorial

Hi,
I know that my case is very particular, but if someone try to follow your tutorial after a raw install of R-Studio on ubuntu, you tutorial isn't complete...

To install devtools, the ubuntu needs to install some lib :

sudo apt update
sudo apt install -y libcurl4-openssl-dev libxml2-dev 

And for gamar it needs :

sudo apt install -y libmagick++-dev

update vignettes

Update the examples in vignettes with models which works with the latest Gama.

inconsistent behaviors of model() and `model<-`()

Let's say we have an object exp of class Experiment
model(exp) returns a list containing all info in the exp
At the moment, model(exp) <- path_to_gaml_file works.

However, when we try to modify the name of a parameter with

exp model info like model(exp)$info$Parameters[[1]][1] <- "abc" it returns an errors because model<-() expect a string (path) not a list. This way, we can never modify the model info. Should add a message to "model can only be altered by reading in a new gaml"?

[WEBSITE] Front page is not in correct HTTPS

Hello,

On the front page of you documentation website you have an HTTPS issue: every element on your page is not requested with HTTPS.
Screenshot_2019-08-12_16-00-51

To fix that, you simply have to change the link from CRAN badge from http://www.r-pkg.org/badges/version/gamar to httpS://www.r-pkg.org/badges/version/gamar 😄

Add note about validate gaml file before using rama

An erroneous gaml file can't be used in run_experiment, load_expriment, and the constructors. The current message is "Gama fails to read your experiment". To be more informative, shall we add a message, e.g. the gaml file needs validating in Gama before using rama, in the help of those functions and in the README?

Call to gama are not working on Windows

After downloading, installing and using defpath to link GAMA and rama on Windows, I try to run the code:

gaml_file <- system.file("models", "sir.gaml", package = "rama")
exp1 <- load_experiment("sir", gaml_file)

and I obtain the error:

Error in file(con, "r") : cannot open the connection
In addition: Warning message:
In file(con, "r") : 
    cannot open file `C:\Users\TEMPFILE.stdout` : No such file or directory

It might be an error coming from the function system2 which returns an error 127.

headless stdout and stderr

To discuss with @gnoubi

Currently in the latest gama, warnings are output in stderr and error log messages are output in stdout. Since in a previous version of Gama, the stdout is used to output "loading gama messages"... It is a not straightforward for us to check if there is an error.

Is it possible to change headless so that stderr outputs the error log "workspace/.metadata/.log" and stdout for all other messages.

Failed to install gamar on my mac

Hi I use macOSX Monterey and am running GAMA and R on my MacBookPro Apple M1 Pro. The package sadly didn't work on my machine. If so, can you check on my session info to see what is missing?

> devtools::install_github("r-and-gama/gamar")
Downloading GitHub repo r-and-gama/gamar@HEAD
✔  checking for file ‘/private/var/folders/38/r5yy537n2wv93s2kvtrf0nhr0000gn/T/RtmpuhieSM/remotes2d7550db661/r-and-gama-gamar-3e9dd2b/DESCRIPTION’ ...
─  preparing ‘gamar’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
   Omitted ‘LazyData’ from DESCRIPTION
─  building ‘gamar_0.1.0.tar.gz’
   
* installing *source* package ‘gamar’ ...
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
Warning in gama_version(pehaps_path) : NAs introduced by coercion
Error: package or namespace load failed for ‘gamar’:
 .onAttach failed in attachNamespace() for 'gamar', details:
  call: if (version < 1.8) {
  error: missing value where TRUE/FALSE needed
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/gamar’
Warning message:
In i.p(...) :
  installation of package ‘/var/folders/38/r5yy537n2wv93s2kvtrf0nhr0000gn/T//RtmpuhieSM/file2d77740c5e6/gamar_0.1.0.tar.gz’ had non-zero exit status

Comparing speeds of (1) GAMA GUI, (2) GAMA headless and (3) R/rama

I hear many of you complaining by the fact that R/rama is incredibly slow compared to GAMA GUI. Can somebody do some benchmarking here so that we have some numbers to compare: GAMA GUI, GAMA headless, and R rama. Is it possible to time the time it takes just for launching GAMA in the headless? I guess it should roughly be the time in headless of a simple model with few agents and just 1 time step right? Anyway, having numbers to compare here would be useful to see where the problem might be.

Modify script to build the website

As the package is named gamar, we don't need to keep to website generator script that was removing the Bioconductor link. However, the script also contains code to remove unwanted output folders generated by the examples...
The script should be updated to all the examples and remove all the unwanted output folder generated (for example predator-prey) and should also be renamed into cleaning_output_website.

RNetlogo / NLstart doesn't do anything

I am using the following code:

my.netlogo1 <- "my.netlogo1"
nl.path <- "C:/Program Files/NetLogo 6.1.1/app"
NLStart(nl.path, gui = FALSE,
nl.obj = my.netlogo1, nl.jarname='netlogo-6.1.1.jar')

I get the follo<ing error message:

java.lang.NoClassDefFoundError: org/nlogo/workspace/Controllable
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:416)
Caused by: java.lang.ClassNotFoundException
at RJavaClassLoader.findClass(RJavaClassLoader.java:383)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 2 more

I read it was because of an issue with using Netlogo6 with the package RNetlogo, but I thought that had already been solved by the programmer, could you tell me what I'm doing wrong?

Headless version

For the model with a display, we need to use the last version of the headless.
We realise that by doing getOption("rama.startjar") we obtain /Applications/Gama.app/Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.5.200.v20180922-1751.jar with the 1.8 official release and "/Applications/Gama.app//Contents/Eclipse/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar" with the 1.8 RC2.
What the name of the file mean? and can we use that for testing the version of the headless necessary for experiment with a display?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.