76 lines
2.5 KiB
C++
76 lines
2.5 KiB
C++
#pragma once
|
|
#ifdef OLIVIA_COMPILA
|
|
#include "olv_limp_def.h"
|
|
#include "olv_limp_thr.h"
|
|
//#include "vector.h"
|
|
|
|
/**
|
|
* @file olv_reco_thr.h
|
|
* Archivo de definiciones del thread de control de la utilidad de recogida de residuos del programa Olivia.
|
|
*/
|
|
class Colv_reco;
|
|
struct Info_conjs;
|
|
|
|
/////////////////////////
|
|
/**
|
|
* Clase del thread de control de la utilidad de recogida de residuos del programa Olivia.
|
|
*/
|
|
class Colv_reco_thr : public Colv_limp_thr
|
|
{
|
|
public:
|
|
//*************************************************************************************
|
|
enum Ev_olv_reco_thr
|
|
{
|
|
OLV_RECO_EV_SENS = Colv_limp_thr::OLV_LIMP_EV_N,
|
|
OLV_RECO_EV_SENS_SUB,
|
|
OLV_RECO_EV_SENS_FIN,
|
|
OLV_RECO_EV_N
|
|
}Ev_olv_reco_thr;
|
|
|
|
//*************************************************************************************
|
|
//Variables
|
|
Colv_reco *olv_reco;
|
|
|
|
//*************************************************************************************
|
|
//Constructor
|
|
Colv_reco_thr(Colv_reco *olv_reco);
|
|
~Colv_reco_thr(void);
|
|
|
|
//*************************************************************************************
|
|
//Funciones
|
|
void inicia_th();
|
|
static void cola_proc(int evento,OlvAsync_cola<Param_olv_limp_thr> *clase,Param_olv_limp_thr *e);
|
|
void lanza_subthrs(int tar, int nthr_def=-1);
|
|
|
|
/////////////////////
|
|
BOOL rellena_datos();
|
|
BOOL pide_info_sens();
|
|
void pide_info_sens_sub(int ithr);
|
|
BOOL pide_info_sens_fin(int nno);
|
|
|
|
//calcular el nodo de la planta
|
|
BOOL pon_nodos_planta(double pt[3]);
|
|
BOOL busca_conjs_planta(double pt[3], int *nod);
|
|
BOOL calcula_cost_plant();
|
|
|
|
//costes para planificación
|
|
double dame_cost_jornada();
|
|
double dame_coste( Secu_amb * sec, int ini, int fin, Info_sec *s, BOOL ind_abs);
|
|
void planifica_sub_1(int ithr, Matrix2d<float> &cost_amb);
|
|
double dame_coste_pon_viajes( Secu_amb * sec, int ini, int fin, Info_sec *s, int *nvac);
|
|
|
|
//Funciones para informes de planificación
|
|
BOOL genera_planif_vaci(int is, int ini, int fin, int *secu, int tip_viaje);
|
|
BOOL genera_list_fila_vaci(Colv_csv *cc, char *fila0, int ielem, int isec, int secu, double tt, double *t0,BOOL is_fin);
|
|
void quita_t_ult_desc(int s, double *t);
|
|
BOOL guarda_cols_ruta(char *path_shp);
|
|
void pon_t_desp(Info_sec *s, Secu_amb *sec);
|
|
BOOL comprueba_descarg(int iamb);
|
|
void dame_observ_cont(int iamb, char *observ);
|
|
BOOL guarda_cols_insta(char *path_shp);
|
|
void pon_ptos_ctrl(Info_planif *pp, int npt_ctrl, double cost_ctrl);
|
|
void rellena_tramos();
|
|
BOOL guarda_cols_ruta_tram(char *path_shp);
|
|
int rellena_insta_tramos();
|
|
};
|
|
#endif |