Restricciones angulos en modos de viaje

Gerardo/ModosViaje
Gerardo 2024-03-12 12:38:23 +01:00
parent f10dfbc34a
commit 431578ba46
11 changed files with 908 additions and 710 deletions

View File

@ -72,6 +72,7 @@ typedef struct PathsOlv{
char path_res_sec[MAX_PATH]; ///<Path del shp con el resultado de las entidades de los ámbitos de trabajo asociada la info de sector
char path_data[MAX_PATH]; ///<Path del shp con datos a planificar, ya filtrados e intersecados con las zonas y niveles
char path_nw[MAX_PATH]; ///<Path del shp con la red navegable
char path_nwc[MAX_PATH]; ///<Path del shp con conjunciones de la red navegable
char path_cfg_geo[MAX_PATH];
char pfin; ///<Para marcar el final de la estructura
}PathsOlv;

View File

@ -1059,11 +1059,20 @@ double Colv_geom::ang_vect(double v1[2], double v2[2])
sqrt(v2[0] * v2[0] + v2[1] * v2[1]);
if(res==0)
return 0;
res = (v1[0] * v2[0] + v1[1] * v2[1]) / res;
double pscalar = (v1[0] * v2[0] + v1[1] * v2[1]);
res = pscalar / res;
if (res > 1)
res = 1;
if (res < -1)
res = -1;
/*if (pscalar < 0)
{
res = acos(res);
if (res < 0)
return OLV_PI + res;
else
return OLV_PI - res;
}*/
return acos(res);
}
//*************************************************************************************

View File

@ -19,6 +19,7 @@ Colv_limp::Colv_limp(COlivia *olv)
nod_plant=-1;
this->olv = olv;
res_circ=OLV_RES_NO;
res_angulos = OLV_RES_NO;
npts_ctrl = 3;
uds_tto = OliviaDef::GeneralDef::OlvTipTtoNoDef;
v_despl = 5;
@ -33,7 +34,7 @@ Colv_limp::Colv_limp(COlivia *olv)
memset(coor_instal,0,3*sizeof(double));
thr_limp = new Colv_limp_thr(this);
//cost_amb=NULL;
n_nw=n_amb=0;
n_nw=n_amb= n_nwc=0;
pp=-1;
tipo_ambit=-1;
inww_amb=NULL;
@ -366,6 +367,11 @@ int Colv_limp::pon_config(char *config_)
if(!olv->dame_param(token, olv->paths.path_nw, sizeof(olv->paths.path_nw)))
break;
}
else if (strstr(token, OliviaDef::GeneralDef::GG_pnc))
{
if (!olv->dame_param(token, olv->paths.path_nwc, sizeof(olv->paths.path_nwc)))
break;
}
//los campos a leer de la dbf
else if(strstr(token,OliviaDef::GeneralDef::GAA_obser))
{
@ -436,6 +442,18 @@ int Colv_limp::pon_config(char *config_)
if (!olv->dame_param(token, (int*)&revisa_topo))
break;
}
else if (strstr(token, OliviaDef::GeneralDef::GG_angu))
{
if (!olv->dame_param(token, &res_angulos))
break;
}
else if (strstr(token, OliviaDef::GeneralDef::GG_conj))
{
if (!olv->dame_param(token, (int*)&revisa_conju))
break;
}
//los campos a leer de la dbf de la red navegable
/*else if (strstr(token, OliviaDef::GeneralDef::GTC_onew))
@ -730,10 +748,8 @@ BOOL Colv_limp::guarda_campos_ini(char *path)
}
//*************************************************************************************
#define NOMB_CAMP_CONJ_TO "T_JNCTID"
#define NOMB_CAMP_CONJ_FROM "F_JNCTID"
#define NOMB_CAMP_ELEV_TO "T_ELEV"
#define NOMB_CAMP_ELEV_FROM "F_ELEV"
#define NOMB_CAMP_ELEV_TO "_elev_t"
#define NOMB_CAMP_ELEV_FROM "_elev_f"
/**
* Rellena los nombres de los campos de la dbf
*/
@ -745,10 +761,11 @@ void Colv_limp::rellena_campos()
sprintf_s(camps.campo_velo,OLV_LIMP_MAX_CAMP,"_vel");
sprintf_s(camps.campo_fow,OLV_LIMP_MAX_CAMP,"_pea");
sprintf_s(camps.campo_name,OLV_LIMP_MAX_CAMP,"_dir");
sprintf_s(camps.campo_name, OLV_LIMP_MAX_CAMP, "_evita");
sprintf_s(camps.campo_evi, OLV_LIMP_MAX_CAMP, "_evita");
sprintf_s(camps.campo_ang, OLV_LIMP_MAX_CAMP, "_angulo");
//TOM TOM ELEV
sprintf_s(camps.campo_conj_to, OLV_LIMP_MAX_CAMP, NOMB_CAMP_CONJ_TO);
sprintf_s(camps.campo_conj_from, OLV_LIMP_MAX_CAMP, NOMB_CAMP_CONJ_FROM);
sprintf_s(camps.campo_elev_to, OLV_LIMP_MAX_CAMP, NOMB_CAMP_ELEV_TO);
sprintf_s(camps.campo_elev_from, OLV_LIMP_MAX_CAMP, NOMB_CAMP_ELEV_FROM);

View File

@ -35,13 +35,15 @@ public:
int pp; ///<Entero para pruebas
int tipo_ambit; ///<Indica si los ámbitos son lineales o puntuales
int n_amb; ///<Número de entidades de ámbitos, la cuenta empieza en 0 porque es la primera capa que se carga
int n_nw; ///<Número de entidades de la red navegable, la cuenta empieza en ini_nw porque no es la primera que se carga
int n_nw; ///<Número de entidades de la red navegable, la cuenta empieza en n_amb porque no es la primera que se carga
int n_nwc; ///<Número de entidades de las conjunciones de la red navegable, la cuenta empieza en ini_nw porque no es la primera que se carga
int uds_tto; ///<Unidades de tratamiento: m/h, m2/h, min
int npts_ctrl; ///<Número de puntos de control
int nsec; ///<Número de sectores
int nsec_act; ///<Número de sectores activos, siempre <= que nsec
int nsec_orig; ///<Número de sectores original, se usa por si se corrige el num de sectores porque haya alguno vacío
int res_circ; ///<Restricción de circulación
int res_angulos; ///<Restricción de angulos
int lateral; ///<Lateralidad, 0 o -1 ambos, 1 derecha, 2 izda
int tipo_shp_viaj; ///<Indica la forma en que se guardan los viajes según la enum TipoViajes
int t_sal; ///<Tiempo de salida/llegada a la instalación, en segundos
@ -52,6 +54,7 @@ public:
BOOL usa_secuen;
BOOL revisa_elev;
BOOL revisa_topo;
BOOL revisa_conju;
double f_trafic; ///<Factor de reducción de la velocidad en calles por el tráfico en tanto por 1
double calc_nsec; ///<Indica si el número de sectores es calculado (almacena el coste del sector) o impuesto (0)
@ -88,6 +91,7 @@ public:
Info_inw_dmin *inww_amb; ///<Array de Namb que almacena la carretera más cercana al punto inicial y al final (Nambx2)
///<del ámbito si es lineal o la más cercana si es puntual. La rellena el thread.
CartoBase carto;
CartoBase cartoAux;
std::map<int,Info_aso2> iaso; ///<Map con mismos elementos que entidades la carto, con la información asociada
std::vector<Info_tramos> *tramos;

View File

@ -262,6 +262,8 @@ typedef struct Info_aso_reco
typedef struct Info_aso2
{
INT64 flgs; //flags
float velReal;
float angulo;
int inod[2]; //índice a los nodos ini y final de la entidad
int oid; //objetct id de la carto
int refe2; //en los segmentos o replicadas, el ámbito original
@ -287,6 +289,7 @@ typedef struct Info_aso2
inf_r.id=inf_n.nomb=0;
inf_n.velo=inf_l.ancho=inf_r.kg=-1;
inf_r.uds=0;
angulo = 0;
};
void del()
{
@ -441,9 +444,8 @@ typedef struct Campos_dbf
char campo_name[OLV_LIMP_MAX_CAMP];
char campo_fow[OLV_LIMP_MAX_CAMP];
char campo_evi[OLV_LIMP_MAX_CAMP];
char campo_ang[OLV_LIMP_MAX_CAMP];
//ELEV TOM TOM
char campo_conj_to[OLV_LIMP_MAX_CAMP];
char campo_conj_from[OLV_LIMP_MAX_CAMP];
char campo_elev_to[OLV_LIMP_MAX_CAMP];
char campo_elev_from[OLV_LIMP_MAX_CAMP];
/////////////////////////////////////////////

File diff suppressed because it is too large Load Diff

View File

@ -157,6 +157,7 @@ public:
//Unión de ámbitos a la red navegable
BOOL une_amb_nw(int soloi=-1);
BOOL corrije_topo_nw();
BOOL corrije_conjunciones_nw();
int is_dmin(double daux, Info_inw_dmin *inww);
BOOL busca_inw_dmin(int i_amb);
BOOL busca_inw_dmin_ejes(int i_amb);
@ -189,6 +190,8 @@ public:
BOOL calcula_ang_conj();
void calcula_ang_conj_sub(int ithr);
double dame_ang_conj(int ic, int i, int j);
double dame_ang_conj2(int ic, int i, int j);
BOOL calcula_ang_conj_fin();
void revisa_calles_cortadas();

View File

@ -84,6 +84,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCm
app->archi.rellena_dirs_ejecucion();
strcpy_s(strtem,MAX_PATH,app->archi.path_ejecutable);
Cdir_manager::dir_anterior(strtem);
//Cdir_manager::dir_anterior(app->archi.path_ejecutable);
sprintf(lic.dirLic,"%s\\", strtem);
sprintf(lic.dirTemp,"%s\\", app->log.path);
if(!lic.cargaLicencia(NULL,NOMBRE_PRODUCTO))

View File

@ -82,8 +82,8 @@ MAINICON ICON "favicon.ico"
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,1,6,0
PRODUCTVERSION 3,1,6,0
FILEVERSION 3,1,7,0
PRODUCTVERSION 3,1,7,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -100,12 +100,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "VSM"
VALUE "FileDescription", "Launcher de la aplicación Olivia"
VALUE "FileVersion", "3.1.6.0"
VALUE "FileVersion", "3.1.7.0"
VALUE "InternalName", "OliviaTasks"
VALUE "LegalCopyright", "OLIVIA (c) VSM 2020. All rights reserved."
VALUE "OriginalFilename", "OliviaTasks.exe"
VALUE "ProductName", "OliviaTasks"
VALUE "ProductVersion", "3.1.6.0"
VALUE "ProductVersion", "3.1.7.0"
END
END
BLOCK "VarFileInfo"

View File

@ -13,7 +13,7 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LocalDebuggerWorkingDirectory>..\bin\$(IntDir)</LocalDebuggerWorkingDirectory>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
<LocalDebuggerCommand>C:\Desa\v2017\Olivia\bin\$(IntDir)$(TargetFileName)</LocalDebuggerCommand>
<LocalDebuggerCommand>$(TargetPath)</LocalDebuggerCommand>
<LocalDebuggerCommandArguments>/tipo:1 /ip:192.168.2.61 /port:19995 /tout:20 /path_temp:D:\Proyectos\Olivia\Instal3.0\temp\ /path_cfgeo: /debug</LocalDebuggerCommandArguments>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">

View File

@ -51,8 +51,8 @@ namespace OliviaDef
public const int ProgrMax = 100;
public const int ProgrStep = 5;
public const int ParamN = 5;
public const int ParamLimpN = 46;
public const int ParamRecoN = 44;
public const int ParamLimpN = 49;
public const int ParamRecoN = 47;
/*
* Define el separador entre parámetros de la llamada al proceso oliviatasks
*/
@ -142,6 +142,7 @@ namespace OliviaDef
public const string GG_pt = "path_temp";
public const string GG_pd = "path_data";
public const string GG_pn = "path_nw";
public const string GG_pnc = "path_cnw";
public const string GG_pcar = "path_cart";
public const string GG_pcfg = "path_cfgeo";
public const string GG_strtto = "str_tto";
@ -162,7 +163,8 @@ namespace OliviaDef
public const string GG_ais = "aislados";
public const string GG_elev = "elevacion";
public const string GG_topo = "reviTopo";
public const string GG_conj = "reviConj";
public const string GG_angu = "reviAng";
/**
* Define las propiedades de limpieza a enviar a oliviatasks
*/