Tabnine Logo
Scenario$ProblemClass
Code IndexAdd Tabnine to your IDE (free)

How to use
Scenario$ProblemClass
in
com.github.rinde.rinsim.scenario

Best Java code snippets using com.github.rinde.rinsim.scenario.Scenario$ProblemClass (Showing top 6 results out of 315)

origin: rinde/RinSim

/**
 * Parses the files which are added to this parser. In case
 * {@link #filter(GendreauProblemClass...)} has been called, only files in one
 * of these problem classes will be parsed.
 * @return A list of scenarios in order of adding them to the parser.
 */
public ImmutableList<Gendreau06Scenario> parse() {
 final ImmutableList.Builder<Gendreau06Scenario> scenarios = ImmutableList
  .builder();
 for (final Entry<String, ParcelsSupplier> entry : parcelsSuppliers.build()
  .entrySet()) {
  boolean include = false;
  if (!problemClasses.isPresent()) {
   include = true;
  } else {
   for (final ProblemClass pc : problemClasses.get()) {
    if (entry.getKey().endsWith(pc.getId())) {
     include = true;
     break;
    }
   }
  }
  if (include) {
   scenarios.add(
    parse(entry.getValue(), entry.getKey(), numVehicles, numParcels,
     tickSize, allowDiversion, online, realtime));
  }
 }
 return scenarios.build();
}
origin: rinde/RinSim

/**
 * @return A very compact string representation.
 */
public String toShortString() {
 return new StringBuilder(getScenario().getProblemClass().getId())
  .append(DASH)
  .append(getScenario().getProblemInstanceId())
  .append(DASH)
  .append(getMasConfig().getName())
  .append("-s")
  .append(getRandomSeed())
  .append(DASH)
  .append("r")
  .append(getRepetition())
  .toString();
}
origin: com.github.rinde/rinsim-experiment

/**
 * @return A very compact string representation.
 */
public String toShortString() {
 return new StringBuilder(getScenario().getProblemClass().getId())
  .append(DASH)
  .append(getScenario().getProblemInstanceId())
  .append(DASH)
  .append(getMasConfig().getName())
  .append("-s")
  .append(getRandomSeed())
  .append(DASH)
  .append("r")
  .append(getRepetition())
  .toString();
}
origin: rinde/RinSim

@Override
public int compareTo(@Nullable SimulationResult o) {
 assert o != null;
 return ComparisonChain.start()
  .compare(getSimArgs().getScenario().getProblemClass().getId(),
   o.getSimArgs().getScenario().getProblemClass().getId())
  .compare(getSimArgs().getScenario().getProblemInstanceId(),
   o.getSimArgs().getScenario().getProblemInstanceId())
  .result();
}
origin: rinde/RinSim

/**
 * Tests for {@link SimpleProblemClass}.
 */
@Test
public void testSimpleProblemClass() {
 final ProblemClass pc = SimpleProblemClass.create("hello world");
 assertEquals("hello world", pc.getId());
 assertTrue(pc.toString().contains("hello world"));
}
origin: com.github.rinde/rinsim-experiment

@Override
public int compareTo(@Nullable SimulationResult o) {
 assert o != null;
 return ComparisonChain.start()
  .compare(getSimArgs().getScenario().getProblemClass().getId(),
   o.getSimArgs().getScenario().getProblemClass().getId())
  .compare(getSimArgs().getScenario().getProblemInstanceId(),
   o.getSimArgs().getScenario().getProblemInstanceId())
  .result();
}
com.github.rinde.rinsim.scenarioScenario$ProblemClass

Javadoc

Represents a class of scenarios.

Most used methods

  • getId

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now