if (!file_exists('./db/plots/' . $v . '-' . $modif . '-' . $wlanes . '-' . $nbsensors . '-' . $propagation . '-' . $ntype . '-freq.png')) { $gogogo = true; } } } if (!$bool_frequence && !file_exists($plot_file_png . ".png") || $bool_frequence && $gogogo) { if ($boolhisto) { @unlink($plot_file_dat . ".dat"); $pfich = fopen($plot_file_dat . ".dat", 'a'); } foreach ($osmlist as $v) { if (!file_exists("./db/nets/{$v}.net.xml")) { shell_exec(SUMO_HOME . "/bin/netconvert --osm-files " . $absolute_path . "db/uploads/{$v} --osm.skip-duplicates-check false --keep-edges.postload true --geometry.remove --remove-edges.isolated --remove-edges.by-type highway.residential,highway.service,highway.unclassified,highway.living_street,highway.track,highway.pedestrian,highway.bus_guideway,highway.raceway,highway.footway,highway.bridleway,highway.steps,highway.path,highway.cycleway,highway.proposed,highway.construction,highway.escape,highway.emergency,highway.services,highway.phone,highway.emergency_access_point,highway.crossing,highway.bus_stop --remove-edges.by-vclass private,public_transport,public_emergency,public_authority,public_army,vip,ignoring,passenger,hov,taxi,bus,delivery,transport,lightrail,cityrail,rail_slow,rail_fast,motorcycle,bicycle,pedestrian --tls.join --junctions.join --junctions.join-dist 25 --tls.join-dist 25 --no-turnarounds --no-internal-links --no-turnarounds.tls -o " . $absolute_path . "db/nets/{$v}.net.xml > /dev/null 2>>" . $absolute_path . "logs/_errors.log"); } if (!file_exists("./db/data/{$v}-junctions.data") || !file_exists("./db/data/{$v}-edges.data")) { parse_net($v); } if (!file_exists("./db/output/{$v}-{$modif}-{$wlanes}-{$nbsensors}-{$propagation}.csv")) { shell_exec("export SUMO_HOME=" . SUMO_HOME . " && " . PYTHON . " py/launch.py --identifiant {$v} --modif {$modif} --propagation {$propagation} --nbsensors {$nbsensors} --wlanes {$wlanes} > " . $absolute_path . "logs/{$v}.log 2>>" . $absolute_path . "logs/_errors.log"); } if (!file_exists("./db/output/{$v}-{$modif}-{$wlanes}-{$nbsensors}-{$propagation}-{$ntype}") && $type != 4) { $paparamsup = $paramsup != "" ? " --paramsup {$paramsup}" : ""; shell_exec(PYTHON . " " . $absolute_path . "py/analysis.py --identifiant {$v} --modif {$modif} --propagation {$propagation} --nbsensors {$nbsensors} --wlanes {$wlanes} --analysistype {$type}{$paparamsup} 2>>" . $absolute_path . "logs/_errors.log"); } if ($boolhisto) { if ($type == 4) { $filehisto = "./db/output/{$v}-{$ntype}"; } else { $filehisto = "./db/output/{$v}-{$modif}-{$wlanes}-{$nbsensors}-{$propagation}-{$ntype}"; } $n = file_get_contents($filehisto);
if (isset($_GET['osm'])) { $osm = intval($_GET['osm']); } $propagation = ""; if (isset($_GET['propagation'])) { $propagation = intval($_GET['propagation']); } $nbsensors = ""; if (isset($_GET['nbsensors'])) { $nbsensors = intval($_GET['nbsensors']); } $wlanes = ""; if (isset($_GET['wlanes'])) { $wlanes = intval($_GET['wlanes']); } $modif = ""; if (isset($_GET['modif'])) { $modif = intval($_GET['modif']); } $lbackground = ""; if (isset($_GET['lbackground'])) { $lbackground = intval($_GET['lbackground']); } if (!file_exists("./db/data/{$osm}-junctions.data") || !file_exists("./db/data/{$osm}-edges.data")) { parse_net($osm); } shell_exec("export SUMO_HOME=" . SUMO_HOME . " && " . PYTHON . " py/launch.py --identifiant {$osm} --modif {$modif} --propagation {$propagation} --nbsensors {$nbsensors} --wlanes {$wlanes} > " . $absolute_path . "logs/{$osm}.log 2>>" . $absolute_path . "logs/_errors.log" . ($lbackground == 1 ? ' &' : '')); ?>