Beispiel #1
0
 private com.relteq.sirius.jaxb.Scenario restoreScenario(Scenarios db_scenario)
     throws SiriusException {
   if (null == db_scenario) return null;
   com.relteq.sirius.jaxb.Scenario scenario = factory.createScenario();
   scenario.setId(id2str(db_scenario.getId()));
   scenario.setName(db_scenario.getName());
   scenario.setDescription(db_scenario.getDescription());
   try {
     scenario.setSettings(restoreSettings(db_scenario));
     scenario.setNetworkList(restoreNetworkList(db_scenario));
     scenario.setSignalList(restoreSignalList(db_scenario.getSignalSets()));
     scenario.setSensorList(restoreSensorList(db_scenario.getSensorSets()));
     scenario.setInitialDensitySet(restoreInitialDensitySet(db_scenario.getInitialDensitySets()));
     scenario.setWeavingFactorSet(restoreWeavingFactorSet(db_scenario.getWeavingFactorSets()));
     scenario.setSplitRatioProfileSet(
         restoreSplitRatioProfileSet(db_scenario.getSplitRatioProfileSets()));
     scenario.setDownstreamBoundaryCapacityProfileSet(
         restoreDownstreamBoundaryCapacity(
             db_scenario.getDownstreamBoundaryCapacityProfileSets()));
     scenario.setEventSet(restoreEventSet(db_scenario.getEventSets()));
     scenario.setDemandProfileSet(restoreDemandProfileSet(db_scenario.getDemandProfileSets()));
     scenario.setControllerSet(restoreControllerSet(db_scenario.getControllerSets()));
     scenario.setFundamentalDiagramProfileSet(
         restoreFundamentalDiagramProfileSet(db_scenario.getFundamentalDiagramProfileSets()));
     scenario.setNetworkConnections(
         restoreNetworkConnections(db_scenario.getNetworkConnectionSets()));
     scenario.setDestinationNetworks(restoreDestinationNetworks(db_scenario));
     scenario.setRoutes(restoreRoutes(db_scenario));
   } catch (TorqueException exc) {
     throw new SiriusException(exc);
   }
   return scenario;
 }