Skip to content

Instantly share code, notes, and snippets.

View mcimbora's full-sized avatar

Matej Čimbora mcimbora

  • Timefold
  • Prague, Czech Republic
View GitHub Profile
Constraint consecutiveWorkingDays(ConstraintFactory constraintFactory) {
return constraintFactory.from(Employee.class)
.joinSequence(Shift.class,
Joiners.sequenceItemIndex(Shift::getDayIndex),
Joiners.equal((employee, shift) -> Objects.equals(employee, shift.employee))
).filter((employee, sequence<shift>) -> sequence.getLength() > employee.contract.maxConsecutiveDays)
.penalizeConfigurable(MAX_CONSECUTIVE_DAYS, (employee, sequence<shift>) -> sequence.length, employee.contract.maxConsecutiveDays);
}
List<SolverInstance> getSolvers(String containerId);
SolverInstance createSolver(String containerId,
String solverId,
String configFile);
SolverInstance getSolverState(String containerId,
String solverId);
protected void assertNoInitScore() {
if (initScore != 0) {
throw new IllegalStateException("The score (" + this + ")'s initScore (" + initScore
+ ") should be 0.\n"
+ "Maybe the score calculator is calculating the initScore too, although it's the "
+ ScoreDirector.class.getSimpleName() + "'s responsibility.");
}
}
The solutionClass (class cb.Schedule) has a PlanningScore annotated member (bean property score on class org.optaplanner.core.impl.domain.solution.AbstractSolution) but the solver configuration still has a deprecated scoreDefinitionType or scoreDefinitionClass element.
Maybe remove the <scoreDefinitionType>, <bendableHardLevelsSize>, <bendableSoftLevelsSize> and <scoreDefinitionClass> elements from the solver configuration.
<execution>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.jboss.spec.javax.xml.bind</groupId>
<artifactId>jboss-jaxb-api_2.2_spec</artifactId>
<type>jar</type>
[INFO] SpyMemcached client ................................ SUCCESS [ 0.503 s]
[INFO] RadarGun - Aggregator .............................. FAILURE [ 6.848 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.310 s
[INFO] Finished at: 2016-04-25T13:01:35+02:00
[INFO] Final Memory: 346M/1452M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (prepare_plugins) on project radargun-aggregator: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (prepare_extensions) on project radargun-aggregator: An Ant BuildException has occured: The following error occurred while executing this line:
/home/mcimbora/Projects/radar-gun/radargun/target/antrun/build-main.xml:17: /home/mcimbora/Projects/radar-gun/radargun/extensions/hdrhistogram/target/distribution/radargun-hdrhistogram-bin/radargun-hdrhistogram/conf does not exist.
around Ant part ...<ac:for xmlns:ac="antlib:net.sf.antcontrib" param="extension" list="cache,query,,hdrhistogram,">... @ 11:99 in /home/mcimbora/Projects/radar-gun/radargun/target/antrun/build-main.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.Li
<distributed-cache name="dist_lucene" mode="SYNC" start="EAGER">
<locking acquire-timeout="30000"/>
<indexing index="LOCAL">
<property name="default.directory_provider">infinispan</property>
<property name="default.indexmanager">org.infinispan.query.indexmanager.InfinispanIndexManager</property>
<!--<property name="default.exclusive_index_use">true</property>-->
<property name="default.metadata_cachename">lucene_metadata_repl"</property>
<property name="default.data_cachename">lucene_data_dist</property>
<property name="default.locking_cachename">lucene_locking_repl</property>
<property name="hibernate.search.lucene_version">LUCENE_36</property>
<html>
<head>
<title>TEST</title>
<script></script>
</head>
<body>
<h1>RadarGun benchmark report</h1>
<h2>Tests</h2>
<ul>
<li>
StressorRecord:
1.
public void addConfirmation(long operationId, long timestamp) {
try {
ListIterator<StressorConfirmation> iterator = confirmations.listIterator(confirmations.size());
if (trace) {
log.tracef("Confirmations for thread %d were %s", threadId, confirmations);
}
while (iterator.hasPrevious()) {