target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test(dependsOnMethods = "testOpendir") public void testReaddir() { System.out.println("SIZEOF: " + dirent.SIZE_OF); dirent dirstruct, result; for (int i = 0; i < 15; i++) { dirstruct = new dirent(); long next = dirent.malloc(dirent.SIZE_OF); System.out.println("NEXT: " + next); int read = glfs_readdir_r(dir, dirstruct...
@JniMethod public static final native int glfs_readdir_r( @JniArg(cast = "glfs_fd_t *") long fd, @JniArg(flags = NO_IN) dirent dirent, @JniArg(cast = "struct dirent **") long result );
GLFS { @JniMethod public static final native int glfs_readdir_r( @JniArg(cast = "glfs_fd_t *") long fd, @JniArg(flags = NO_IN) dirent dirent, @JniArg(cast = "struct dirent **") long result ); }
GLFS { @JniMethod public static final native int glfs_readdir_r( @JniArg(cast = "glfs_fd_t *") long fd, @JniArg(flags = NO_IN) dirent dirent, @JniArg(cast = "struct dirent **") long result ); }
GLFS { @JniMethod public static final native int glfs_readdir_r( @JniArg(cast = "glfs_fd_t *") long fd, @JniArg(flags = NO_IN) dirent dirent, @JniArg(cast = "struct dirent **") long result ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname )...
GLFS { @JniMethod public static final native int glfs_readdir_r( @JniArg(cast = "glfs_fd_t *") long fd, @JniArg(flags = NO_IN) dirent dirent, @JniArg(cast = "struct dirent **") long result ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname )...
@Test(dependsOnMethods = "testReaddir") public void testTelldir() { dirpos = glfs_telldir(dir); System.out.println("TELLDIR: " + dirpos); assertTrue(dirpos > 0); }
@JniMethod public static final native long glfs_telldir( @JniArg(cast = "glfs_fd_t *") long fd );
GLFS { @JniMethod public static final native long glfs_telldir( @JniArg(cast = "glfs_fd_t *") long fd ); }
GLFS { @JniMethod public static final native long glfs_telldir( @JniArg(cast = "glfs_fd_t *") long fd ); }
GLFS { @JniMethod public static final native long glfs_telldir( @JniArg(cast = "glfs_fd_t *") long fd ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast ...
GLFS { @JniMethod public static final native long glfs_telldir( @JniArg(cast = "glfs_fd_t *") long fd ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast ...
@Test(dependsOnMethods = "testTelldir") public void testSeekdir() { glfs_seekdir(dir, 1l); }
@JniMethod public static final native void glfs_seekdir( @JniArg(cast = "glfs_fd_t *") long fd, long offset );
GLFS { @JniMethod public static final native void glfs_seekdir( @JniArg(cast = "glfs_fd_t *") long fd, long offset ); }
GLFS { @JniMethod public static final native void glfs_seekdir( @JniArg(cast = "glfs_fd_t *") long fd, long offset ); }
GLFS { @JniMethod public static final native void glfs_seekdir( @JniArg(cast = "glfs_fd_t *") long fd, long offset ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( ...
GLFS { @JniMethod public static final native void glfs_seekdir( @JniArg(cast = "glfs_fd_t *") long fd, long offset ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( ...
@Test(dependsOnMethods = "testSeekdir") public void testClosedir() { long close = glfs_closedir(dir); System.out.println("CLOSEDIR: " + close); assertEquals(0, close); }
@JniMethod public static final native int glfs_closedir( @JniArg(cast = "glfs_fd_t *") long fd );
GLFS { @JniMethod public static final native int glfs_closedir( @JniArg(cast = "glfs_fd_t *") long fd ); }
GLFS { @JniMethod public static final native int glfs_closedir( @JniArg(cast = "glfs_fd_t *") long fd ); }
GLFS { @JniMethod public static final native int glfs_closedir( @JniArg(cast = "glfs_fd_t *") long fd ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast ...
GLFS { @JniMethod public static final native int glfs_closedir( @JniArg(cast = "glfs_fd_t *") long fd ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast ...
@Test(dependsOnMethods = "testClosedir") public void testRename() { int rename = glfs_rename(vol, FILE_PATH, FILE_PATH_RENAMED); System.out.println("RENAME: " + rename); assertEquals(0, rename); }
@JniMethod public static final native int glfs_rename( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String oldpath, @JniArg(cast = "const char *") String newpath );
GLFS { @JniMethod public static final native int glfs_rename( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String oldpath, @JniArg(cast = "const char *") String newpath ); }
GLFS { @JniMethod public static final native int glfs_rename( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String oldpath, @JniArg(cast = "const char *") String newpath ); }
GLFS { @JniMethod public static final native int glfs_rename( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String oldpath, @JniArg(cast = "const char *") String newpath ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ...
GLFS { @JniMethod public static final native int glfs_rename( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String oldpath, @JniArg(cast = "const char *") String newpath ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ...
@Test(dependsOnMethods = "testRename") public void testRmdir_NotEmpty() { int ret = glfs_rmdir(vol, DIR_PATH); System.out.println("REMOVE STATUS: " + ret); int errno = UtilJNI.errno(); System.out.println("ERRNO: " + errno); String strerror = UtilJNI.strerror(); System.out.println("STRERROR: " + strerror); assertEquals(...
@JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path );
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
@Test public void testReadWrite() { GlusterOpenOption openOption = GlusterOpenOption.READWRITE(); openOption.append().create().createNew().dsync().sync().truncate(); assertEquals(rdwr | all, openOption.getValue()); }
public static GlusterOpenOption READWRITE() { GlusterOpenOption o = new GlusterOpenOption(); o.value = O_RDWR; o.options.add("readwrite"); return o; }
GlusterOpenOption { public static GlusterOpenOption READWRITE() { GlusterOpenOption o = new GlusterOpenOption(); o.value = O_RDWR; o.options.add("readwrite"); return o; } }
GlusterOpenOption { public static GlusterOpenOption READWRITE() { GlusterOpenOption o = new GlusterOpenOption(); o.value = O_RDWR; o.options.add("readwrite"); return o; } }
GlusterOpenOption { public static GlusterOpenOption READWRITE() { GlusterOpenOption o = new GlusterOpenOption(); o.value = O_RDWR; o.options.add("readwrite"); return o; } static GlusterOpenOption READ(); static GlusterOpenOption WRITE(); static GlusterOpenOption READWRITE(); GlusterOpenOption create(); GlusterOpenOpti...
GlusterOpenOption { public static GlusterOpenOption READWRITE() { GlusterOpenOption o = new GlusterOpenOption(); o.value = O_RDWR; o.options.add("readwrite"); return o; } static GlusterOpenOption READ(); static GlusterOpenOption WRITE(); static GlusterOpenOption READWRITE(); GlusterOpenOption create(); GlusterOpenOpti...
@Test(dependsOnMethods = "testRmdir_NotEmpty") public void testUnlink() { int unl = glfs_unlink(vol, FILE_PATH_RENAMED); System.out.println("UNLINK: " + unl); assertEquals(0, unl); unl = glfs_unlink(vol, SYMLINK); System.out.println("UNLINK SYMLINK: " + unl); assertEquals(0, unl); }
@JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path);
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); }
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); }
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
@Test(dependsOnMethods = "testUnlink") public void testUnlink_NonExisting() { int unl = glfs_unlink(vol, "/3q9g48hnaovcw802j039f"); System.out.println("UNLINK NX: " + unl); int errno = UtilJNI.errno(); System.out.println("ERRNO: " + errno); String strerror = UtilJNI.strerror(); System.out.println("STRERROR: " + strerro...
@JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path);
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); }
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); }
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
GLFS { @JniMethod public static final native int glfs_unlink( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
@Test(dependsOnMethods = "testUnlink_NonExisting") public void testRmdir() { int ret = glfs_rmdir(vol, DIR_PATH); System.out.println("REMOVE STATUS: " + ret); assertEquals(0, ret); }
@JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path );
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
@Test(dependsOnMethods = "testRmdir") public void testRmdir_NonExisting() { int ret = glfs_rmdir(vol, DIR_PATH); System.out.println("REMOVE STATUS: " + ret); int errno = UtilJNI.errno(); System.out.println("ERRNO: " + errno); String strerror = UtilJNI.strerror(); System.out.println("STRERROR: " + strerror); assertEqual...
@JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path );
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); }
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
GLFS { @JniMethod public static final native int glfs_rmdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_vol...
@Test(dependsOnMethods = "testRmdir_NonExisting") public void testFini() { int fini = glfs_fini(vol); System.out.println("FINI: " + fini); assertEquals(0, fini); }
@JniMethod public static final native int glfs_fini( @JniArg(cast = "glfs_t *") long fs );
GLFS { @JniMethod public static final native int glfs_fini( @JniArg(cast = "glfs_t *") long fs ); }
GLFS { @JniMethod public static final native int glfs_fini( @JniArg(cast = "glfs_t *") long fs ); }
GLFS { @JniMethod public static final native int glfs_fini( @JniArg(cast = "glfs_t *") long fs ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast = "glfs...
GLFS { @JniMethod public static final native int glfs_fini( @JniArg(cast = "glfs_t *") long fs ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast = "glfs...
@Test public void testNew() throws IOException { String volname = getProperties().getProperty("glusterfs.volume"); vol = glfs_new(volname); System.out.println("NEW: " + vol); assertTrue(0 < vol); }
@JniMethod(cast = "glfs_t *") public static final native long glfs_new( @JniArg(cast = "const char*") String volname );
GLFS { @JniMethod(cast = "glfs_t *") public static final native long glfs_new( @JniArg(cast = "const char*") String volname ); }
GLFS { @JniMethod(cast = "glfs_t *") public static final native long glfs_new( @JniArg(cast = "const char*") String volname ); }
GLFS { @JniMethod(cast = "glfs_t *") public static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( ...
GLFS { @JniMethod(cast = "glfs_t *") public static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( ...
@Test(dependsOnMethods = "testNew") public void testSetlog() throws IOException { String logfile = getProperties().getProperty("client.logfile"); int setlog = glfs_set_logging(vol, logfile, 20); System.out.println("SETLOG: " + setlog); assertEquals(0, setlog); }
@JniMethod public static final native int glfs_set_logging( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String logfile, int loglevel);
GLFS { @JniMethod public static final native int glfs_set_logging( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String logfile, int loglevel); }
GLFS { @JniMethod public static final native int glfs_set_logging( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String logfile, int loglevel); }
GLFS { @JniMethod public static final native int glfs_set_logging( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String logfile, int loglevel); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final na...
GLFS { @JniMethod public static final native int glfs_set_logging( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String logfile, int loglevel); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final na...
@Test(dependsOnMethods = "testSetlog") public void testServer() throws IOException { String address = getProperties().getProperty("glusterfs.server"); int server = glfs_set_volfile_server(vol, "tcp", address, 24007); System.out.println("SERVER: " + server); assertEquals(0, server); }
@JniMethod public static final native int glfs_set_volfile_server( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String transport, @JniArg(cast = "const char*") String host, int port );
GLFS { @JniMethod public static final native int glfs_set_volfile_server( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String transport, @JniArg(cast = "const char*") String host, int port ); }
GLFS { @JniMethod public static final native int glfs_set_volfile_server( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String transport, @JniArg(cast = "const char*") String host, int port ); }
GLFS { @JniMethod public static final native int glfs_set_volfile_server( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String transport, @JniArg(cast = "const char*") String host, int port ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*")...
GLFS { @JniMethod public static final native int glfs_set_volfile_server( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String transport, @JniArg(cast = "const char*") String host, int port ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*")...
@Test(dependsOnMethods = "testServer") public void testInit() { int init = glfs_init(vol); System.out.println("INIT: " + init); assertEquals(0, init); }
@JniMethod public static final native int glfs_init( @JniArg(cast = "glfs_t *") long fs );
GLFS { @JniMethod public static final native int glfs_init( @JniArg(cast = "glfs_t *") long fs ); }
GLFS { @JniMethod public static final native int glfs_init( @JniArg(cast = "glfs_t *") long fs ); }
GLFS { @JniMethod public static final native int glfs_init( @JniArg(cast = "glfs_t *") long fs ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast = "glfs...
GLFS { @JniMethod public static final native int glfs_init( @JniArg(cast = "glfs_t *") long fs ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int glfs_set_volfile_server( @JniArg(cast = "glfs...
@Test(dependsOnMethods = "testInit") public void testMkdir() { int ret = glfs_mkdir(vol, DIR_PATH, 0777); System.out.println("CREATE STATUS: " + ret); assertEquals(0, ret); }
@JniMethod public static final native int glfs_mkdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path, int mode );
GLFS { @JniMethod public static final native int glfs_mkdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path, int mode ); }
GLFS { @JniMethod public static final native int glfs_mkdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path, int mode ); }
GLFS { @JniMethod public static final native int glfs_mkdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path, int mode ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int gl...
GLFS { @JniMethod public static final native int glfs_mkdir( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char *") String path, int mode ); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod static final native int gl...
@Test(dependsOnMethods = "testMkdir") public void testOpen_nonExisting() { file = glfs_open(vol, FILE_PATH, 0); System.out.println("OPEN: " + file); int errno = UtilJNI.errno(); System.out.println("ERRNO: " + errno); String strerror = UtilJNI.strerror(); System.out.println("STRERROR: " + strerror); assertEquals(0, file...
@JniMethod(cast = "glfs_fd_t *") public static final native long glfs_open( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags);
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_open( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags); }
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_open( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags); }
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_open( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod stati...
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_open( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniMethod stati...
@Test(dependsOnMethods = "testOpen_nonExisting") public void testCreate() { int flags = GlusterOpenOption.READWRITE().createNew().getValue(); System.out.println("OPENEx flags: " + Integer.toOctalString(flags)); file = glfs_creat(vol, FILE_PATH, flags, 0666); System.out.println("CREAT: " + file); assertTrue(file > 0); }
@JniMethod(cast = "glfs_fd_t *") public static final native long glfs_creat( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags, int mode);
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_creat( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags, int mode); }
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_creat( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags, int mode); }
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_creat( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags, int mode); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniM...
GLFS { @JniMethod(cast = "glfs_fd_t *") public static final native long glfs_creat( @JniArg(cast = "glfs_t *") long fs, @JniArg(cast = "const char*") String path, int flags, int mode); @JniMethod(cast = "glfs_t *") static final native long glfs_new( @JniArg(cast = "const char*") String volname ); @JniM...
@Test public void testRecycle () { uut.add("test1"); uut.add("test2"); uut.add(42); uut.add(43); uut.add(44); List<?> result = uut.getData(); assertEquals(5, result.size(), "five"); uut.recycle(); result = uut.getData(); assertEquals(0, result.size(), "zero"); }
@Override public void recycle () { data.clear(); classMap.clear(); }
BootstrapDataRepo implements DomainRepo { @Override public void recycle () { data.clear(); classMap.clear(); } }
BootstrapDataRepo implements DomainRepo { @Override public void recycle () { data.clear(); classMap.clear(); } BootstrapDataRepo(); }
BootstrapDataRepo implements DomainRepo { @Override public void recycle () { data.clear(); classMap.clear(); } BootstrapDataRepo(); void add(Object item); void add(List<Object> items); List<Object> getData(); List<Object> getData(Class<?> type); Competition getBootstrapCompetition(); Properties getBootState(); @Overrid...
BootstrapDataRepo implements DomainRepo { @Override public void recycle () { data.clear(); classMap.clear(); } BootstrapDataRepo(); void add(Object item); void add(List<Object> items); List<Object> getData(); List<Object> getData(Class<?> type); Competition getBootstrapCompetition(); Properties getBootState(); @Overrid...
@Test public void regulationCapacityRegRate () { TariffSpecification specRR = new TariffSpecification(broker, PowerType.THERMAL_STORAGE_CONSUMPTION) .withExpiration(baseTime.plus(TimeService.DAY * 10)) .withMinDuration(TimeService.DAY * 5) .addRate(new Rate().withValue(-0.11)) .addRate(new RegulationRate().withUpRegula...
@Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffId() + " for balancing order"); return new RegulationAccumulator(0.0, 0.0); } RegulationAccumulator result ...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
@Test public void testActivate () { TariffSubscription sub1 = tariffSubscriptionRepo.getSubscription(customer1, tariff); sub1.subscribe(100); TariffSubscription sub2 = tariffSubscriptionRepo.getSubscription(customer2, tariff); sub2.subscribe(200); EconomicControlEvent ece0 = new EconomicControlEvent(spec, 0.20, 0); Eco...
@Override public void activate (Instant time, int phaseNumber) { log.info("CapacityControlService.activate() phase {}", phaseNumber); int tsIndex = timeslotRepo.currentTimeslot().getSerialNumber(); List<EconomicControlEvent> controls = getControlsForTimeslot(tsIndex - 1); if (null != controls) { for (EconomicControlEve...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void activate (Instant time, int phaseNumber) { log.info("CapacityControlService.activate() phase {}", phaseNumber); int tsIndex = timeslotRepo.currentTimeslot().getSerialNumber(); List<EconomicCon...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void activate (Instant time, int phaseNumber) { log.info("CapacityControlService.activate() phase {}", phaseNumber); int tsIndex = timeslotRepo.currentTimeslot().getSerialNumber(); List<EconomicCon...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void activate (Instant time, int phaseNumber) { log.info("CapacityControlService.activate() phase {}", phaseNumber); int tsIndex = timeslotRepo.currentTimeslot().getSerialNumber(); List<EconomicCon...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void activate (Instant time, int phaseNumber) { log.info("CapacityControlService.activate() phase {}", phaseNumber); int tsIndex = timeslotRepo.currentTimeslot().getSerialNumber(); List<EconomicCon...
@Test public void testCreate () { Battery battery = new Battery("test"); assertNotNull(battery, "constructed"); assertEquals(50.0, battery.getCapacityKWh(), 1e-6, "correct capacity"); }
public double getCapacityKWh () { return capacityKWh; }
Battery extends AbstractCustomer implements CustomerModelAccessor { public double getCapacityKWh () { return capacityKWh; } }
Battery extends AbstractCustomer implements CustomerModelAccessor { public double getCapacityKWh () { return capacityKWh; } Battery(); Battery(String name); }
Battery extends AbstractCustomer implements CustomerModelAccessor { public double getCapacityKWh () { return capacityKWh; } Battery(); Battery(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); @Co...
Battery extends AbstractCustomer implements CustomerModelAccessor { public double getCapacityKWh () { return capacityKWh; } Battery(); Battery(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); @Co...
@Test public void testLiftTruck () { LiftTruck truck = new LiftTruck("Test"); assertNotNull(truck, "constructed"); assertEquals(8, truck.getNChargers(), "1 trucks 2nd shift"); }
public LiftTruck () { super(); }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { public LiftTruck () { super(); } }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { public LiftTruck () { super(); } LiftTruck(); LiftTruck(String name); }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { public LiftTruck () { super(); } LiftTruck(); LiftTruck(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); @ConfigurableValue(v...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { public LiftTruck () { super(); } LiftTruck(); LiftTruck(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); @ConfigurableValue(v...
@Test public void BogusShiftConfig () { TreeMap<String, String> map = new TreeMap<String, String>(); map.put("customer.model.liftTruck.instances", "test1, test2, test3"); map.put("customer.model.liftTruck.test1.shiftData", "shift,8,10,8"); map.put("customer.model.liftTruck.test3.shiftData", "block,1,2,3,4,5"); map.put(...
Shift[] getShiftSchedule() { return shiftSchedule; }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { Shift[] getShiftSchedule() { return shiftSchedule; } }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { Shift[] getShiftSchedule() { return shiftSchedule; } LiftTruck(); LiftTruck(String name); }
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { Shift[] getShiftSchedule() { return shiftSchedule; } LiftTruck(); LiftTruck(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); ...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { Shift[] getShiftSchedule() { return shiftSchedule; } LiftTruck(); LiftTruck(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override String getName(); @Override void setName(String name); ...
@Test public void testValidateBatteries () { TreeMap<String, String> map = new TreeMap<String, String>(); map.put("customer.model.liftTruck.instances", "short,long"); map.put("customer.model.liftTruck.short.shiftData", "block,1,2,3,4,5, shift,6,8,8, shift,14,8,6, shift,22,8,4," + "block,6,7, shift,6,8,3, shift,14,8,2")...
void validateBatteries () { int minBatteries = 0; Shift s1 = null; Shift s2 = null; for (int i = 0; i < shiftSchedule.length; i++) { Shift s = shiftSchedule[i]; if (null == s) { s1 = s2; } else if (s2 != s) { s1 = s2; s2 = s; if (null != s1) { int n1 = s1.getTrucks(); int d1 = s1.getDuration(); int n2 = s2.getTrucks();...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { void validateBatteries () { int minBatteries = 0; Shift s1 = null; Shift s2 = null; for (int i = 0; i < shiftSchedule.length; i++) { Shift s = shiftSchedule[i]; if (null == s) { s1 = s2; } else if (s2 != s) { s1 = s2; s2 = s; if (null != s1) { int n1...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { void validateBatteries () { int minBatteries = 0; Shift s1 = null; Shift s2 = null; for (int i = 0; i < shiftSchedule.length; i++) { Shift s = shiftSchedule[i]; if (null == s) { s1 = s2; } else if (s2 != s) { s1 = s2; s2 = s; if (null != s1) { int n1...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { void validateBatteries () { int minBatteries = 0; Shift s1 = null; Shift s2 = null; for (int i = 0; i < shiftSchedule.length; i++) { Shift s = shiftSchedule[i]; if (null == s) { s1 = s2; } else if (s2 != s) { s1 = s2; s2 = s; if (null != s1) { int n1...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { void validateBatteries () { int minBatteries = 0; Shift s1 = null; Shift s2 = null; for (int i = 0; i < shiftSchedule.length; i++) { Shift s = shiftSchedule[i]; if (null == s) { s1 = s2; } else if (s2 != s) { s1 = s2; s2 = s; if (null != s1) { int n1...
@Test public void testInitialize () { LiftTruck truck = new LiftTruck("Test"); for (Shift s : truck.getShiftSchedule()) { if (null != s) fail("shift schedule should be empty"); } truck.setServiceAccessor(serviceAccessor); truck.initialize(); Shift[] shifts = truck.getShiftSchedule(); for (Shift s : shifts) { if (null !...
@Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); double interruptible = Math.min(nChargers * maxChargeKW, nBatteries * maxChargeKW / 3.0); info.withPowerType(powerType) .withCustome...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); double interruptible = Math.min(nChargers * maxChargeKW, nBatt...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); double interruptible = Math.min(nChargers * maxChargeKW, nBatt...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); double interruptible = Math.min(nChargers * maxChargeKW, nBatt...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); double interruptible = Math.min(nChargers * maxChargeKW, nBatt...
@Test public void testStep () { }
@Override public void step () { Shift newShift = shiftSchedule[indexOfShift(getNowInstant())]; if (newShift != currentShift) { log.info(getName() + " start of shift"); double totalEnergy = getEnergyCharging() + getEnergyInUse(); setEnergyCharging(getEnergyCharging() + getEnergyInUse()); setCapacityInUse(0.0); setEnergy...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { Shift newShift = shiftSchedule[indexOfShift(getNowInstant())]; if (newShift != currentShift) { log.info(getName() + " start of shift"); double totalEnergy = getEnergyCharging() + getEnergyInUse(); setEnergyCharging(get...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { Shift newShift = shiftSchedule[indexOfShift(getNowInstant())]; if (newShift != currentShift) { log.info(getName() + " start of shift"); double totalEnergy = getEnergyCharging() + getEnergyInUse(); setEnergyCharging(get...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { Shift newShift = shiftSchedule[indexOfShift(getNowInstant())]; if (newShift != currentShift) { log.info(getName() + " start of shift"); double totalEnergy = getEnergyCharging() + getEnergyInUse(); setEnergyCharging(get...
LiftTruck extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { Shift newShift = shiftSchedule[indexOfShift(getNowInstant())]; if (newShift != currentShift) { log.info(getName() + " start of shift"); double totalEnergy = getEnergyCharging() + getEnergyInUse(); setEnergyCharging(get...
@Test public void testInitialize () { assertEquals(uut.getName(), "test", "correct name"); when(seed.nextDouble()).thenReturn(0.5); init(); assertEquals(-35.0, uut.getMinTemp(), 1e-6, "correct min temp"); assertEquals(-10.0, uut.getMaxTemp(), 1e-6, "correct max temp"); assertEquals(-22.5, uut.getCurrentTemp(), 1e-6, "c...
@Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerClass.LARGE) .withControllableKW(-unitSize / cop) .withStorageCapacity(stoc...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerCla...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerCla...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerCla...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void initialize () { super.initialize(); log.info("Initialize " + name); powerType = PowerType.THERMAL_STORAGE_CONSUMPTION; CustomerInfo info = new CustomerInfo(name, 1); info.withPowerType(powerType) .withCustomerClass(CustomerCla...
@Test public void testStepSetpoint () { when(seed.nextDouble()).thenReturn(15.0/25.0); weather = new WeatherReport(0, 30, 0, 0, 0); when(mockWeatherRepo.currentWeatherReport()).thenReturn(weather); init(); when(subscription.getRegulation()).thenReturn(0.0); uut.step(); ArgumentCaptor<Double> pwr = ArgumentCaptor.forCla...
@Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation + ", tempChange = " + tempChange); setCurrentTemp(currentTemp + tempCha...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
@Test public void testReadBootRecord () { try { URL url = new URL("file:src/test/resources/boot.xml"); uut.readBootRecord(url);; } catch (MalformedURLException e) { fail(e.toString()); } List<Object> items; Competition bc = uut.getBootstrapCompetition(); assertNotNull(bc, "found bootstrap competition"); items = uut.get...
public void readBootRecord (URL bootUrl) { Document document = getDocument(bootUrl); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); try { XPathExpression exp = xPath.compile("/powertac-bootstrap-data/config/competition"); NodeList nodes = (NodeList) exp.evaluate(document, XPathCons...
BootstrapDataRepo implements DomainRepo { public void readBootRecord (URL bootUrl) { Document document = getDocument(bootUrl); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); try { XPathExpression exp = xPath.compile("/powertac-bootstrap-data/config/competition"); NodeList nodes = (...
BootstrapDataRepo implements DomainRepo { public void readBootRecord (URL bootUrl) { Document document = getDocument(bootUrl); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); try { XPathExpression exp = xPath.compile("/powertac-bootstrap-data/config/competition"); NodeList nodes = (...
BootstrapDataRepo implements DomainRepo { public void readBootRecord (URL bootUrl) { Document document = getDocument(bootUrl); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); try { XPathExpression exp = xPath.compile("/powertac-bootstrap-data/config/competition"); NodeList nodes = (...
BootstrapDataRepo implements DomainRepo { public void readBootRecord (URL bootUrl) { Document document = getDocument(bootUrl); XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); try { XPathExpression exp = xPath.compile("/powertac-bootstrap-data/config/competition"); NodeList nodes = (...
@Test public void testStepAbove () { when(seed.nextDouble()).thenReturn(20.0/25.0); weather = new WeatherReport(0, 30, 0, 0, 0); when(mockWeatherRepo.currentWeatherReport()).thenReturn(weather); init(); when(subscription.getRegulation()).thenReturn(0.0); uut.step(); ArgumentCaptor<Double> pwr = ArgumentCaptor.forClass(...
@Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation + ", tempChange = " + tempChange); setCurrentTemp(currentTemp + tempCha...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
@Test public void testStepBelow () { when(seed.nextDouble()).thenReturn(10.0/25.0); weather = new WeatherReport(0, 30, 0, 0, 0); when(mockWeatherRepo.currentWeatherReport()).thenReturn(weather); init(); when(subscription.getRegulation()).thenReturn(0.0); uut.step(); ArgumentCaptor<Double> pwr = ArgumentCaptor.forClass(...
@Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation + ", tempChange = " + tempChange); setCurrentTemp(currentTemp + tempCha...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void step () { totalEnergyUsed = 0.0; double regulation = getSubscription().getRegulation(); if (regulation != 0.0) { double tempChange = regulation * cop / currentStock / CP_ICE; log.info(getName() + ": regulation = " + regulation...
@Test public void testEvaluateTariffs () { }
@Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); } }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); } ColdStorage(); ColdStorage(String name); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustome...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { @Override public void evaluateTariffs (List<Tariff> tariffs) { log.info(getName() + ": evaluate tariffs"); tariffEvaluator.evaluateTariffs(); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustome...
@Test public void testDailyPriceProfile () { init(); DateTime now = new DateTime(2014, 12, 1, 10, 0, 0, DateTimeZone.UTC); when(mockTimeslotRepo.currentTimeslot()) .thenReturn(new Timeslot(0, now.toInstant())); TariffSpecification dailySpec = new TariffSpecification(broker, PowerType.THERMAL_STORAGE_CONSUMPTION); Rate ...
TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override void evaluateTariffs(List...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override void evaluateTariffs(List...
@Test public void testWeeklyPriceProfile () { init(); DateTime now = new DateTime(2015, 2, 12, 12, 0, 0, DateTimeZone.UTC); when(mockTimeslotRepo.currentTimeslot()) .thenReturn(new Timeslot(0, now.toInstant())); TariffSpecification weeklySpec = new TariffSpecification(broker, PowerType.THERMAL_STORAGE_CONSUMPTION); Rat...
TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); }
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override void evaluateTariffs(List...
ColdStorage extends AbstractCustomer implements CustomerModelAccessor { TariffInfo makeTariffInfo (Tariff tariff) { return new TariffInfo(tariff); } ColdStorage(); ColdStorage(String name); @Override void initialize(); @Override CustomerInfo getCustomerInfo(); @Override void step(); @Override void evaluateTariffs(List...
@Test public void testGetInstance () { Config item = Config.getInstance(); assertNotNull(item, "Config created"); }
public synchronized static Config getInstance () { if (null == instance) { log.error("Unconfigured instance requested"); } return instance; }
Config { public synchronized static Config getInstance () { if (null == instance) { log.error("Unconfigured instance requested"); } return instance; } }
Config { public synchronized static Config getInstance () { if (null == instance) { log.error("Unconfigured instance requested"); } return instance; } private Config(ServerConfiguration source); }
Config { public synchronized static Config getInstance () { if (null == instance) { log.error("Unconfigured instance requested"); } return instance; } private Config(ServerConfiguration source); boolean isAllocationDetailsLogging(); boolean isCapacityDetailsLogging(); boolean isUsageChargesLogging(); List<String> getS...
Config { public synchronized static Config getInstance () { if (null == instance) { log.error("Unconfigured instance requested"); } return instance; } private Config(ServerConfiguration source); boolean isAllocationDetailsLogging(); boolean isCapacityDetailsLogging(); boolean isUsageChargesLogging(); List<String> getS...
@Test public void testMisoBuyer() { assertNotNull(buyer, "created something"); assertEquals(buyer.getUsername(), "Test", "correct name"); }
public MisoBuyer (String username) { super(username, true, true); }
MisoBuyer extends Broker { public MisoBuyer (String username) { super(username, true, true); } }
MisoBuyer extends Broker { public MisoBuyer (String username) { super(username, true, true); } MisoBuyer(String username); }
MisoBuyer extends Broker { public MisoBuyer (String username) { super(username, true, true); } MisoBuyer(String username); void init(BrokerProxy proxy, int seedId, ContextService service); void generateOrders(Instant now, List<Timeslot> openSlots); double getCoolThreshold(); @ConfigurableValue(valueType = "Double", des...
MisoBuyer extends Broker { public MisoBuyer (String username) { super(username, true, true); } MisoBuyer(String username); void init(BrokerProxy proxy, int seedId, ContextService service); void generateOrders(Instant now, List<Timeslot> openSlots); double getCoolThreshold(); @ConfigurableValue(valueType = "Double", des...
@Test public void testCpGenco () { assertNotNull(genco, "created something"); assertEquals(genco.getUsername(), "Test", "correct name"); assertEquals(4.0, genco.getPriceInterval(), 1e-6, "correct price interval"); }
public CpGenco (String username) { super(username, true, true); }
CpGenco extends Broker { public CpGenco (String username) { super(username, true, true); } }
CpGenco extends Broker { public CpGenco (String username) { super(username, true, true); } CpGenco(String username); }
CpGenco extends Broker { public CpGenco (String username) { super(username, true, true); } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo); void generateOrders(Instant now, List<Timeslot> openSlots); voi...
CpGenco extends Broker { public CpGenco (String username) { super(username, true, true); } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo); void generateOrders(Instant now, List<Timeslot> openSlots); voi...
@Test public void testInit () { init(); verify(mockSeedRepo).getRandomSeed(eq(CpGenco.class.getName()), anyLong(), eq("bid")); double[] ca = genco.getCoefficientArray(); assertNotNull(ca, "initialized array"); assertEquals(3, ca.length, "3 elements"); assertEquals(0.007, ca[0], 1e-6, "correct 1st coeff"); assertEquals(...
public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.timeslotRepo = timeslotRepo; this.seed = randomSeedRepo.getRandomSeed(CpGenco.class.getName(), seedId, "bid"); normal01 = ...
CpGenco extends Broker { public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.timeslotRepo = timeslotRepo; this.seed = randomSeedRepo.getRandomSeed(CpGenco.class.getName(), se...
CpGenco extends Broker { public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.timeslotRepo = timeslotRepo; this.seed = randomSeedRepo.getRandomSeed(CpGenco.class.getName(), se...
CpGenco extends Broker { public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.timeslotRepo = timeslotRepo; this.seed = randomSeedRepo.getRandomSeed(CpGenco.class.getName(), se...
CpGenco extends Broker { public void init (BrokerProxy proxy, int seedId, RandomSeedRepo randomSeedRepo, TimeslotRepo timeslotRepo) { log.info("init(" + seedId + ") " + getUsername()); this.brokerProxyService = proxy; this.timeslotRepo = timeslotRepo; this.seed = randomSeedRepo.getRandomSeed(CpGenco.class.getName(), se...
@Test public void testWithCoefficients () { init(); List<String> coefficients = Arrays.asList("1.0", "1.1", "1.2"); genco.withCoefficients(coefficients); assertEquals(3, genco.getCoefficients().size(), "3-element list"); assertEquals(genco.getCoefficients().get(0), "1.0", "first element"); double[] ca = genco.getCoeffi...
@ConfigurableValue(valueType = "List", bootstrapState = true, dump=false, description = "Coefficients for the specified function type") @StateChange public CpGenco withCoefficients (List<String> coeff) { if (function.validateCoefficients(coeff)) { coefficients = coeff; } else { log.error("incorrect number of coefficien...
CpGenco extends Broker { @ConfigurableValue(valueType = "List", bootstrapState = true, dump=false, description = "Coefficients for the specified function type") @StateChange public CpGenco withCoefficients (List<String> coeff) { if (function.validateCoefficients(coeff)) { coefficients = coeff; } else { log.error("incor...
CpGenco extends Broker { @ConfigurableValue(valueType = "List", bootstrapState = true, dump=false, description = "Coefficients for the specified function type") @StateChange public CpGenco withCoefficients (List<String> coeff) { if (function.validateCoefficients(coeff)) { coefficients = coeff; } else { log.error("incor...
CpGenco extends Broker { @ConfigurableValue(valueType = "List", bootstrapState = true, dump=false, description = "Coefficients for the specified function type") @StateChange public CpGenco withCoefficients (List<String> coeff) { if (function.validateCoefficients(coeff)) { coefficients = coeff; } else { log.error("incor...
CpGenco extends Broker { @ConfigurableValue(valueType = "List", bootstrapState = true, dump=false, description = "Coefficients for the specified function type") @StateChange public CpGenco withCoefficients (List<String> coeff) { if (function.validateCoefficients(coeff)) { coefficients = coeff; } else { log.error("incor...
@Test public void revokeToDefault () { TariffSpecification bobTS = new TariffSpecification(bob, PowerType.CONSUMPTION). addRate(new Rate().withValue(-0.4)); Tariff bobTariff = new Tariff(bobTS); initTariff(bobTariff); TariffSpecification jimTS = new TariffSpecification(jim, PowerType.CONSUMPTION). withMinDuration(TimeS...
public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCounter)) * inertia); e...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
@Test public void testWithPSigma () { init(); assertEquals(0.1, genco.getPSigma(), 1e-6, "correct initial"); genco.withPSigma(0.01); assertEquals(0.01, genco.getPSigma(), 1e-6, "correct post"); }
@ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma (double var) { this.pSigma = var; return this; }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma (double var) { this.pSigma = var; return this; } }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma (double var) { this.pSigma = var; return this; } CpGenco(String username); }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma (double var) { this.pSigma = var; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSeedR...
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid price") @StateChange public CpGenco withPSigma (double var) { this.pSigma = var; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSeedR...
@Test public void testWithQSigma () { init(); assertEquals(0.1, genco.getQSigma(), 1e-6, "correct initial"); genco.withQSigma(0.01); assertEquals(0.01, genco.getQSigma(), 1e-6, "correct post"); }
@ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma (double var) { this.qSigma = var; return this; }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma (double var) { this.qSigma = var; return this; } }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma (double var) { this.qSigma = var; return this; } CpGenco(String username); }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma (double var) { this.qSigma = var; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSe...
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", dump=false, description = "Standard Deviation ratio for bid quantity") @StateChange public CpGenco withQSigma (double var) { this.qSigma = var; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, RandomSe...
@Test public void testWithPriceInterval () { init(); assertEquals(4.0, genco.getPriceInterval(), 1e-6, "correct initial"); genco.withPriceInterval(6.0); assertEquals(6.0, genco.getPriceInterval(), 1e-6, "correct post"); }
@ConfigurableValue(valueType = "Double", description = "Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval (double interval) { this.priceInterval = interval; return this; }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval (double interval) { this.priceInterval = interval; return this; } }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval (double interval) { this.priceInterval = interval; return this; } CpGenco(String username); }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval (double interval) { this.priceInterval = interval; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, ...
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "Nominal price interval between successive bids") @StateChange public CpGenco withPriceInterval (double interval) { this.priceInterval = interval; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, ...
@Test public void testWithMinQuantity () { init(); assertEquals(120.0, genco.getMinQuantity(), 1e-6, "correct initial"); genco.withMinQuantity(150.0); assertEquals(150.0, genco.getMinQuantity(), 1e-6, "correct post"); }
@ConfigurableValue(valueType = "Double", description = "minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity (double qty) { this.minQuantity = qty; return this; }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity (double qty) { this.minQuantity = qty; return this; } }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity (double qty) { this.minQuantity = qty; return this; } CpGenco(String username); }
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity (double qty) { this.minQuantity = qty; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, Rand...
CpGenco extends Broker { @ConfigurableValue(valueType = "Double", description = "minimum leadtime for first commitment, in hours") @StateChange public CpGenco withMinQuantity (double qty) { this.minQuantity = qty; return this; } CpGenco(String username); void init(BrokerProxy proxy, int seedId, Rand...
@Test public void ex1_up_noBO () { ChargeInfo ci1 = new ChargeInfo(b1, -1.5); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, -1.5); brokerData.add(ci2); pplus = 3.0; pplusPrime = 1.0; pminus = -1.0; pminusPrime = -1.0; uut.settle(context, brokerData); assertEquals(-9.0, ci1.getBalanceCharge(), 1e-6, "b1 pays ...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void ex1_down_noBO () { ChargeInfo ci1 = new ChargeInfo(b1, 1.5); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 1.5); brokerData.add(ci2); pplus = 3.0; pplusPrime = 1.0; pminus = -1.0; pminusPrime = -1.0; uut.settle(context, brokerData); assertEquals(-3.0, ci1.getBalanceCharge(), 1e-6, "b1 pays ...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void ex1 () { BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.03); tariffRepo.addBalancingOrder(bo1); when(capacityControlService.getRegulationCapacity(bo1)). thenReturn(new RegulationAccumulator(3.5, 0.0)); BalancingOrder bo2 = new BalancingOrder(b3, spec3, 0.6, 0.042); tariffRepo.addBalancingOr...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void ex1_down () { BalancingOrder bo1 = new BalancingOrder(b1, spec1, -0.6, -0.03); tariffRepo.addBalancingOrder(bo1); when(capacityControlService.getRegulationCapacity(bo1)). thenReturn(new RegulationAccumulator(1.2, -3.5)); BalancingOrder bo2 = new BalancingOrder(b3, spec3, -0.6, -0.042); tariffRepo.addB...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void ex1_down2 () { BalancingOrder bo1 = new BalancingOrder(b1, spec1, -0.6, -0.009); tariffRepo.addBalancingOrder(bo1); when(capacityControlService.getRegulationCapacity(bo1)). thenReturn(new RegulationAccumulator(1.2, -50.0)); BalancingOrder bo2 = new BalancingOrder(b2, spec2, -0.6, -0.008); tariffRepo.a...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void ex_prob3 () { Broker b0 = new Broker("A0"); TariffSpecification spec0 = new TariffSpecification(b0, PowerType.INTERRUPTIBLE_CONSUMPTION); Rate rate = new Rate().withFixed(true).withValue(0.11).withMaxCurtailment(0.5); spec0.addRate(rate); Tariff tariff = new Tariff(spec0); tariffRepo.addTariff(tariff)...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void revokeSuperseding () { TariffSpecification bobTS = new TariffSpecification(bob, PowerType.CONSUMPTION). addRate(new Rate().withValue(-0.4)); Tariff bobTariff = new Tariff(bobTS); initTariff(bobTariff); TariffSpecification jimTS = new TariffSpecification(jim, PowerType.CONSUMPTION). withMinDuration(Tim...
public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCounter)) * inertia); e...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
@Test public void testSettle0 () { ChargeInfo ci1 = new ChargeInfo(b1, 0.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 0.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(0.0, ci1.getBalanceCharge(), 1e-6, "no charge for b1"); assertEquals(0.0, ci2.getBalanceCharge(), 1e-6, "no charg...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNoNet () { ChargeInfo ci1 = new ChargeInfo(b1, -10.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-0.6, ci1.getBalanceCharge(), 1e-6, "-0.6 for b1"); assertEquals(0.15, ci2.getBalanceCharge(), 1e-6, "0.15...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNoNetA () { pplusPrime = 0.01; pminusPrime = -0.01; ChargeInfo ci1 = new ChargeInfo(b1, -10.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-0.6, ci1.getBalanceCharge(), 1e-6, "-0.6 for b1"); assertEquals(...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNetNegZ () { pplusPrime = 0.0; pminusPrime = 0.0; ChargeInfo ci1 = new ChargeInfo(b1, -20.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-1.2, ci1.getBalanceCharge(), 1e-6, "-1.2 for b1"); assertEquals(0....
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNetNeg () { pplusPrime = 0.00005; pminusPrime = -0.00005; ChargeInfo ci1 = new ChargeInfo(b1, -20.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-1.21, ci1.getBalanceCharge(), 1e-6, "-1.21 for b1"); asser...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNetPos () { ChargeInfo ci1 = new ChargeInfo(b1, -10.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 20.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-0.15, ci1.getBalanceCharge(), 1e-6, "-.15 for b1"); assertEquals(0.3, ci2.getBalanceCharge(), 1e-6, "0.3...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleNetPosSlope () { pplusPrime = 0.0001; pminusPrime = -0.0001; ChargeInfo ci1 = new ChargeInfo(b1, -10.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 20.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(-0.14, ci1.getBalanceCharge(), 1e-6, "-.14 for b1"); ass...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSettleHiNetPosSlope () { pminus = -0.010; pminusPrime = -0.0001; ChargeInfo ci1 = new ChargeInfo(b1, -10.0); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 2000.0); brokerData.add(ci2); uut.settle(context, brokerData); assertEquals(1.89, ci1.getBalanceCharge(), 1e-6, "1.89 for b1"); asse...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSingleBO () { pplusPrime = 0.00005; pminusPrime = -0.00005; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.05); tariffRepo.addBalancingOrder(bo1); ChargeInfo ci1 = new ChargeInfo(b1, -20.0); ci1.addBalancingOrder(bo1); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10.0); brok...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSingleBO_NoExercise () { pplusPrime = 0.00001; pminusPrime = -0.00001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.061); tariffRepo.addBalancingOrder(bo1); ChargeInfo ci1 = new ChargeInfo(b1, -20.0); ci1.addBalancingOrder(bo1); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2,...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void revokeToKilledSuperseding () { TariffSpecification bobTS = new TariffSpecification(bob, PowerType.CONSUMPTION). addRate(new Rate().withValue(-0.4)); Tariff bobTariff = new Tariff(bobTS); initTariff(bobTariff); TariffSpecification jimTS = new TariffSpecification(jim, PowerType.CONSUMPTION). withMinDura...
public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCounter)) * inertia); e...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
TariffEvaluator { public void evaluateTariffs () { allocations.clear(); HashSet<Tariff> newTariffs = new LinkedHashSet<>(getTariffRepo() .findRecentActiveTariffs(tariffEvalDepth, customerInfo.getPowerType())); addSupersedingTariffs(newTariffs); double actualInertia = Math.max(0.0, (1.0 - Math.pow(2, 1 - evaluationCount...
@Test public void testSingleBO_splitDummy () { pplusPrime = 0.001; pminusPrime = -0.001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.061); tariffRepo.addBalancingOrder(bo1); ChargeInfo ci1 = new ChargeInfo(b1, -20.0); ci1.addBalancingOrder(bo1); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo(b2, 10....
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testPosSingleBO_splitDummyZero () { pplusPrime = 0.0001; pminusPrime = -0.0001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, -0.6, -0.013); tariffRepo.addBalancingOrder(bo1); ChargeInfo ci1 = new ChargeInfo(b1, 20.0); ci1.addBalancingOrder(bo1); brokerData.add(ci1); ChargeInfo ci2 = new ChargeIn...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testPosSingleBO_splitDummyNZ () { pplusPrime = 0.0001; pminusPrime = -0.0001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, -0.6, -0.014); tariffRepo.addBalancingOrder(bo1); ChargeInfo ci1 = new ChargeInfo(b1, 20.0); ci1.addBalancingOrder(bo1); brokerData.add(ci1); ChargeInfo ci2 = new ChargeInfo...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void testSingleBO_HighCapacity () { pplusPrime = 0.00001; pminusPrime = -0.00001; TariffSpecification spec = new TariffSpecification(b1, PowerType.INTERRUPTIBLE_CONSUMPTION); Rate rate = new Rate().withFixed(true).withValue(0.11).withMaxCurtailment(0.5); spec.addRate(rate); Tariff tariff = new Tariff(spec)...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void test2BO_LowCapacity () { pplusPrime = 0.00001; pminusPrime = -0.00001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.04); tariffRepo.addBalancingOrder(bo1); BalancingOrder bo2 = new BalancingOrder(b2, spec2, 0.6, 0.05); tariffRepo.addBalancingOrder(bo2); ChargeInfo ci1 = new ChargeInfo(b1,...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void test2BO_HighCapacity () { pplusPrime = 0.00001; pminusPrime = -0.00001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.04); tariffRepo.addBalancingOrder(bo1); BalancingOrder bo2 = new BalancingOrder(b2, spec2, 0.6, 0.05); tariffRepo.addBalancingOrder(bo2); ChargeInfo ci1 = new ChargeInfo(b1...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void test3BO_LowCapacity () { pplusPrime = 0.00001; pminusPrime = -0.00001; BalancingOrder bo1 = new BalancingOrder(b1, spec1, 0.6, 0.04); tariffRepo.addBalancingOrder(bo1); TariffSpecification spec1a = new TariffSpecification(b1, PowerType.INTERRUPTIBLE_CONSUMPTION); Rate rate = new Rate().withFixed(true)...
@Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double totalQty = 0.0; for (ChargeInfo info : brokerData) { totalIm...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
StaticSettlementProcessor extends SettlementProcessor { @Override public void settle (SettlementContext service, List<ChargeInfo> brokerData) { pPlus = service.getPPlus(); pPlusPrime = service.getPPlusPrime(); pMinus = service.getPMinus(); pMinusPrime = service.getPMinusPrime(); double totalImbalance = 0.0; double tota...
@Test public void readRRTariffSpec () { String brokerLog = "42476:org.powertac.common.Broker::4773::new::Bunnie"; String regRateLog = "88002:org.powertac.common.RegulationRate::501428076::-rr::501428079::SECONDS::0.6::-0.15"; String rateLog = "88003:org.powertac.common.Rate::501428077::-rr::501428079::-1::-1::-1::-1::0...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void readRRTariffSpec_18 () { String brokerLog = "42476:org.powertac.common.Broker::4773::new::Bunnie"; String regRateLog = "88002:org.powertac.common.RegulationRate::501428076::-rr::501428079::SECONDS::0.6::-0.15"; String rateLog = "88003:org.powertac.common.Rate::501428077::-rr::501428079::-1::-1::-1::-1...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void readRRTariffSpecInstant () { String brokerLog = "42476:org.powertac.common.Broker::4773::new::Bunnie"; String regRateLog = "88002:org.powertac.common.RegulationRate::501428076::-rr::501428079::SECONDS::0.6::-0.15"; String rateLog = "88003:org.powertac.common.Rate::501428077::-rr::501428079::-1::-1::-1...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void testRegulationCapacity () { RegulationAccumulator rc = new RegulationAccumulator(1.0, -2.0); assertEquals(1.0, rc.getUpRegulationCapacity(),1e-6, "correct up-regulation"); assertEquals(-2.0, rc.getDownRegulationCapacity(), 1e-6, "correct down-regulation"); }
public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0.0"); upRegulationCap...
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0...
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0...
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0...
RegulationCapacity { public RegulationCapacity (TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity) { super(); this.subscription = subscription; if (upRegulationCapacity < 0.0) { if (upRegulationCapacity < -epsilon) log.warn("upRegulationCapacity " + upRegulationCapacity + " < 0...
@Test public void readOutOfOrder () { String soton = "169937:org.powertac.common.Broker::605::new::SotonPower"; String hc1 = "177116:org.powertac.common.HourlyCharge::600000390::new::600000389::-0.0010::2009-01-03T02:00:00.000Z"; String hc2 = "177116:org.powertac.common.HourlyCharge::600000392::new::600000389::-0.0010:...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void readBalancingOrder () { String ca = "125552:org.powertac.common.Broker::601::new::CrocodileAgent"; String r = "177360:org.powertac.common.Rate::200076920::new::200076919::-1::-1::-1::-1::0.0::true::-0.045598969348039364::0.0::0::0.0::0.1"; String ts = "177360:org.powertac.common.TariffSpecification::2...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void simpleMethodCall () { String nc = "140:org.powertac.common.Competition::0::new::game-9"; String m1 = "221:org.powertac.common.Competition::0::withSimulationBaseTime::1229644800000"; String m2 = "222:org.powertac.common.Competition::0::withMinimumTimeslotCount::1380"; String m3 = "222:org.powertac.comm...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void readSubscribe () { String cu = "812:org.powertac.common.CustomerInfo::1895::new::Village::10"; String ca = "1255:org.powertac.common.Broker::601::new::CrocodileAgent"; String r = "1773:org.powertac.common.Rate::200076920::new::1878::-1::-1::-1::-1::0.0::true::-0.045598969348039364::0.0::0::0.0::0.1"; ...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void readTtxPublish () { String ca = "255:org.powertac.common.Broker::601::new::CrocodileAgent"; String r = "773:org.powertac.common.Rate::300076920::new::300076919::-1::-1::-1::-1::0.0::true::-0.045598969348039364::0.0::0::0.0::0.1"; String ts = "774:org.powertac.common.TariffSpecification::300076919::new...
public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname)) { return null; } t...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
DomainObjectReader { public Object readObject (String line) throws MissingDomainObject { log.debug("readObject(" + line + ")"); String body = line.substring(line.indexOf(':') + 1); String[] tokens = body.split("::"); Class<?> clazz; String classname = StateLogging.unabbreviate(tokens[0]); if (ignores.contains(classname...
@Test public void testDoActivities () { mockSeed.setIntSeed(new int[]{0, 0}); initialize("male"); evCustomer.makeDayPlanning(0, 1); assertEquals(50, evCustomer.getCurrentCapacity(), 1E-06); evCustomer.doActivities(0, 5); assertFalse(evCustomer.isDriving()); evCustomer.doActivities(0, 6); assertTrue(evCustomer.isDriving...
public void doActivities (int day, int hour) { TimeslotData timeslotData = todayMap[hour]; double intendedDistance = timeslotData.getIntendedDistance(); double neededCapacity = getNeededCapacity(intendedDistance); if (intendedDistance < distanceEpsilon) { return; } if (neededCapacity > currentCapacity) { log.warn("Cust...
EvCustomer { public void doActivities (int day, int hour) { TimeslotData timeslotData = todayMap[hour]; double intendedDistance = timeslotData.getIntendedDistance(); double neededCapacity = getNeededCapacity(intendedDistance); if (intendedDistance < distanceEpsilon) { return; } if (neededCapacity > currentCapacity) { l...
EvCustomer { public void doActivities (int day, int hour) { TimeslotData timeslotData = todayMap[hour]; double intendedDistance = timeslotData.getIntendedDistance(); double neededCapacity = getNeededCapacity(intendedDistance); if (intendedDistance < distanceEpsilon) { return; } if (neededCapacity > currentCapacity) { l...
EvCustomer { public void doActivities (int day, int hour) { TimeslotData timeslotData = todayMap[hour]; double intendedDistance = timeslotData.getIntendedDistance(); double neededCapacity = getNeededCapacity(intendedDistance); if (intendedDistance < distanceEpsilon) { return; } if (neededCapacity > currentCapacity) { l...
EvCustomer { public void doActivities (int day, int hour) { TimeslotData timeslotData = todayMap[hour]; double intendedDistance = timeslotData.getIntendedDistance(); double neededCapacity = getNeededCapacity(intendedDistance); if (intendedDistance < distanceEpsilon) { return; } if (neededCapacity > currentCapacity) { l...
@Test public void testInitialization () { initializeClass(); assertEquals(className, evSocialClass.getName(), "Correct name"); assertEquals(2, evSocialClass.getMinCount(), "correct min count"); }
int getMinCount () { return minCount; }
EvSocialClass extends AbstractCustomer { int getMinCount () { return minCount; } }
EvSocialClass extends AbstractCustomer { int getMinCount () { return minCount; } EvSocialClass(); EvSocialClass(String name); }
EvSocialClass extends AbstractCustomer { int getMinCount () { return minCount; } EvSocialClass(); EvSocialClass(String name); @Override void initialize(); double getHomeChargerProbability(); @Override void saveBootstrapState(); @Override void evaluateTariffs(List<Tariff> tariffs); @Override void step(); @Override Stri...
EvSocialClass extends AbstractCustomer { int getMinCount () { return minCount; } EvSocialClass(); EvSocialClass(String name); @Override void initialize(); double getHomeChargerProbability(); @Override void saveBootstrapState(); @Override void evaluateTariffs(List<Tariff> tariffs); @Override void step(); @Override Stri...
@Test public void dailyProfileNormalizedGT0 () { TreeMap<String, String> map = new TreeMap<String, String>(); map.put("evcustomer.beans.activity.instances", "commuting,visit"); map.put("evcustomer.beans.activity.commuting.dailyProfile", "0,0,0,0,0,0,0,0.8,1.0,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); map.put("evcustomer.beans...
public Optional<double[]> getDailyProfileOptional () { return Optional.ofNullable(dailyProfile); }
Activity { public Optional<double[]> getDailyProfileOptional () { return Optional.ofNullable(dailyProfile); } }
Activity { public Optional<double[]> getDailyProfileOptional () { return Optional.ofNullable(dailyProfile); } Activity(); Activity(String name); }
Activity { public Optional<double[]> getDailyProfileOptional () { return Optional.ofNullable(dailyProfile); } Activity(); Activity(String name); double getDayWeight(int day); int getId(); String getName(); double getChargerProbability(); void setChargerProbability(double prob); int getInterval(); double getWeekdayWeig...
Activity { public Optional<double[]> getDailyProfileOptional () { return Optional.ofNullable(dailyProfile); } Activity(); Activity(String name); double getDayWeight(int day); int getId(); String getName(); double getChargerProbability(); void setChargerProbability(double prob); int getInterval(); double getWeekdayWeig...
@Test public void probabilityForTimeslot () { TreeMap<String, String> map = new TreeMap<String, String>(); map.put("evcustomer.beans.activity.instances", "min,daily"); map.put("evcustomer.beans.activity.daily.dailyProfile", "0,0,0,0,0,0,0.8,1.0,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"); config = new MapConfiguration(map); Co...
public double getProbabilityForTimeslot (int slot) { double result = 1.0; if (slot < 0 || slot > 23) { log.error("bad slot {} in probabilityForTimeslot", slot); result = 0.0; } else if (getDailyProfileOptional().isPresent()) { result = getDailyProfileOptional().get()[slot]; } else { result = 1.0; } return result; }
Activity { public double getProbabilityForTimeslot (int slot) { double result = 1.0; if (slot < 0 || slot > 23) { log.error("bad slot {} in probabilityForTimeslot", slot); result = 0.0; } else if (getDailyProfileOptional().isPresent()) { result = getDailyProfileOptional().get()[slot]; } else { result = 1.0; } return re...
Activity { public double getProbabilityForTimeslot (int slot) { double result = 1.0; if (slot < 0 || slot > 23) { log.error("bad slot {} in probabilityForTimeslot", slot); result = 0.0; } else if (getDailyProfileOptional().isPresent()) { result = getDailyProfileOptional().get()[slot]; } else { result = 1.0; } return re...
Activity { public double getProbabilityForTimeslot (int slot) { double result = 1.0; if (slot < 0 || slot > 23) { log.error("bad slot {} in probabilityForTimeslot", slot); result = 0.0; } else if (getDailyProfileOptional().isPresent()) { result = getDailyProfileOptional().get()[slot]; } else { result = 1.0; } return re...
Activity { public double getProbabilityForTimeslot (int slot) { double result = 1.0; if (slot < 0 || slot > 23) { log.error("bad slot {} in probabilityForTimeslot", slot); result = 0.0; } else if (getDailyProfileOptional().isPresent()) { result = getDailyProfileOptional().get()[slot]; } else { result = 1.0; } return re...
@Test public void testGetInstance () { Config item = Config.getInstance(); assertNotNull(item, "Config created"); }
public synchronized static Config getInstance () { if (null == instance) { instance = new Config(); } return instance; }
Config { public synchronized static Config getInstance () { if (null == instance) { instance = new Config(); } return instance; } }
Config { public synchronized static Config getInstance () { if (null == instance) { instance = new Config(); } return instance; } private Config(); }
Config { public synchronized static Config getInstance () { if (null == instance) { instance = new Config(); } return instance; } private Config(); double getEpsilon(); double getLambda(); double getTouFactor(); double getInterruptibilityFactor(); double getVariablePricingFactor(); double getTieredRateFactor(); int ge...
Config { public synchronized static Config getInstance () { if (null == instance) { instance = new Config(); } return instance; } private Config(); double getEpsilon(); double getLambda(); double getTouFactor(); double getInterruptibilityFactor(); double getVariablePricingFactor(); double getTieredRateFactor(); int ge...
@Test public void testSetUp () { RegulationAccumulator rc = new RegulationAccumulator(1.0, -2.0); rc.setUpRegulationCapacity(2.5); assertEquals(2.5, rc.getUpRegulationCapacity(), 1e-6, "successful set"); rc.setUpRegulationCapacity(-3.0); assertEquals(2.5, rc.getUpRegulationCapacity(), 1e-6, "no change"); }
public double getUpRegulationCapacity () { return upRegulationCapacity; }
RegulationCapacity { public double getUpRegulationCapacity () { return upRegulationCapacity; } }
RegulationCapacity { public double getUpRegulationCapacity () { return upRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); }
RegulationCapacity { public double getUpRegulationCapacity () { return upRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); long getId(); TariffSubscriptio...
RegulationCapacity { public double getUpRegulationCapacity () { return upRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); long getId(); TariffSubscriptio...
@Test public void testSendMessage_single() { brokerProxy.sendMessage(stdBroker, message); verify(template, times(0)).send(any(String.class), any(MessageCreator.class)); stdBroker.setEnabled(true); brokerProxy.sendMessage(stdBroker, message); verify(template, times(1)).send(any(String.class), any(MessageCreator.class));...
@Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
@Test public void localBrokerSingleMessage () { brokerProxy.sendMessage(localBroker, message); assertEquals(0, localBroker.messages.size(), "no messages for non-enabled broker"); localBroker.setEnabled(true); brokerProxy.sendMessage(localBroker, message); assertEquals(1, localBroker.messages.size(), "one message for en...
@Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
@Test public void wholesaleBrokerSingleMessage () { brokerProxy.sendMessage(wholesaleBroker, message); assertEquals(1, wholesaleBroker.messages.size(), "one message for wholesale broker"); assertEquals(message, wholesaleBroker.messages.get(0), "correct message arrived"); }
@Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
BrokerProxyService implements BrokerProxy { @Override public void sendMessage (Broker broker, Object messageObject) { if (broker.isEnabled()) visualizerProxyService.forwardMessage(messageObject); localSendMessage(broker, messageObject); } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObj...
@Test public void testSendMessage_multiple() { List<Object> messageList = new ArrayList<Object>(); messageList.add(message); messageList.add(new CustomerInfo("t2", 22)); messageList.add(new CustomerInfo("t3", 23)); brokerProxy.sendMessages(stdBroker, messageList); verify(template, times(0)).send(any(String.class), any(...
@Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } } }
BrokerProxyService implements BrokerProxy { @Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Override void sendMessages(Broker bro...
BrokerProxyService implements BrokerProxy { @Override public void sendMessages (Broker broker, List<?> messageObjects) { for (Object message : messageObjects) { sendMessage(broker, message); } } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Override void sendMessages(Broker bro...
@Test public void routeMessageTest() { when(router.route(message)).thenReturn(false); brokerProxy.routeMessage(message); verify(router, times(1)).route(message); verify(visualizer, times(0)).forwardMessage(message); reset(router); reset(visualizer); when(router.route(message)).thenReturn(true); brokerProxy.routeMessage...
@Override public void routeMessage (Object message) { if (router.route(message)) { if (!(message instanceof TariffSpecification)) { visualizerProxyService.forwardMessage(message); } } }
BrokerProxyService implements BrokerProxy { @Override public void routeMessage (Object message) { if (router.route(message)) { if (!(message instanceof TariffSpecification)) { visualizerProxyService.forwardMessage(message); } } } }
BrokerProxyService implements BrokerProxy { @Override public void routeMessage (Object message) { if (router.route(message)) { if (!(message instanceof TariffSpecification)) { visualizerProxyService.forwardMessage(message); } } } BrokerProxyService(); }
BrokerProxyService implements BrokerProxy { @Override public void routeMessage (Object message) { if (router.route(message)) { if (!(message instanceof TariffSpecification)) { visualizerProxyService.forwardMessage(message); } } } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Ov...
BrokerProxyService implements BrokerProxy { @Override public void routeMessage (Object message) { if (router.route(message)) { if (!(message instanceof TariffSpecification)) { visualizerProxyService.forwardMessage(message); } } } BrokerProxyService(); @Override void sendMessage(Broker broker, Object messageObject); @Ov...
@Test public void dataFetchTest() { assertNotNull(timeslotRepo); assertNotNull(weatherReportRepo); assertNotNull(weatherForecastRepo); assertNotNull(weatherService); assertEquals(24, timeslotRepo.enabledTimeslots().size()); weatherService.activate(start, 1); assertEquals(24, weatherReportRepo.count()); assertEquals(24,...
@Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { log.info("Timeslot " + timeslotRepo.currentTimeslot().getId() + " WeatherService repo...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
@Test public void currentTimeDataTest() { weatherService.activate(start, 1); assertEquals(24, weatherReportRepo.count()); timeslotRepo = (TimeslotRepo) SpringApplicationContext.getBean("timeslotRepo"); int index = weatherReportRepo.currentWeatherReport().getTimeslotIndex(); Timeslot slot = timeslotRepo.findBySerialNumb...
@Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { log.info("Timeslot " + timeslotRepo.currentTimeslot().getId() + " WeatherService repo...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
@Test public void currentForecastTest() { weatherService.activate(start, 1); timeService.setCurrentTime(next); assertNotNull(weatherForecastRepo.currentWeatherForecast()); assertEquals(2, weatherForecastRepo.allWeatherForecasts().size()); }
@Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { log.info("Timeslot " + timeslotRepo.currentTimeslot().getId() + " WeatherService repo...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
@Test public void testReportValues() { weatherService.activate(start, 1); WeatherReport wr = weatherReportRepo.allWeatherReports().get(0); assertEquals(3.5, wr.getTemperature(), .0001); assertEquals(4.0, wr.getWindSpeed(), .0001); assertEquals(250.0, wr.getWindDirection(), .0001); assertEquals(1.0, wr.getCloudCover(), ...
@Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { log.info("Timeslot " + timeslotRepo.currentTimeslot().getId() + " WeatherService repo...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
@Test public void testForecastValues() { weatherService.activate(start, 1); assertEquals(24, weatherForecastRepo.currentWeatherForecast() .getPredictions().size()); int i = 1; for (WeatherForecastPrediction p : weatherForecastRepo .currentWeatherForecast().getPredictions()) { assertEquals(i, p.getForecastTime()); i++; ...
@Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { log.info("Timeslot " + timeslotRepo.currentTimeslot().getId() + " WeatherService repo...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
WeatherService extends TimeslotPhaseProcessor implements InitializationService { @Override public void activate (Instant time, int phaseNumber) { long msec = time.getMillis(); if (msec % (getWeatherReqInterval() * TimeService.HOUR) != 0) { log.info("WeatherService reports not time to grab weather data."); } else { ...
@Test public void testSetDown () { RegulationAccumulator rc = new RegulationAccumulator(1.0, -2.0); rc.setDownRegulationCapacity(-2.5); assertEquals(-2.5, rc.getDownRegulationCapacity(), 1e-6, "successful set"); rc.setDownRegulationCapacity(3.0); assertEquals(-2.5, rc.getDownRegulationCapacity(), 1e-6, "no change"); }
public double getDownRegulationCapacity () { return downRegulationCapacity; }
RegulationCapacity { public double getDownRegulationCapacity () { return downRegulationCapacity; } }
RegulationCapacity { public double getDownRegulationCapacity () { return downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); }
RegulationCapacity { public double getDownRegulationCapacity () { return downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); long getId(); TariffSubscri...
RegulationCapacity { public double getDownRegulationCapacity () { return downRegulationCapacity; } RegulationCapacity(TariffSubscription subscription, double upRegulationCapacity, double downRegulationCapacity); RegulationCapacity(); long getId(); TariffSubscri...
@Test public void testPostEconomicControl () { EconomicControlEvent ece1 = new EconomicControlEvent(spec, 0.20, 0); EconomicControlEvent ece3 = new EconomicControlEvent(spec, 0.22, 2); EconomicControlEvent ece4 = new EconomicControlEvent(spec, 0.23, 3); assertNull(capacityControl.getControlsForTimeslot(0), "no controls...
@Override public void postEconomicControl (EconomicControlEvent event) { int tsIndex = event.getTimeslotIndex(); int current = timeslotRepo.currentTimeslot().getSerialNumber(); if (tsIndex < current) { log.warn("attempt to save old economic control for ts " + tsIndex + " during timeslot " + current); return; } List<Eco...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void postEconomicControl (EconomicControlEvent event) { int tsIndex = event.getTimeslotIndex(); int current = timeslotRepo.currentTimeslot().getSerialNumber(); if (tsIndex < current) { log.warn("at...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void postEconomicControl (EconomicControlEvent event) { int tsIndex = event.getTimeslotIndex(); int current = timeslotRepo.currentTimeslot().getSerialNumber(); if (tsIndex < current) { log.warn("at...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void postEconomicControl (EconomicControlEvent event) { int tsIndex = event.getTimeslotIndex(); int current = timeslotRepo.currentTimeslot().getSerialNumber(); if (tsIndex < current) { log.warn("at...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public void postEconomicControl (EconomicControlEvent event) { int tsIndex = event.getTimeslotIndex(); int current = timeslotRepo.currentTimeslot().getSerialNumber(); if (tsIndex < current) { log.warn("at...
@Test public void regulationCapacity () { TariffSubscription sub1 = tariffSubscriptionRepo.getSubscription(customer1, tariff); sub1.subscribe(100); TariffSubscription sub2 = tariffSubscriptionRepo.getSubscription(customer2, tariff); sub2.subscribe(200); sub1.usePower(200); sub2.usePower(300); BalancingOrder order = new...
@Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffId() + " for balancing order"); return new RegulationAccumulator(0.0, 0.0); } RegulationAccumulator result ...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
CapacityControlService extends TimeslotPhaseProcessor implements CapacityControl, InitializationService { @Override public RegulationAccumulator getRegulationCapacity (BalancingOrder order) { Tariff tariff = tariffRepo.findTariffById(order.getTariffId()); if (null == tariff) { log.warn("Null tariff " + order.getTariffI...
@Test public void testCreateJobHistoryFileParserCorrectCreation() { String jHist2 = "Avro-Json\n" + "{\"type\":\"record\",\"name\":\"Event\", " + "\"namespace\":\"org.apache.hadoop.mapreduce.jobhistory\"," + "\"fields\":[]\""; JobHistoryFileParser historyFileParser = JobHistoryFileParserFactory .createJobHistoryFilePar...
public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } HadoopVersion version = getVersion(historyFileContents)...
JobHistoryFileParserFactory { public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } HadoopVersion version = g...
JobHistoryFileParserFactory { public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } HadoopVersion version = g...
JobHistoryFileParserFactory { public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } HadoopVersion version = g...
JobHistoryFileParserFactory { public static JobHistoryFileParser createJobHistoryFileParser( byte[] historyFileContents, Configuration jobConf) throws IllegalArgumentException { if (historyFileContents == null) { throw new IllegalArgumentException( "Job history contents should not be null"); } HadoopVersion version = g...