Compare commits
No commits in common. "master" and "Gerardo/ModosViaje" have entirely different histories.
master
...
Gerardo/Mo
|
|
@ -449,13 +449,6 @@ int Colv_limp::pon_config(char *config_)
|
|||
break;
|
||||
|
||||
}
|
||||
else if (strstr(token, OliviaDef::GeneralDef::GG_senAmb))
|
||||
{
|
||||
if (!olv->dame_param(token, &sentido_ambitos))
|
||||
break;
|
||||
//sentido_ambitos = 0;
|
||||
}
|
||||
|
||||
else if (strstr(token, OliviaDef::GeneralDef::GG_conj))
|
||||
{
|
||||
if (!olv->dame_param(token, (int*)&revisa_conju))
|
||||
|
|
@ -936,19 +929,6 @@ void Colv_limp::dame_cost(double ltot, int ia, float *cost, float *cost2)
|
|||
ancho=ancho_via;
|
||||
|
||||
*cost2=*cost=(float)(ltot*ancho*3600/t_tto); //en segundos
|
||||
|
||||
if (*cost2 > 10000)
|
||||
{
|
||||
*cost2 = *cost2;
|
||||
}
|
||||
if (sentido_ambitos == 1)
|
||||
{
|
||||
//revisa si el segmento es solo de entrada o solo de salida
|
||||
if (iaso[ia].flgs & OLV_LIMP_FLG_CIRC_FT)
|
||||
*cost2 = (float)MAYUSCULO;
|
||||
else if (iaso[ia].flgs & OLV_LIMP_FLG_CIRC_TF)
|
||||
*cost = (float)MAYUSCULO;
|
||||
}
|
||||
}
|
||||
else if(tipo_ambit==OLV_AMB_PUN)
|
||||
{
|
||||
|
|
@ -964,14 +944,6 @@ void Colv_limp::dame_cost(double ltot, int ia, float *cost, float *cost2)
|
|||
{
|
||||
//coste fijo para los segmentos
|
||||
*cost2 = *cost = 0;// (float)(ltot / (3 * OLV_KMH2MS));//OLV_LIMP_COST_SEGM
|
||||
if (sentido_ambitos == 1)
|
||||
{
|
||||
//revisa si el segmento es solo de entrada o solo de salida
|
||||
if (iaso[ia].flgs & OLV_LIMP_FLG_CIRC_FT)
|
||||
*cost2 = (float)MAYUSCULO;
|
||||
else if (iaso[ia].flgs & OLV_LIMP_FLG_CIRC_TF)
|
||||
*cost = (float)MAYUSCULO;
|
||||
}
|
||||
}
|
||||
else if(iaso[ia].flgs & OLV_LIMP_FLG_PEAT_REP)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,8 +44,6 @@ public:
|
|||
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 sentido_ambitos; ///asigna sentido a los abmbitos si =1 si =0 no
|
||||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -278,8 +278,6 @@ typedef struct Info_aso2
|
|||
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
|
||||
int refe3; //en los ámbitos lineales, su segmento inicial, el que está en su punto 0.
|
||||
//En los segmentos, la nw a la que está enganchado
|
||||
int refe; //referencia en la carto a ese elemento
|
||||
int iamb; //índice al ámbito que es
|
||||
union
|
||||
|
|
@ -298,7 +296,7 @@ typedef struct Info_aso2
|
|||
{
|
||||
flgs=0;
|
||||
iamb=-1;
|
||||
inod[0]=inod[1]=oid=refe2=refe=refe3=-1;
|
||||
inod[0]=inod[1]=oid=refe2=refe=-1;
|
||||
inf_r.id=inf_n.nomb=0;
|
||||
inf_n.velo=inf_l.ancho=inf_r.kg=-1;
|
||||
inf_r.uds=0;
|
||||
|
|
|
|||
|
|
@ -1748,8 +1748,6 @@ BOOL Colv_limp_thr::replica_doble_sent(Info_inw_dmin *inww_ord)
|
|||
info_aux.refe=ientcp.entity()->ref;
|
||||
//copia la velo y el nombre
|
||||
info_aux.inf_n.velo=olv_limp->iaso[refnw].inf_n.velo;
|
||||
info_aux.velReal = olv_limp->iaso[refnw].velReal;
|
||||
|
||||
info_aux.inf_n.nomb = (char*)malloc(strlen(olv_limp->iaso[refnw].inf_n.nomb)+1);
|
||||
if(!info_aux.inf_n.nomb)
|
||||
break;
|
||||
|
|
@ -1847,11 +1845,17 @@ BOOL Colv_limp_thr::une_amb_nw(int soloi)
|
|||
int KK,i,refamb,k;
|
||||
CartoBaseInfoEntity iamb;
|
||||
BOOL comp_lejos,modo_ejes=FALSE;
|
||||
|
||||
comp_lejos=(olv_limp->res_circ<OLV_RES_RECOGER_SOLO_LADO_Y_GIROS) && ((olv_limp->uds_tto!=OliviaDef::GeneralDef::OlvTipTtoMh_eje) &&
|
||||
(olv_limp->uds_tto!=OliviaDef::GeneralDef::OlvTipTtoM2h_eje));
|
||||
|
||||
|
||||
//si es tipo ejes, lo hace de otra forma
|
||||
modo_ejes = (olv_limp->uds_tto == OliviaDef::GeneralDef::OlvTipTtoMh_eje) ||
|
||||
(olv_limp->uds_tto == OliviaDef::GeneralDef::OlvTipTtoM2h_eje);
|
||||
comp_lejos=(olv_limp->res_circ<OLV_RES_RECOGER_SOLO_LADO_Y_GIROS) && modo_ejes;
|
||||
|
||||
if((olv_limp->uds_tto==OliviaDef::GeneralDef::OlvTipTtoMh_eje) ||
|
||||
(olv_limp->uds_tto==OliviaDef::GeneralDef::OlvTipTtoM2h_eje))
|
||||
{
|
||||
modo_ejes=TRUE;
|
||||
}
|
||||
//////////////////
|
||||
//coge el factor del tipo de ámbito, 1 si es puntual, 2 si es lineal
|
||||
KK=olv_limp->tipo_ambit;
|
||||
|
|
@ -1974,86 +1978,6 @@ BOOL Colv_limp_thr::une_amb_nw(int soloi)
|
|||
}
|
||||
}
|
||||
|
||||
//*************************************************//
|
||||
/*Revisa si tiene que ponerle sentido de entrada o salida a los segmentos de unión, para respetar que
|
||||
trabaje los ámbitos en el mismo sentido que la calle
|
||||
Solo aplicable a ámbitos lineales*/
|
||||
if (!(olv_limp->sentido_ambitos == 1 && KK == OLV_AMB_LIN))
|
||||
return TRUE;
|
||||
//Revisa sentidos
|
||||
int refsegini=-1, refsegfin=-1;
|
||||
int nent = olv_limp->carto.getNumberEntities();
|
||||
int refnw=-1;
|
||||
CartoBaseInfoEntity ientseg;
|
||||
CartoBaseInfoEntity ientnw;
|
||||
double *pto0nw, *ptoNamb;
|
||||
bool nwder = false, ambder = false;
|
||||
//Bucle por cada ámbito
|
||||
for (i = 0; i < olv_limp->n_amb && !pirate; i++)
|
||||
{
|
||||
iamb = olv_limp->carto.getEntity(i);
|
||||
refamb = iamb.entity()->ref;
|
||||
//busca su segmento inicial
|
||||
refsegini = olv_limp->iaso[refamb].refe3;
|
||||
if (refsegini<0 || refsegini>nent)
|
||||
continue;
|
||||
ientseg= olv_limp->carto.getRef(refsegini);
|
||||
refsegfin = olv_limp->iaso[refsegini].refe3;
|
||||
//busca la inw donde está apuntado
|
||||
refnw = olv_limp->inww_amb[i].refnw;
|
||||
ientnw= olv_limp->carto.getRef(refnw);
|
||||
//coge el punto anterior de la nw
|
||||
pto0nw = ientnw.getPto(olv_limp->inww_amb[i].ip);
|
||||
// coge el punto siguiente del ámbito
|
||||
ptoNamb = iamb.getPto(1);
|
||||
nwder = false;
|
||||
ambder = false;
|
||||
nwder = GeometryFunction::IsDer(&ientseg, pto0nw, 0, 1);
|
||||
ambder = GeometryFunction::IsDer(&ientseg, ptoNamb, 0, 1);
|
||||
if((nwder && ambder) || (!nwder && !ambder))
|
||||
{
|
||||
//están al mismo lado el punto from de la nw y el final del ámbito
|
||||
if ((olv_limp->iaso[refnw].flgs & OLV_LIMP_FLG_CIRC_FT) ||
|
||||
(!(olv_limp->iaso[refnw].flgs & (OLV_LIMP_FLG_CIRC_FT | OLV_LIMP_FLG_CIRC_TF)) && olv_limp->iaso[refamb].flgs & OLV_LIMP_FLG_DER))
|
||||
{
|
||||
//el segmento es solo salida, sentido TF, porque el T es el 1 y el F es el 0, que es el que coincide con la carto
|
||||
olv_limp->iaso[refsegini].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
olv_limp->iaso[refsegfin].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
olv_limp->iaso[refamb].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
}
|
||||
else
|
||||
{
|
||||
//el segmento es solo entrada, sentido FT
|
||||
olv_limp->iaso[refsegini].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
olv_limp->iaso[refsegfin].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
olv_limp->iaso[refamb].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//están a distinto lado
|
||||
//están a distinto lado el punto from de la nw y el final del ámbito
|
||||
if ((olv_limp->iaso[refnw].flgs & OLV_LIMP_FLG_CIRC_FT) ||
|
||||
(!(olv_limp->iaso[refnw].flgs & (OLV_LIMP_FLG_CIRC_FT | OLV_LIMP_FLG_CIRC_TF)) && olv_limp->iaso[refamb].flgs & OLV_LIMP_FLG_DER))
|
||||
{
|
||||
//el segmento es solo entrada, sentido FT, porque el T es el 1 y el F es el 0, que es el que coincide con la carto
|
||||
olv_limp->iaso[refsegini].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
olv_limp->iaso[refsegfin].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
olv_limp->iaso[refamb].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
}
|
||||
else
|
||||
{
|
||||
//el segmento es solo salida, sentido TF
|
||||
olv_limp->iaso[refsegini].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
olv_limp->iaso[refsegfin].flgs |= OLV_LIMP_FLG_CIRC_FT;
|
||||
olv_limp->iaso[refamb].flgs |= OLV_LIMP_FLG_CIRC_TF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//*************************************************//
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
//*************************************************************************************
|
||||
|
|
@ -2456,7 +2380,7 @@ fin:
|
|||
void Colv_limp_thr::add_uniones_obj(int i_amb)
|
||||
{
|
||||
double ptos[2][3];
|
||||
int refamb,nptos,KK, refnw,npt_amb, refsegini;
|
||||
int refamb,nptos,KK, refnw,npt_amb;
|
||||
CartoBaseInfoEntity ientamb,ientnw,ientseg;
|
||||
CartoLine ptos_aux;
|
||||
INT64 ff;
|
||||
|
|
@ -2541,21 +2465,7 @@ void Colv_limp_thr::add_uniones_obj(int i_amb)
|
|||
info_aux.flgs=ff;
|
||||
info_aux.refe=ientseg.entity()->ref;
|
||||
info_aux.refe2=ientamb.entity()->ref;
|
||||
info_aux.refe3 = refnw;
|
||||
olv_limp->iaso[info_aux.refe]=info_aux;
|
||||
if (k == 0)
|
||||
{
|
||||
//apunta la refe3 del ámbito al primer segmento,el que está unido a su punto 0
|
||||
//solo aplicable a ámbitos lineales
|
||||
olv_limp->iaso[refamb].refe3 = info_aux.refe;
|
||||
refsegini = info_aux.refe;
|
||||
}
|
||||
else
|
||||
{
|
||||
//apunta la refe3 del segmento inicial al segmento final
|
||||
if(refsegini>0 && refsegini< olv_limp->iaso.size())
|
||||
olv_limp->iaso[refsegini].refe3 = info_aux.refe;
|
||||
}
|
||||
|
||||
if(inww->inw_old)//ojo
|
||||
{
|
||||
|
|
@ -4930,20 +4840,15 @@ void Colv_limp_thr::calcula_cost_amb_sub(int ithr)
|
|||
if(na==i)
|
||||
{
|
||||
//el coste de un ámbito a sí mismo es el de trabajar ese ámbito
|
||||
float faux = olv_limp->cost_conj[olv_limp->iaso[ref_na].inod[1]][olv_limp->iaso[ref_na].inod[0]];
|
||||
olv_limp->cost_amb[amb_na][amb_na]=olv_limp->cost_conj[olv_limp->iaso[ref_na].inod[0]][olv_limp->iaso[ref_na].inod[1]];
|
||||
if (olv_limp->cost_amb[amb_na][amb_na] > faux)
|
||||
{
|
||||
olv_limp->cost_amb[amb_na][amb_na] = faux;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
//todo costes
|
||||
|
||||
if(olv_limp->cost_amb[amb_i][amb_na]>costes_nodos[olv_limp->iaso[ref_i].inod[0]].dis)
|
||||
olv_limp->cost_amb[amb_i][amb_na]=costes_nodos[olv_limp->iaso[ref_i].inod[0]].dis;
|
||||
olv_limp->cost_amb[amb_i][amb_na]=costes_nodos[olv_limp->iaso[ref_i].inod[1]].dis;
|
||||
if(KK==OLV_AMB_LIN)
|
||||
{
|
||||
if(olv_limp->cost_amb[amb_i][amb_na]>costes_nodos[olv_limp->iaso[ref_i].inod[1]].dis)
|
||||
if(olv_limp->cost_amb[amb_i][amb_na]>costes_nodos[olv_limp->iaso[ref_i].inod[0]].dis)
|
||||
olv_limp->cost_amb[amb_i][amb_na]=costes_nodos[olv_limp->iaso[ref_i].inod[1]].dis;
|
||||
}
|
||||
}
|
||||
|
|
@ -8432,11 +8337,7 @@ BOOL Colv_limp_thr::genera_planif_aux(int is, Info_sec *ss, Info_planif *pp, int
|
|||
if(!ambs_sec)
|
||||
return FALSE;
|
||||
memset(ambs_sec,0,ss->namb);
|
||||
double velo;
|
||||
if (olv_limp->v_despl == 0)
|
||||
velo = OLV_LIMP_VELO_CIRC_NW * OLV_KMH2MS;
|
||||
else
|
||||
velo = olv_limp->v_despl;
|
||||
|
||||
//bucle para cada conjunción de la secuencia
|
||||
for(i=0;i<nsecu-1 && !sal;i++)
|
||||
{
|
||||
|
|
@ -8502,16 +8403,10 @@ BOOL Colv_limp_thr::genera_planif_aux(int is, Info_sec *ss, Info_planif *pp, int
|
|||
{
|
||||
tp=OLV_PLAN_TIP_NW; //es la segunda vez que pasa por ahí
|
||||
dt=OLV_DESP;
|
||||
|
||||
|
||||
cost=ltot/ velo;
|
||||
cost=ltot/olv_limp->v_despl;
|
||||
}
|
||||
else
|
||||
{
|
||||
float faux= olv_limp->cost_conj[secu[i+1]][secu[i]];
|
||||
if (cost > faux)
|
||||
cost = faux;
|
||||
//cost = olv_limp->cost_conj[secu[i]][secu[i + 1]];
|
||||
{
|
||||
///////////////////////////////////
|
||||
if(olv_limp->iaso[ref_j].flgs & OLV_LIMP_FLG_AMB_PEAT)
|
||||
tp=OLV_PLAN_TIP_AMB_PEAT;
|
||||
|
|
@ -8554,7 +8449,7 @@ BOOL Colv_limp_thr::genera_planif_aux(int is, Info_sec *ss, Info_planif *pp, int
|
|||
//en info0 se ha guardado la peatonal original
|
||||
ref_nw=olv_limp->inww_amb[amb_j+!sdire*olv_limp->n_amb].refnw;
|
||||
dt=OLV_DESP;
|
||||
cost=ltot/ velo;
|
||||
cost=ltot/olv_limp->v_despl;
|
||||
}
|
||||
else//es carretera
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,8 +82,8 @@ MAINICON ICON "favicon.ico"
|
|||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 4,2,2,0
|
||||
PRODUCTVERSION 4,2,2,0
|
||||
FILEVERSION 4,0,0,0
|
||||
PRODUCTVERSION 4,0,0,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", "4.2.2.0"
|
||||
VALUE "FileVersion", "4.0.0.0"
|
||||
VALUE "InternalName", "OliviaTasks"
|
||||
VALUE "LegalCopyright", "OLIVIA (c) VSM 2020. All rights reserved."
|
||||
VALUE "OriginalFilename", "OliviaTasks.exe"
|
||||
VALUE "ProductName", "OliviaTasks"
|
||||
VALUE "ProductVersion", "4.2.2.0"
|
||||
VALUE "ProductVersion", "4.0.0.0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace OliviaDef
|
|||
public const int ProgrMax = 100;
|
||||
public const int ProgrStep = 5;
|
||||
public const int ParamN = 5;
|
||||
public const int ParamLimpN = 50;
|
||||
public const int ParamLimpN = 49;
|
||||
public const int ParamRecoN = 47;
|
||||
/*
|
||||
* Define el separador entre parámetros de la llamada al proceso oliviatasks
|
||||
|
|
@ -165,8 +165,6 @@ namespace OliviaDef
|
|||
public const string GG_topo = "reviTopo";
|
||||
public const string GG_conj = "reviConj";
|
||||
public const string GG_angu = "reviAng";
|
||||
public const string GG_senAmb = "sentAmb";
|
||||
|
||||
/**
|
||||
* Define las propiedades de limpieza a enviar a oliviatasks
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue