Skip to content

Commit

Permalink
update unit tests, extend MESSAGE-scheme flexibility_factor indices (
Browse files Browse the repository at this point in the history
…#7)

- refactors the unit tests and test-database to separate MESSAGEix-GAMS-specific tests from general tests and MESSAGE-Java-specific features. The Austria tutorial will be migrated to the the message_ix repository.

 - includes a new ixmp.jar file, fixing a bug with the Platform.getUnitList() function.

 -  switches from Java.ext.dirs to adding the library jar files to the classpath explicitly    using ext.dir may cause problems when multiple Python packages use jpype.

 - changes the index sets of the MESSAGE-scheme flexibility_factor parameter, and renames an index set to rating bin for a more comprehensive implementation of the Sullivan renewables formulation.
  • Loading branch information
danielhuppmann authored and gidden committed Jan 31, 2018
1 parent 3258554 commit afab623
Show file tree
Hide file tree
Showing 10 changed files with 971 additions and 803 deletions.
9 changes: 5 additions & 4 deletions ixmp/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def start_jvm():
# must add dir and jarfile to support finding ixmp.properties
module_root = os.path.dirname(__file__)
jarfile = os.path.join(module_root, 'ixmp.jar')
lib_dir = os.path.join(module_root, 'lib')
ix_classpath = os.pathsep.join([jarfile, module_root])
ext_dir_arg = "-Djava.ext.dirs=%s" % lib_dir
jvm_args = ["-Djava.class.path=%s" % ix_classpath, "-Xmx4G", ext_dir_arg]
module_lib = os.path.join(module_root, 'lib')
module_jars = [os.path.join(module_lib, f) for f in os.listdir(module_lib)]
sep = ';' if os.name == 'nt' else ':'
ix_classpath = sep.join([module_root, jarfile] + module_jars)
jvm_args = ["-Djava.class.path=" + ix_classpath, "-Xmx4G"]
jpype.startJVM(jpype.getDefaultJVMPath(), *jvm_args)

# define auxiliary references to Java classes
Expand Down
2 changes: 2 additions & 0 deletions ixmp/db/migration/oracle/V1.1__drop_schema_config.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- drop the table schema_config - we use flyway now instead
drop table schema_config;
Loading

0 comments on commit afab623

Please sign in to comment.