- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

# AKIProxie.h

    00001 //DO NOT MODIFIE THIS FILE
    00002 #ifndef _AKIProxie_h_
    00003 #define _AKIProxie_h_
    00004
    00005 #define TDMAXNAMLEN     32
    00006
    00007 // .......................................
    00008 //              INFORMATION OF VMS AND MANAGE THEM
    00009 // .......................................
    00010
    00011 #define AKIVmsUnknownPanel              -3001
    00012 #define AKIVmsUnknownMessage            -3002
    00013 #define AKIVmsIndexNotValid             -3003
    00014
    00015 int     AKIVmsGetNumberVMS();
    00016 char    *AKIVmsGetNameVMS(int elem);
    00017 int     AKIVmsGetIdVMS(int elem);
    00018 int     AKIVmsGetNumberMessagesVMS(char *NameVms);
    00019 int     AKIVmsGetNumberMessagesVMSbyId(int idVms);
    00020 char    *AKIVmsGetMessageVMS(char *NameVms, int elem);
    00021 char    *AKIVmsGetMessageVMSbyId(int idVms, int elem);
    00022 int     AKIVmsActiveMessageVMS(char *NameVms, char *Message);
    00023 int     AKIVmsActiveMessageVMSbyId(int idVms, char *Message);
    00024 char    *AKIVmsGetActiveMessageVMS(char *NameVms);
    00025 char    *AKIVmsGetActiveMessageVMSbyId(int idVms);
    00026
    00027 // .......................................
    00028 //              ACTIONS MANAGEMENT
    00029 // .......................................
    00030 #define AKIActionInvalidSection -11001
    00031 #define AKIActionInvalidVehType -11001
    00032
    00033 void * AKIActionAddSpeedAction(int sectionId, float newSpeed, char *nameVehType, float acomplianceLevel);
    00034 void * AKIActionCloseLaneAction(int sectionId, int alane, char *nameVehType);
    00035 void * AKIActionAddNextTurningODAction(int sectionId, int anextSection, int aOrigin, int aDest, char *nameVehType, float acomplianceLevel);
    00036 void * AKIActionAddNextTurningResultAction(int sectionId, int aoldNextSection, int anewNextSection, char *nameVehType, float acomplianceLevel);
    00037 void * AKIActionAddChangeDestAction(int sectionId, int anewDest, int aOrigin, int aDest, char *nameVehType, float acomplianceLevel);
    00038 void * AKIActionChangeTurningProbAction(int sectionId, int nbnewProb, int *aNextSection, float *anewProb, char *nameVehType);
    00039 void AKIActionRemoveAction(void *a2kaction);
    00040 void AKIActionReset();
    00041
    00042 // .......................................
    00043 //              INFORMATION OF GENERAL VEHICLES
    00044 // .......................................
    00045
    00046
    00047 #define AKIInfVehGetMem                         -4001
    00048 #define AKIInfVehUnknownSection         -4002
    00049 #define AKIInfIndexNotValid             -4003
    00050 #define AKIInfNotReady                          -4004
    00051 #define AKIInfVehUnknownJunction        -4005
    00052 #define AKIInfVehNotFound                       -4006
    00053 #define AKIInfVehNotAvalaible           -1
    00054
    00055
    00056 struct InfVeh{
    00057         int report;
    00058         int idVeh;
    00059         int type;
    00060         // Information in Vehicle when it is in a section
    00061         int idSection;
    00062         int numberLane;
    00063         // Information in Vehicle when it is in a junction
    00064         int idJunction;
    00065         int idSectionFrom;
    00066         int idLaneFrom;
    00067         int idSectionTo;
    00068         int idLaneTo;
    00069
    00070         float CurrentPos;
    00071         float xCurrentPos,yCurrentPos;
    00072         float xCurrentPosBack,yCurrentPosBack;
    00073         float CurrentSpeed;
    00074
    00075         float TotalDistance;
    00076
    00077         float SystemEntranceT;
    00078         float SectionEntranceT;
    00079 };
    00080
    00081 struct StaticInfVeh{
    00082         int report;
    00083         int idVeh;
    00084         int type;
    00085         char typeName[TDMAXNAMLEN+1];
    00086     float length;
    00087     float width;
    00088     float maxDesiredSpeed;
    00089     float maxAcceleration;
    00090     float normalDeceleration;
    00091     float maxDeceleration;
    00092         float speedAcceptance;
    00093         float minDistanceVeh;
    00094         float giveWayTime;
    00095         float guidanceAcceptance;
    00096         int guided;
    00097         int equiped;
    00098         int tracked;
    00099
    00100         // Information about OD
    00101     int centroidOrigin;
    00102     int centroidDest;
    00103     int idsectionExit;
    00104
    00105         // Information about PT
    00106         int idLine;
    00107
    00108 };
    00109
    00110 int                     AKIVehStateGetNbVehiclesSection(int aidSec);
    00111 InfVeh                  AKIVehStateGetVehicleInfSection(int aidSec, int indexveh);
    00112 StaticInfVeh    AKIVehGetVehicleStaticInfSection(int aidSec, int indexveh);
    00113 int                     AKIVehSetVehicleStaticInfSection(int aidSec, int indexveh, StaticInfVeh staticinfVeh);
    00114
    00115 int                     AKIVehStateGetNbVehiclesJunction(int ajunction);
    00116 InfVeh                  AKIVehStateGetVehicleInfJunction(int ajunction, int indexveh);
    00117 StaticInfVeh    AKIVehGetVehicleStaticInfJunction(int ajunction, int indexveh);
    00118 int                     AKIVehSetVehicleStaticInfJunction(int ajunction, int indexveh, StaticInfVeh staticinfVeh);
    00119
    00120 InfVeh                  AKIVehGetInf(int aidVeh);
    00121 StaticInfVeh    AKIVehGetStaticInf(int aidVeh);
    00122 int                     AKIVehSetStaticInf(int aidVeh, StaticInfVeh staticinfVeh);
    00123
    00124 int                     AKIVehGetNbVehTypes();
    00125 char                    *AKIVehGetNameVehType(int VehType);
    00126 float                   AKIVehGetMinLengthVehType(int VehType);
    00127 float                   AKIVehGetMaxLengthVehType(int VehType);
    00128
    00129 // .......................................
    00130 //              INFORMATION OF DETECTORS AND DETECTORS MEASURES
    00131 // .......................................
    00132
    00133
    00134 #define AKIDETUnknownDetector           -3010
    00135 #define AKIDETIncorrectInterval         -3011
    00136 #define AKIDETMeasureNotGathered        -3012
    00137 #define AKIDETNoAggregatedDetection -3013
    00138 #define AKIDETIncorrectTypeName         -3014
    00139 #define AKIDETNoInstantDetection        -3015
    00140
    00141 struct structA2KDetector{
    00142         int report;
    00143         int Id;                                         /*Identifier of Detector */
    00144     char Name[TDMAXNAMLEN + 1]; /*Detector Name */
    00145     int IdSection;                      /* Section Identifier where the detector is located */
    00146     int IdFirstLane;                    /* Identifier of the first lane covered by the detector */
    00147     int IdLastLane;                     /* Identifier of the last lane covered by the detector */
    00148     bool DistinguishType;               /* Capability to distinguish per Vehicle Type */
    00149     int Capabilities;           /* Byte coding the capability of the detector */
    00150     float InitialPosition;      /* Pos. donde se inicia el detec., con respecto al origen */
    00151     float FinalPosition;                /* Pos. donde finaliza el detector, con respecto al origen */
    00152 };
    00153
    00154 struct EquippedInfVeh{
    00155         int report;
    00156         float timedetected; /* Simulation time of vehicle equipped detected */
    00157         int idVeh;                      /* Vehicle Identifier of vehicle equipped detected */
    00158         int vehType;            /* Vehicle Type id of vehicle equipped detected */
    00159         char typeName[TDMAXNAMLEN+1]; /* Vehicle Type name of vehicle equipped detected */
    00160         int idptline;           /* ID Public Transport Line of vehicle equipped detected */
    00161 };
    00162
    00163
    00164 int     AKIDetGetNumberDetectors();
    00165 char    *AKIDetGetNameDetector(int nbdet);
    00166 int             AKIDetGetIdDetector(int nbdet);
    00167 structA2KDetector AKIDetGetPropertiesDetector(int nbdet);
    00168
    00169 bool    AKIDetIsCountGather(int Capability);
    00170 bool    AKIDetIsPresenceGather(int Capability);
    00171 bool    AKIDetIsSpeedGather(int Capability);
    00172 bool    AKIDetIsOccupancyGather(int Capability);
    00173 bool    AKIDetIsHeadwayGather(int Capability);
    00174 bool    AKIDetIsDensityGather(int Capability);
    00175 bool    AKIDetIsInfEquipedVehGather(int Capability);
    00176
    00177 float   AKIDetGetIntervalDetection();
    00178 float   AKIDetGetCycleInstantDetection();
    00179 int     AKIDetGetNbMeasuresAvailableInstantDetection();
    00180 float   AKIDetGetEndTimeMeasureAvailableInstantDetection(int elem);
    00181
    00182 int     AKIDetGetSCOOTOccupancyCycle(char *NameDet, char *typeName);
    00183 float   AKIDetGetFinTimeOccupedCycle(char *NameDet, int elem, char *typeName);
    00184 float   AKIDetGetIniTimeOccupedCycle(char *NameDet, int elem, char *typeName);
    00185 int     AKIDetGetNbintervalsOccupedCycle(char *NameDet, char *typeName);
    00186 int     AKIDetGetCounterCycle(char *NameDet, char *typeName);
    00187 float   AKIDetGetSpeedCycle(char *NameDet, char *typeName);
    00188 float   AKIDetGetTimeOccupedCycle(char *NameDet, char *typeName);
    00189 int     AKIDetGetPresenceCycle(char *NameDet, char *typeName);
    00190 float   AKIDetGetHeadwayCycle(char *NameDet, char *typeName);
    00191 float   AKIDetGetDensityCycle(char *NameDet, char *typeName);
    00192
    00193 int             AKIDetEnableDetectionStaticInfVehCycle(char *NameDet);
    00194 int             AKIDetDisableDetectionStaticInfVehCycle(char *NameDet);
    00195 int             AKIDetGetNbVehsInDetectionStaticInfVehCycle(char *NameDet, char *typeName);
    00196 StaticInfVeh    AKIDetGetInfVehInDetectionStaticInfVehCycle(char *NameDet, int elem, char *typeName);
    00197
    00198 int     AKIDetGetSCOOTOccupancyCyclebyId(int iddet, char *typeName);
    00199 float   AKIDetGetFinTimeOccupedCyclebyId(int iddet, int elem, char *typeName);
    00200 float   AKIDetGetIniTimeOccupedCyclebyId(int iddet, int elem, char *typeName);
    00201 int     AKIDetGetNbintervalsOccupedCyclebyId(int iddet, char *typeName);
    00202 int     AKIDetGetCounterCyclebyId(int iddet, char *typeName);
    00203 float   AKIDetGetSpeedCyclebyId(int iddet, char *typeName);
    00204 float   AKIDetGetTimeOccupedCyclebyId(int iddet, char *typeName);
    00205 int     AKIDetGetPresenceCyclebyId(int iddet, char *typeName);
    00206 float   AKIDetGetHeadwayCyclebyId(int iddet, char *typeName);
    00207 float   AKIDetGetDensityCyclebyId(int iddet, char *typeName);
    00208
    00209 int             AKIDetEnableDetectionStaticInfVehCyclebyId(int iddet);
    00210 int             AKIDetDisableDetectionStaticInfVehCyclebyId(int iddet);
    00211 int             AKIDetGetNbVehsInDetectionStaticInfVehCyclebyId(int iddet, char *typeName);
    00212 StaticInfVeh    AKIDetGetInfVehInDetectionStaticInfVehCyclebyId(int iddet, int elem, char *typeName);
    00213
    00214 int     AKIDetGetSCOOTOccupancyInstantDetection(char *NameDet, char *typeName, float endtime);
    00215 float   AKIDetGetIniTimeOccupedInstantDetection(char *NameDet, int elem, char *typeName, float endtime);
    00216 float   AKIDetGetEndTimeOccupedInstantDetection(char *NameDet, int elem, char *typeName, float endtime);
    00217 int     AKIDetGetNbintervalsOccupedInstantDetection(char *NameDet, char *typeName, float endtime);
    00218 int     AKIDetGetCounterInstantDetection(char *NameDet, char *typeName, float endtime);
    00219 float   AKIDetGetSpeedInstantDetection(char *NameDet, char *typeName, float endtime);
    00220 float   AKIDetGetTimeOccupedInstantDetection(char *NameDet, char *typeName, float endtime);
    00221 int     AKIDetGetPresenceInstantDetection(char *NameDet, char *typeName, float endtime);
    00222 float   AKIDetGetHeadwayInstantDetection(char *NameDet, char *typeName, float endtime);
    00223 float   AKIDetGetDensityInstantDetection(char *NameDet, char *typeName, float endtime);
    00224 int             AKIDetGetNbVehsInDetectionStaticInfVehInstantDetection(char *NameDet, char *typeName, float endtime);
    00225 StaticInfVeh AKIDetGetInfVehInDetectionStaticInfVehInstantDetection(char *NameDet, int elem, char *typeName, float endtime);
    00226
    00227 int     AKIDetGetSCOOTOccupancyInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00228 float   AKIDetGetIniTimeOccupedInstantDetectionbyId(int iddet, int elem, char *typeName, float endtime);
    00229 float   AKIDetGetEndTimeOccupedInstantDetectionbyId(int iddet, int elem, char *typeName, float endtime);
    00230 int     AKIDetGetNbintervalsOccupedInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00231 int     AKIDetGetCounterInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00232 float   AKIDetGetSpeedInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00233 float   AKIDetGetTimeOccupedInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00234 int     AKIDetGetPresenceInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00235 float   AKIDetGetHeadwayInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00236 float   AKIDetGetDensityInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00237 int             AKIDetGetNbVehsInDetectionStaticInfVehInstantDetectionbyId(int iddet, char *typeName, float endtime);
    00238 StaticInfVeh AKIDetGetInfVehInDetectionStaticInfVehInstantDetectionbyId(int iddet, int elem, char *typeName, float endtime);
    00239
    00240 int     AKIDetGetCounterAggregated(char *NameDet, char *typeName);
    00241 float   AKIDetGetSpeedAggregated(char *NameDet, char *typeName);
    00242 float   AKIDetGetTimeOccupedAggregated(char *NameDet, char *typeName);
    00243 int     AKIDetGetPresenceAggregated(char *NameDet, char *typeName);
    00244 float   AKIDetGetDensityAggregated(char *NameDet, char *typeName);
    00245 float   AKIDetGetHeadwayAggregated(char *NameDet, char *typeName);
    00246 int     AKIDetGetNbVehsInDetectionAggregated(char *NameDet, char *typeName);
    00247 EquippedInfVeh AKIDetGetInfVehInDetectionAggregated(char *NameDet, char *typeName, int elem);
    00248
    00249 int     AKIDetGetCounterAggregatedbyId(int iddet, char *typeName);
    00250 float   AKIDetGetSpeedAggregatedbyId(int iddet, char *typeName);
    00251 float   AKIDetGetTimeOccupedAggregatedbyId(int iddet, char *typeName);
    00252 int     AKIDetGetPresenceAggregatedbyId(int iddet, char *typeName);
    00253 float   AKIDetGetDensityAggregatedbyId(int iddet, char *typeName);
    00254 float   AKIDetGetHeadwayAggregatedbyId(int iddet, char *typeName);
    00255 int AKIDetGetNbVehsInDetectionAggregatedbyId(int iddet, char *typeName);
    00256 EquippedInfVeh AKIDetGetInfVehInDetectionAggregatedbyId(int iddet, char *typeName, int elem);
    00257
    00258 // .......................................
    00259 //              DETECTOR CLICKABLE EVENTS
    00260 // .......................................
    00261
    00262 #define AKIDetectorEventsNoTraffic -10000
    00263
    00264 int AKIDetectorEventsEnable();
    00265 int AKIDetectorEventsDisable();
    00266 int AKIDetectorEventsLoadInitialEvents();
    00267 int AKIDetectorEventsSaveEvents();
    00268
    00269
    00270
    00271 // .......................................
    00272 //              INFORMATION OF IDENTIFIERS OF SECTIONS AND JUNCTIONS
    00273 // .......................................
    00274
    00275 #define AKIInfNetGetMem                         -5001
    00276 #define AKIInfUnkonwnId                         -5002
    00277
    00278 struct A2KSectionInf{
    00279         int report;
    00280         int id;
    00281         char name[TDMAXNAMLEN + 1];
    00282         int nbCentralLanes;
    00283         int nbSideLanes;
    00284     float speedLimit;
    00285     float visibilityDistance;
    00286     float yellowBoxSpeed;
    00287         float capacity;
    00288         float distance_zone1;
    00289         float distance_zone2;
    00290         float distance_OnRamp;
    00291         float slope_percentage;
    00292         float length;
    00293         int nbTurnings;
    00294 };
    00295
    00296 struct A2KCentroidInf{
    00297         int report;
    00298         int id;
    00299         char name[TDMAXNAMLEN + 1];
    00300         bool AsDestConsider_percentage;
    00301         bool AsOrigConsider_percentage;
    00302         bool IsOrigin;
    00303         bool IsDestination;
    00304         int NumConnecTo;
    00305         int NumConnecFrom;
    00306 };
    00307
    00308 int AKIInfNetGetUnits();
    00309 int AKIInfNetNbSections();
    00310 int AKIInfNetGetSectionId(int element);
    00311 A2KSectionInf AKIInfNetGetSectionInf(int aid);
    00312 int AKIInfNetGetIdSectionDestinationofTurning(int aid, int elem);
    00313 int AKIInfNetNbJunctions();
    00314 int AKIInfNetGetJunctionId(int element);
    00315
    00316 int AKIInfNetNbCentroids();
    00317 int AKIInfNetGetCentroidId(int element);
    00318 A2KCentroidInf AKIInfNetGetCentroidInf(int aid);
    00319 int AKIInfNetGetIdSectionofOriginCentroidConnector(int aid, int elem);
    00320 int AKIInfNetGetIdSectionofDestinationCentroidConnector(int aid, int elem);
    00321
    00322 // .......................................
    00323 //              INFORMATION OF PATH & NAMES
    00324 // .......................................
    00325
    00326 char * AKIInfNetGetNetworkPath();
    00327 char * AKIInfNetGetODMatrixName();
    00328 char * AKIInfNetGetTrafficResultName();
    00329
    00330
    00331
    00332 // .......................................
    00333 //              STATISTICAL INFORMATION
    00334 // .......................................
    00335
    00336
    00337 #define AKIESTUnknownSection    -6001;
    00338 #define AKIESTNotAvalaible              -6002;
    00339 #define AKIESTIncorrectTypeName -6003;
    00340 #define AKIESTUnknownCentroid   -6004
    00341
    00342 struct StructAkiEstadSystem{
    00343         int report;
    00344     int Flow;   /* Flow */
    00345     float TTa,TTd;              /* Travel Time  : Average & Deviation */
    00346     float DTa,DTd;              /* Delay Time  : Average & Deviation */
    00347     float Sa,Sd;                /* Speed  : Average & Deviation */
    00348     float SHa,SHd;              /* Harmonic Speed  : Average & Deviation */
    00349     float Density;
    00350     float STa,STd;              /* Stop Time  : Average & Deviation */
    00351     float NumStops;             /* Number of Stops */
    00352     float TotalTravel;  /* Total Distance  travelled */
    00353     float TotalTravelTime;      /* Total Time  travelled */
    00354 };
    00355
    00356 struct StructAkiEstadSection{
    00357         int report;
    00358     int Id;
    00359     int Flow;   /* Flow */
    00360     float TTa,TTd;              /* Travel Time  : Average & Deviation */
    00361     float DTa,DTd;              /* Delay Time  : Average & Deviation */
    00362     float Sa,Sd;                /* Speed  : Average & Deviation */
    00363     float SHa,SHd;              /* Harmonic Speed  : Average & Deviation */
    00364     float Density;
    00365     float STa,STd;              /* Stop Time  : Average & Deviation */
    00366     float NumStops;             /* Number of Stops */
    00367     float LongQueueAvg; /* Average Queue Length */
    00368     float LongQueueMax; /* Maximum Queue Length */
    00369     float TotalTravel;  /* Total Distance  travelled */
    00370     float TotalTravelTime;      /* Total Time  travelled */
    00371 };
    00372
    00373 struct StructAkiEstadTurning{
    00374         int report;
    00375     int IdSectionFrom;
    00376     int IdSectionTo;
    00377     int Flow;   /* Flow */
    00378     float TTa,TTd;              /* Travel Time  : Average & Deviation */
    00379     float DTa,DTd;              /* Delay Time  : Average & Deviation */
    00380     float Sa,Sd;                /* Speed  : Average & Deviation */
    00381     float SHa,SHd;              /* Harmonic Speed  : Average & Deviation */
    00382     float STa,STd;              /* Stop Time  : Average & Deviation */
    00383     float NumStops;             /* Number of Stops */
    00384     float LongQueueAvg; /* Average Queue Length */
    00385     float LongQueueMax; /* Maximum Queue Length */
    00386     float TotalTravel;  /* Total Distance  travelled */
    00387     float TotalTravelTime;      /* Total Time  travelled */
    00388 };
    00389
    00390 struct StructAkiEstadODPair{
    00391         int report;
    00392     int IdOrigin;
    00393     int IdDest;
    00394     int Flow;   /* Flow */
    00395     float TTa,TTd;              /* Travel Time  : Average & Deviation */
    00396     float DTa,DTd;              /* Delay Time  : Average & Deviation */
    00397     float Sa,Sd;                /* Speed  : Average & Deviation */
    00398     float SHa,SHd;              /* Harmonic Speed  : Average & Deviation */
    00399     float STa,STd;              /* Stop Time  : Average & Deviation */
    00400     float NumStops;             /* Number of Stops */
    00401     float TotalTravel;  /* Total Distance  travelled */
    00402     float TotalTravelTime;      /* Total Time  travelled */
    00403     int vehLost;                /* Total number of vehicle lost */
    00404 };
    00405
    00406 int AKIIsGatheringStatistics();
    00407 float AKIEstGetIntervalStatistics();
    00408 StructAkiEstadSection   AKIEstGetGlobalStatisticsSection(int aidarc, char *typeName);
    00409 StructAkiEstadSection   AKIEstGetParcialStatisticsSection(int aidarc, float time, char *typeName);
    00410 StructAkiEstadTurning   AKIEstGetGlobalStatisticsTurning(int aidsectionFrom, int aidsectionTo, char *typeName);
    00411 StructAkiEstadTurning   AKIEstGetParcialStatisticsTurning(int aidsectionFrom, int aidsectionTo, float time, char *typeName);
    00412 StructAkiEstadSystem    AKIEstGetGlobalStatisticsSystem(char *typeName);
    00413 StructAkiEstadSystem    AKIEstGetParcialStatisticsSystem(float time, char *typeName);
    00414 StructAkiEstadODPair    AKIEstGetGlobalStatisticsODPair(int idOrigin, int idDestination, char *typeName);
    00415 StructAkiEstadODPair    AKIEstGetParcialStatisticsODPair(int idOrigin, int idDestination, float time, char *typeName);
    00416
    00417 // .......................................
    00418 //              VEHICLE ENTRANCE
    00419 // .......................................
    00420
    00421 #define AKIEnterVehUnknownSection               -7001
    00422 #define AKIEnterVehUnknownTypeName              -7002
    00423 #define AKIEnterVehUnFeasibleLane               -7003
    00424 #define AKIEnterVehNotSpace                             -7004
    00425 #define AKIEnterVehUnknownCentroid              -7005
    00426 #define AKIEnterVehUnFeasiblePath               -7006
    00427 #define AKIEnterVehNoTrafficFlow                -7008
    00428 #define AKIEnterVehNoTrafficOD                  -7009
    00429 #define AKIEnterVehUnknownLane                  -7010
    00430 #define AKIEnterVehUnknownNextSection   -7011
    00431
    00432 #define RIGHT   -1
    00433 #define NOCHANGE 0
    00434 #define LEFT    1
    00435
    00436 int             AKIEnterVehTrafficFlow(int asection, char *TypeName, int tracking = 0);
    00437 int             AKIEnterVehTrafficOD(int asection, char *TypeName, int idCentroidOrigin, int idCentroidDest, int tracking = 0);
    00438 int             AKIPutVehTrafficFlow(int asection, int idLane, char *TypeName, float initPosition, float initSpeed, int nextSection, int tracking);
    00439 int             AKIPutVehTrafficOD(int asection, int idLane, char *TypeName, int idCentroidOr, int idCentroidDest, float initPosition, float initSpeed, int tracking);
    00440
    00441 struct InfArrival{
    00442         int report;
    00443         int idVeh;
    00444         bool inVirtualQueue;
    00445         int entranceSection;
    00446 };
    00447
    00448 InfArrival AKIGenerateArrivalTrafficFlow(int asection, char *TypeName, int useVirtualQueue);
    00449 InfArrival AKIGenerateArrivalTrafficOD(char *TypeName, int idCentroidOrigin, int idCentroidDest, int useVirtualQueue);
    00450
    00451 // .......................................
    00452 //              VEHICLE TRACKED MANAGE
    00453 // .......................................
    00454
    00455 #define AKIVehNotTracked                                -7012
    00456 #define AKIVehInvalidParameter                  -7013
    00457 #define AKIVehNextSectionUnreachable    -7014
    00458
    00459 int             AKIVehTrackedModifySpeed(int aidVeh, float newSpeed);
    00460 int             AKIVehTrackedModifyLane(int aidVeh, int nextLane);
    00461 int             AKIVehTrackedModifyNextSection(int aidVeh, int nextSection);
    00462 int             AKIVehTrackedDelete(int aidVeh);
    00463 int     AKIVehSetAsTracked(int aidVeh);
    00464
    00465
    00466
    00467 // .......................................
    00468 //              INFORMATION OF VEHICLE TRACKED
    00469 // .......................................
    00470
    00471 struct VehPos{
    00472         float xPos,yPos;
    00473         float xPosBack,yPosBack;
    00474 };
    00475
    00476 struct InfVehPos{
    00477         int     report;
    00478         int idVeh;
    00479         int Npos;
    00480         VehPos *vehiclePos;
    00481 };
    00482
    00483 struct DynInfVeh{
    00484         float xCurrentPos,yCurrentPos;
    00485         float xCurrentPosBack,yCurrentPosBack;
    00486         float currentSpeed;
    00487 };
    00488
    00489
    00490 StaticInfVeh    AKIVehTrackedGetStaticInf(int aidVeh);
    00491 InfVeh                  AKIVehTrackedGetInf(int aidVeh);
    00492 int                     AKIVehTrackedSetStaticInf(int aidVeh, StaticInfVeh staticinfVeh);
    00493 InfVehPos               AKIVehTrackedGetPos( int anIdVeh, int nbPos );
    00494 int                     AKIVehSetVehicleTrackedDynInf( int anIdVeh, DynInfVeh dynInfVeh);
    00495
    00496 // .......................................
    00497 //              INFORMATION OF RUN TIME SIMULATION
    00498 // .......................................
    00499 float   AKIGetIniSimTime();
    00500 float   AKIGetEndSimTime();
    00501 float   AKIGetDurationTransTime();
    00502 float   AKIGetSimulationStepTime();
    00503 int     AKISetEndSimTime(float atime);
    00504
    00505
    00506 // .......................................
    00507 //              MANAGING OF INCIDENTS
    00508 // .......................................
    00509
    00510 #define AKIIncidentWrongIniTime         -8001
    00511 #define AKIIncidentWrongPosition        -8002
    00512 #define AKIIncidentUnknownLane          -8003
    00513 #define AKIIncidentUnknownSection       -8004
    00514 #define AKIIncidentNotPresent           -8005
    00515 #define AKIIncidentWrongLength          -8006
    00516 #define AKIIncidentWrongDuration        -8007
    00517
    00518 int AKIGenerateIncident(int asection, int alane, float position, float length, float initime, float duration);
    00519 int AKIRemoveIncident(int asection, int alane, float position);
    00520 int AKIResetAllIncidents();
    00521
    00522 // .......................................
    00523 //              MANAGING OF Public Transport
    00524 // .......................................
    00525
    00526 #define AKIPTNotLoaded                                  -9001
    00527 #define AKIPTVehUnknown                                 -9002
    00528 #define AKIPTStopUnknown                                -9003
    00529 #define AKIPTVehTypeUnknown                             -9004
    00530 #define AKIPTLineUnknown                                -9005
    00531 #define AKIPTVehNotSpace                                -9006
    00532 #define AKIPTIndexNotValid                              -9007
    00533 #define AKIPTVehUnFeasibleLane                  -9008
    00534 #define AKIPTNotAvalaible                               -1
    00535
    00536 struct InfPTVeh{
    00537         int report; // Retorna 0, si OK, sino codi error
    00538         int idVeh;
    00539         int type;
    00540         // Information in Vehicle when it is in a section
    00541         int idSection;
    00542         int numberLane;
    00543         // Information in Vehicle when it is in a node
    00544         int idJunction;
    00545         int idSectionFrom;
    00546         int idLaneFrom;
    00547         int idSectionTo;
    00548         int idLaneTo;
    00549
    00550         float CurrentPos;
    00551         float xCurrentPos,yCurrentPos;
    00552         float xCurrentPosBack,yCurrentPosBack;
    00553         float CurrentSpeed;
    00554
    00555         float TotalDistance;
    00556
    00557         float SystemEntranceT;
    00558         float SectionEntranceT;
    00559
    00560         // Information about PT
    00561         int nbStopsDone;
    00562         int nextStopId;
    00563         float distanceNextStop;
    00564         float nextServiceTime;
    00565 };
    00566
    00567 struct StaticInfPTVeh{
    00568         int report; // Retorna 0, si OK, sino codi error
    00569         int idVeh;
    00570         int type;
    00571         char typeName[TDMAXNAMLEN+1];
    00572     float length;
    00573     float width;
    00574     float maxDesiredSpeed;
    00575     float maxAcceleration;
    00576     float normalDeceleration;
    00577     float maxDeceleration;
    00578         float speedAcceptance;
    00579         float minDistanceVeh;
    00580         float giveWayTime;
    00581         float guidanceAcceptance;
    00582         int guided;
    00583         int equiped;
    00584         int tracked;
    00585         // Information about PT
    00586         int idLine;
    00587 };
    00588
    00589
    00590 int             AKIPTGetNumberLines();
    00591 int             AKIPTGetIdLine(int elem);
    00592 char    *AKIPTGetNameLine(int lineId);
    00593
    00594 int             AKIPTGetNumberStopsInLine(int lineId);
    00595 int             AKIPTGetIdStopsInLine(int lineId, int elem);
    00596 char    *AKIPTGetNameStopsInLine(int lineId, int elem);
    00597
    00598 int             AKIPTEnterVeh( int lineId, char *TypeName, bool tracked );
    00599 int             AKIPTVehModifyStopTime( int aidVeh, int nstop, float stopTime );
    00600
    00601 StaticInfPTVeh  AKIPTVehGetStaticInf(int aidVeh);
    00602 InfPTVeh                AKIPTVehGetInf(int aidVeh);
    00603 float                   AKIPTGetServiceTimeStopsInLine(int aidVeh, int nstop);
    00604
    00605 // .......................................
    00606 //              PRINT INFORMATION IN XCONSOLE / LOG WINDOW
    00607 // .......................................
    00608
    00609 int AKIPrintString(char *string);
    00610 int AKIPrintStringLogWindow(char *string);
    00611
    00612 //.........................................
    00613 //     GRAPHICAL TEXT
    00614 //........................................
    00615
    00616 int AKITextSetText(int idText, char *newText);
    00617
    00618 //.........................................
    00619 //     ODDemand
    00620 //........................................
    00621
    00622 #define AKIODDemandNoTrafficOD                  -11000
    00623 #define AKIODDemandIncorrectTypeName    -11001
    00624 #define AKIODDemandIncorrectNumSlice    -11002
    00625 #define AKIODDemandUnknownCentroid              -11003
    00626 #define AKIODDemandUnknownODPair                -11004
    00627
    00628
    00629 int AKIODDemandGetNumSlicesOD();
    00630 float AKIODDemandGetIniTimeSlice(int numslice);
    00631 float AKIODDemandGetEndTimeSlice(int numslice);
    00632 float AKIODDemandGetDemandODPair(int origen, int desti, char *TypeName, int numslice);
    00633 int AKIODDemandSetDemandODPair(int origen, int desti, char *TypeName, int numslice, float anewdemand);
    00634
    00635 //.........................................
    00636 //     PastCosts
    00637 //........................................
    00638 #define AKIPastCostUnknownLink                  -12001
    00639 #define AKIPastCostNoPerVehType                 -12002
    00640 #define AKIPastCostPerVehType                   -12003
    00641 #define AKIPastCostNoReaded                     -12004
    00642 #define AKIPastCostIncorrectTypeName    -12005
    00643
    00644 int AKIPastCostAreCostsPerVehicleType();
    00645 float AKIPastCostGetIniTimeReaded();
    00646 float AKIPastCostGetIntervalReaded();
    00647 int AKIPastCostGetNbIntervalsReaded();
    00648 int AKIPastCostSetPastCost(int sectorig, int sectdest, float aTime, char *TypeName, float acost, float aocost);
    00649 float AKIPastCostGetPastCost(int sectorig, int sectdest, float aTime, char *TypeName);
    00650 float AKIPastCostGetPastOutputCost(int sectorig, int sectdest, float aTime, char *TypeName);
    00651
    00652 #endif