@Override
 protected void run() throws IOException, NoSuchTraceException {
   MovementTrace movement =
       (MovementTrace) _store.getTrace(graph_options.get(GraphOptions.MOVEMENT));
   long otps = movement.ticsPerSecond();
   long interval = Math.max((long) (d_interval * otps), 1);
   if (maxTime != null) maxTime *= otps;
   double timeMul = getTimeMul(otps, dtps);
   if (ext_fmt.is(ExternalFormat.NS2)) NS2Movement.toNS2(movement, _out, timeMul);
   else ONEMovement.toONE(movement, _out, timeMul, interval, maxTime);
 }
예제 #2
0
 @Override
 protected void run() throws Exception {
   final MovementTrace movement =
       _store.newTrace(graph_options.get(GraphOptions.MOVEMENT), MovementTrace.class, force);
   final IdGenerator id_gen =
       (use_id_map) ? new IdMap.Writer(min_id) : new OffsetIdGenerator(min_id);
   switch (ext_fmt) {
     case NS2:
       NS2Movement.fromNS2(
           movement,
           _in,
           maxTime,
           timeMul,
           ticsPerSecond,
           offset,
           fix_pause_times,
           initStateTime,
           id_gen);
       break;
     case ONE:
       ONEMovement.fromONE(movement, _in, maxTime, timeMul, ticsPerSecond, offset, id_gen);
       break;
   }
 }