pik-piam / magpie4 Goto Github PK
View Code? Open in Web Editor NEWR package | MAgPIE outputs R package for MAgPIE version 4.x
License: GNU Lesser General Public License v3.0
R package | MAgPIE outputs R package for MAgPIE version 4.x
License: GNU Lesser General Public License v3.0
Ideally this should be the same. For the difference between the output of FoodExpenditure()
and consumptionValue(..., type="food")
, it basically comes from usage of different approaches for calculation of prices and quantities, the former using prices per kcal and caloric intake and the latter using prices per tones DM and tDM consumption. Since prices in both case are calculated as Lagrangian multipliers, it could be that the difference in output of functions comes from a general equation system setup in magpie and related interplay between demand variables.
Hi, Thanks for developing this package.
I want to install magpie for modeling food demand in macOS, M2 chip. I already install GAMS as well as its license.
However, it cannot be loaded.
When I:
library(magpie4)
It produces:
Loading required package: gdx
Loading required package: gdxrrw
Loading required package: magclass
Error loading the GDX API from gamsSysDir=
Could not load shared library /Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib: dlopen(/Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib, 0x0002): tried: '/Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib' (ma
Environment variable R_GAMS_SYSDIR not set: no GDX API there
Error loading the GDX API via the default shared library search mechanism
Could not load shared library libgdxdclib64.dylib: dlopen(libgdxdclib64.dylib, 0x0002): tried: 'libgdxdclib64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgdxdclib64.dylib' (no such file), '/opt/homebrew/opt/llvm/lib/libgdxdclib64.dylib'
DYLD_LIBRARY_PATH is not set!
The GDX library has not been loaded
Error loading the GDX API from gamsSysDir=
Could not load shared library /Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib: dlopen(/Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib, 0x0002): tried: '/Library/Frameworks/GAMS.framework/Resources/libgdxdclib64.dylib' (ma
Environment variable R_GAMS_SYSDIR not set: no GDX API there
Error loading the GDX API via the default shared library search mechanism
Could not load shared library libgdxdclib64.dylib: dlopen(libgdxdclib64.dylib, 0x0002): tried: 'libgdxdclib64.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibgdxdclib64.dylib' (no such file), '/opt/homebrew/opt/llvm/lib/libgdxdclib64.dylib'
DYLD_LIBRARY_PATH is not set!
The GDX library has not been loaded
Here is my session information:
─ Session info ───────────────────────────────────────
setting value
version R version 4.2.1 (2022-06-23)
os macOS Ventura 13.1
system aarch64, darwin20
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Asia/Shanghai
date 2023-01-18
rstudio 2022.12.0+353 Elsbeth Geranium (desktop)
pandoc 2.18 @ /opt/homebrew/bin/pandoc
─ Packages ───────────────────────────────────────────
package * version date (UTC) lib source
abind 1.4-5 2016-07-21 [1] CRAN (R 4.2.0)
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.2.0)
backports 1.4.1 2021-12-13 [1] CRAN (R 4.2.0)
base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.2.0)
cachem 1.0.6 2021-08-19 [1] CRAN (R 4.2.0)
callr 3.7.3 2022-11-02 [1] CRAN (R 4.2.0)
cellranger 1.1.0 2016-07-27 [1] CRAN (R 4.2.0)
checkmate 2.1.0 2022-04-21 [1] CRAN (R 4.2.0)
citation 0.6.3 2022-08-18 [1] CRAN (R 4.2.0)
cli 3.5.0 2022-12-20 [1] CRAN (R 4.2.0)
cluster 2.1.4 2022-08-22 [1] CRAN (R 4.2.0)
colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.0)
countrycode 1.4.0 2022-05-04 [1] CRAN (R 4.2.0)
crayon 1.5.2 2022-09-29 [1] CRAN (R 4.2.0)
cyclocomp 1.1.0 2016-09-10 [1] CRAN (R 4.2.0)
data.table 1.14.6 2022-11-16 [1] CRAN (R 4.2.0)
DBI 1.1.3 2022-06-18 [1] CRAN (R 4.2.0)
deldir 1.0-6 2021-10-23 [1] CRAN (R 4.2.0)
desc 1.4.2 2022-09-08 [1] CRAN (R 4.2.0)
devtools 2.4.5 2022-10-11 [1] CRAN (R 4.2.0)
digest 0.6.31 2022-12-11 [1] CRAN (R 4.2.0)
dotCall64 1.0-2 2022-10-03 [1] CRAN (R 4.2.0)
dplyr 1.0.10 2022-09-01 [1] CRAN (R 4.2.0)
ellipsis 0.3.2 2021-04-29 [1] CRAN (R 4.2.0)
fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.0)
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.0)
fields 14.1 2022-08-12 [1] CRAN (R 4.2.0)
filelock 1.0.2 2018-10-05 [1] CRAN (R 4.2.0)
forcats 0.5.2 2022-08-19 [1] CRAN (R 4.2.0)
foreign 0.8-84 2022-12-06 [1] CRAN (R 4.2.0)
Formula 1.2-4 2020-10-16 [1] CRAN (R 4.2.0)
fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.0)
gdx * 1.51.5 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
gdxrrw * 1.0.10 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
generics 0.1.3 2022-07-05 [1] CRAN (R 4.2.0)
geometry 0.4.6.1 2022-07-04 [1] CRAN (R 4.2.0)
ggplot2 3.4.0 2022-11-04 [1] CRAN (R 4.2.0)
glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0)
gms 0.23.1 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
gridExtra 2.3 2017-09-09 [1] CRAN (R 4.2.0)
gtable 0.3.1 2022-09-01 [1] CRAN (R 4.2.0)
Hmisc 4.7-2 2022-11-18 [1] CRAN (R 4.2.0)
hms 1.1.2 2022-08-19 [1] CRAN (R 4.2.0)
htmlTable 2.4.1 2022-07-07 [1] CRAN (R 4.2.0)
htmltools 0.5.4 2022-12-07 [1] CRAN (R 4.2.0)
htmlwidgets 1.6.1 2023-01-07 [1] CRAN (R 4.2.1)
httpuv 1.6.7 2022-12-14 [1] CRAN (R 4.2.0)
httr 1.4.4 2022-08-17 [1] CRAN (R 4.2.0)
igraph 1.3.5 2022-09-22 [1] CRAN (R 4.2.0)
interp 1.1-3 2022-07-13 [1] CRAN (R 4.2.0)
jpeg 0.1-10 2022-11-29 [1] CRAN (R 4.2.0)
jsonlite 1.8.4 2022-12-06 [1] CRAN (R 4.2.0)
KernSmooth 2.23-20 2021-05-03 [1] CRAN (R 4.2.1)
knitr 1.41 2022-11-18 [1] CRAN (R 4.2.1)
later 1.3.0 2021-08-18 [1] CRAN (R 4.2.0)
lattice 0.20-45 2021-09-22 [1] CRAN (R 4.2.1)
latticeExtra 0.6-30 2022-07-04 [1] CRAN (R 4.2.0)
lazyeval 0.2.2 2019-03-15 [1] CRAN (R 4.2.0)
lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.0)
lintr 3.0.2 2022-10-19 [1] CRAN (R 4.2.0)
lpSolve 5.6.17 2022-10-10 [1] CRAN (R 4.2.0)
lucode2 0.43.9 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
luplot 3.54.2 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
luscale 2.26.5 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
lusweave 1.46.3 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
madrat 2.22.1 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
magclass * 6.8.0 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
magic 1.6-1 2022-11-16 [1] CRAN (R 4.2.0)
magpie4 * 1.170.2 2023-01-18 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
magpiesets 0.45.3 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
maps 3.4.1 2022-10-30 [1] CRAN (R 4.2.0)
maptools 1.1-6 2022-12-14 [1] CRAN (R 4.2.0)
Matrix 1.5-3 2022-11-11 [1] CRAN (R 4.2.0)
memoise 2.0.1 2021-11-26 [1] CRAN (R 4.2.0)
mime 0.12 2021-09-28 [1] CRAN (R 4.2.0)
miniUI 0.1.1.1 2018-05-18 [1] CRAN (R 4.2.0)
mip 0.140.1 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
mstools 0.3.0 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.0)
nnet 7.3-18 2022-09-28 [1] CRAN (R 4.2.0)
nonparaeff 0.5-13 2022-06-21 [1] CRAN (R 4.2.0)
pillar 1.8.1 2022-08-19 [1] CRAN (R 4.2.0)
pkgbuild 1.4.0 2022-11-27 [1] CRAN (R 4.2.0)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.0)
pkgload 1.3.2 2022-11-16 [1] CRAN (R 4.2.1)
plotly 4.10.1 2022-11-07 [1] CRAN (R 4.2.0)
plyr 1.8.8 2022-11-11 [1] CRAN (R 4.2.0)
png 0.1-8 2022-11-29 [1] CRAN (R 4.2.0)
prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.2.0)
processx 3.8.0 2022-10-26 [1] CRAN (R 4.2.0)
profvis 0.3.7 2020-11-02 [1] CRAN (R 4.2.0)
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.2.0)
ps 1.7.2 2022-10-26 [1] CRAN (R 4.2.0)
purrr 1.0.0 2022-12-20 [1] CRAN (R 4.2.0)
qualV 0.3-4 2021-10-07 [1] CRAN (R 4.2.0)
quitte 0.3108.2 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0)
R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0)
R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0)
R.utils 2.12.2 2022-11-11 [1] CRAN (R 4.2.0)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0)
RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.2.0)
Rcpp 1.0.9 2022-07-08 [1] CRAN (R 4.2.0)
readr 2.1.3 2022-10-01 [1] CRAN (R 4.2.0)
readxl 1.4.1 2022-08-17 [1] CRAN (R 4.2.0)
remotes 2.4.2 2021-11-30 [1] CRAN (R 4.2.0)
renv 0.16.0 2022-09-29 [1] CRAN (R 4.2.0)
reshape2 1.4.4 2020-04-09 [1] CRAN (R 4.2.0)
rex 1.2.1 2021-11-26 [1] CRAN (R 4.2.0)
rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.0)
rpart 4.1.19 2022-10-21 [1] CRAN (R 4.2.0)
rprojroot 2.0.3 2022-04-02 [1] CRAN (R 4.2.0)
rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.2.0)
rworldmap 1.3-6 2016-02-03 [1] CRAN (R 4.2.0)
scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.0)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0)
shiny 1.7.4 2022-12-15 [1] CRAN (R 4.2.0)
sp 1.5-1 2022-11-07 [1] CRAN (R 4.2.0)
spam 2.9-1 2022-08-07 [1] CRAN (R 4.2.0)
stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.0)
stringr 1.5.0 2022-12-02 [1] CRAN (R 4.2.0)
styler 1.9.0 2023-01-15 [1] CRAN (R 4.2.0)
survival 3.4-0 2022-08-09 [1] CRAN (R 4.2.0)
tibble 3.1.8 2022-07-22 [1] CRAN (R 4.2.0)
tidyr 1.2.1 2022-09-08 [1] CRAN (R 4.2.0)
tidyselect 1.2.0 2022-10-10 [1] CRAN (R 4.2.0)
trafficlight 1.13.1 2023-01-17 [1] https://rse.pik-potsdam.de/r/packages (R 4.2.1)
tzdb 0.3.0 2022-03-28 [1] CRAN (R 4.2.0)
urlchecker 1.0.1 2021-11-30 [1] CRAN (R 4.2.0)
usethis 2.1.6 2022-05-25 [1] CRAN (R 4.2.0)
utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.0)
vctrs 0.5.1 2022-11-16 [1] CRAN (R 4.2.0)
viridis 0.6.2 2021-10-13 [1] CRAN (R 4.2.0)
viridisLite 0.4.1 2022-08-22 [1] CRAN (R 4.2.0)
withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0)
writexl 1.4.2 2023-01-06 [1] CRAN (R 4.2.0)
xfun 0.36 2022-12-21 [1] CRAN (R 4.2.0)
xml2 1.3.3 2021-11-30 [1] CRAN (R 4.2.0)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.2.0)
yaml 2.3.6 2022-10-18 [1] CRAN (R 4.2.0)
zoo 1.8-11 2022-09-17 [1] CRAN (R 4.2.0)
[1] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library
Do you have any idea how to make it work?
The trade function returns a warning about inconcistencies in wood and woodfuel demand and production:
In trade(gdx, level = "regglo", type = "net-exports") : For the following categories, demand EXCEEDS production (????) (on top of balanceflow): wood, woodfuel
This needs to be fixed. Either in the trade function or in MAgPIE itself (not sure where the problem originates from)
In contrast to all other combinations of after_shock TRUE/FALSE and calibrated TRUE/FALSE, the combination after_shock=FALSE and calibrated=FALSE does not return a time series.
This is counter intuitive to me and is causing some problems with functions such as PriceElasticities.
Is that intended or is that a mistake?
beim ausführen der Funktion getReportMAgPIE2LPJmL in magpie4 bekomme ich folgenden Fehler in der subroutine .filtermagpie
Error in Ops.units(u1, u2) : operation | not allowed
die funktion ist folgende:
.tmp <- function(mstat,filter) {
tmp <- FALSE
for(f in filter) {
tmp <- tmp | (mstat==f)
}
return(tmp)
}
ich verstehen auch nciht was das hier tmp | (mstat==f) zurückliefern soll.
tmp
[1] FALSE
filter
[1] 2 7
mstat
An object of class "magpie"
, , = main
t
y1995 y2000 y2005 y2010 y2015 y2020 y2025 y2030 y2035 y2040 y2045 y2050 y2055 y2060 y2070 y2080 y2090 y2100
GLO 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
ich glaube das geht nur mit einem modelstat, kann das sein?
It would be great to have some indicators for
a) feeding efficiency/productivity in terms of DM, GE and N
b) concentrate share in terms of Isabelles main categories
c) yields of product/animal
in both results and validation
If you want, you can also supervise a student helper doing this.
magpie4 seems to have disappeared from installed packages on cluster.
An R session on clutser provides this error
library(magpie4)
Error in library(magpie4) : there is no package called 'magpie4'
Checking for version magpie4
on cluster provides the following message
Package: magpie4
Installed version: <not installed>
Last updated: <never>
Availability in repositories:
<not available> | https://cran.rstudio.com/
1.66.0 | http://www.pik-potsdam.de/rd3mod/R/
1.65.0 | https://rse.pik-potsdam.de/r/packages/
Trying to make two sets to check CONOPT4 settings and it is not possible at the moment to make these tests on cluster without this package availability.
reportSDG12 returns the following warning:
45: In reportSDG12(gdx) : better backcaclulation of footprint would be nice!
If this is critical it needs to be fixed, if not, the warning needs to be removed or converted to a note, as it otherwise distracts from critical warnings which need to be seen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.