資源簡介
使用matlab編寫的元胞自動機的源代碼,可供學習的好資料。
代碼片段和文件信息
function?[CellSpace_nextstep?VehicleSpace]?=?CountingNextStepVehicleState(CellSpace_currentCellSpace_nextstepVehicleSpaceTakenMat?TakenCarIDMatVMAXsignalFlagUseLaneChangingModelFlag)
%計算下一時刻的元胞空間狀態
%獲取當前時刻元胞空間中的車輛信息,
[VehicleInCellSpaceMat]=GetVehicleInCellSpace(CellSpace_currentTakenMatTakenCarIDMat);
if?isempty(VehicleInCellSpaceMat)?==?1?%如果為空
????return;
end;
%對每個車輛進行遍歷,%獲取每個車輛的數據,以及鄰居車輛的數據
%計算每個車輛的下一時刻狀態并更新到下一時刻的元胞空間中
[CellSpace_nextstep?VehicleSpace]?=?UpdataCellSpaceWithVehicleInfo(CellSpace_currentCellSpace_nextstepVehicleSpaceVehicleInCellSpaceMatVMAXsignalFlagUseLaneChangingModelFlag);
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????307??2012-05-25?14:59??復件?CA_TrafficFlowModel\AddingNewCarsToEntry.p
?????文件????????100??2012-05-19?18:15??復件?CA_TrafficFlowModel\basicinfo.ini
?????文件????????538??2012-05-25?14:59??復件?CA_TrafficFlowModel\CountingLaneChangingConditions.p
?????文件????????351??2012-05-25?14:59??復件?CA_TrafficFlowModel\CountingNextStepState4Vehicle.p
?????文件????????729??2012-05-17?18:59??復件?CA_TrafficFlowModel\CountingNextStepVehicleState.m
?????文件????????177??2012-05-25?14:59??復件?CA_TrafficFlowModel\DeployCellTakenState.p
?????文件????????138??2012-05-25?14:59??復件?CA_TrafficFlowModel\DeployVehicleState.p
?????文件????????303??2012-05-25?14:59??復件?CA_TrafficFlowModel\DrawingCellSpace.p
?????文件?????????56??2012-05-16?14:55??復件?CA_TrafficFlowModel\DriverBehaviorInfo.ini
?????文件????????173??2012-05-25?14:59??復件?CA_TrafficFlowModel\FindUnusedVehicle.p
?????文件????????229??2012-05-25?14:59??復件?CA_TrafficFlowModel\GenerateCellSpace.p
?????文件????????394??2012-05-25?14:59??復件?CA_TrafficFlowModel\GenerateVehicleSpace.p
?????文件????????241??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetAheadVehicleID.p
?????文件????????211??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetBasicInfo.p
?????文件????????139??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetCellTakenCarHeadState.p
?????文件????????123??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetCellTakenCarID.p
?????文件????????123??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetCellTakenState.p
?????文件????????238??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetDistanceToAheadVehicle.p
?????文件????????125??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetDriverBehavior.p
?????文件????????141??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetVehicalInfo.p
?????文件????????280??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetVehicleInCellSpace.p
?????文件????????221??2012-05-25?14:59??復件?CA_TrafficFlowModel\GetVehicleLength.p
?????文件????????141??2012-05-15?16:59??復件?CA_TrafficFlowModel\IfAddNewCar.m
?????文件?????????62??2012-05-15?16:42??復件?CA_TrafficFlowModel\InitVehicleInfo.ini
?????文件????????313??2012-05-15?16:06??復件?CA_TrafficFlowModel\IsCellTaken.m
?????文件????????148??2012-05-25?14:59??復件?CA_TrafficFlowModel\isSatisfy.p
?????文件????????499??2012-05-25?14:59??復件?CA_TrafficFlowModel\JudgeLaneChangingConditions.p
?????文件????????371??2012-05-25?14:59??復件?CA_TrafficFlowModel\JudgeNeighborOnLeftOrRightLane.p
?????文件?????????35??2012-05-17?19:01??復件?CA_TrafficFlowModel\LaneChangingModeInfo.ini
?????文件???????1710??2012-05-25?10:40??復件?CA_TrafficFlowModel\main_tca.m
............此處省略19個文件信息
- 上一篇:中國石油大學數值分析編程作業
- 下一篇:物流配送蟻群算法
評論
共有 條評論