Quản lý và vận hành mạng lưới điện trung thế trên nền tảng gis

189 10 0
Quản lý và vận hành mạng lưới điện trung thế trên nền tảng gis

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Đại Học Quốc Gia Tp Hồ Chí Minh TRƯỜNG ĐẠI HỌC BÁCH KHOA DƯƠNG KIM KHÁNH QUẢN LÝ VÀ VẬN HÀNH MẠNG LƯỚI ĐIỆN TRUNG THẾ TRÊN NỀN GIS Chuyên ngành: Thiết bị, mạng nhà máy điện Luận văn thạc só TP HỒ CHÍ MINH, Tháng Năm 2008 CƠNG TRÌNH ĐƯỢC HỒN THÀNH TẠI TRƯỜNG ĐẠI HỌC BÁCH KHOA ĐẠI HỌC QUỐC GIA TP HỒ CHÍ MINH Cán hướng dẫn khoa học : Cán hướng dẫn PGS.TS NGUYỄN HOÀNG VIỆT Cán hướng dẫn TS.LÊ TRUNG CHƠN Cán chấm nhận xét : Cán chấm nhận xét : Luận văn thạc sĩ bảo vệ HỘI ĐỒNG CHẤM BẢO VỆ LUẬN VĂN THẠC SĨ TRƯỜNG ĐẠI HỌC BÁCH KHOA, ngày tháng năm ĐẠI HỌC QUỐC GIA TP HCM TRƯỜNG ĐẠI HỌC BÁCH KHOA CỘNG HOÀ Xà HỘI CHỦ NGHIà VIỆT NAM Độc Lập - Tự Do - Hạnh Phúc -oOo Tp HCM, ngày tháng năm NHIỆM VỤ LUẬN VĂN THẠC SĨ Họ tên học viên: DƯƠNG KIM KHÁNH Giới tính : Nam Ngày, tháng, năm sinh : 12-06-1981 Nơi sinh : Đồng Nai Chuyên ngành : Thiết bị, mạng nhà máy điện Khoá (Năm trúng tuyển) : K2006 1- TÊN ĐỀ TÀI: QUẢN LÝ VÀ VẬN HÀNH MẠNG LƯỚI TRUNG THẾ TRÊN NỀN TẢN GIS 2- NHIỆM VỤ LUẬN VĂN: - Tìm hiểu kiến thức GIS - Tìm hiểu phần mềm MAPINFO MAPBASIC - Thu thập xây dựng sở liệu hệ thống lưới điện - Ứng dụng phần mềm MAPINFO 7.5 MAPBASIC 4.1 để xây dựng chương trình quản lý vận hành mạng lưới trung GIS - Kết luận kiến nghị hướng phát triển 3- NGÀY GIAO NHIỆM VỤ (Ngày bắt đầu thực luận văn thạc sĩ theo QĐ số 104 /QĐĐHBK-SĐH ngày 04 tháng 03 năm 2008 Hiệu Trưởng Trường Đại Học Bách Khoa) : 20-1-2008 4- NGÀY HOÀN THÀNH NHIỆM VỤ : 30-6-2008 5- HỌ VÀ TÊN CÁN BỘ HƯỚNG DẪN : - PGS.TS NGUYỄN HOÀNG VIỆT - TS.LÊ TRUNG CHƠN Nội dung đề cương Luận văn thạc sĩ Hội Đồng Chuyên Ngành thông qua CÁN BỘ HƯỚNG DẪN CÁN BỘ HƯỚNG DẪN PGS.TS NGUYỄN HOÀNG VIỆT CÁN BỘ HƯỚNG DẪN TS.LÊ TRUNG CHƠN CHỦ NHIỆM BỘ MÔN QUẢN LÝ CHUYÊN NGÀNH TS.VŨ PHAN TÚ LỜI CẢM ƠN Để có kiến thức định cho việc hoàn thành luận văn tốt nghiệp này, nhận dạy dỗ, bảo, giúp đỡ tận tình thầy cơ, bạn bè suốt q trình học tập vừa qua Đó ân nặng mà ghi nhớ Qua luận văn này, tơi xin gửi lịng biết ơn chân thành đến: * PGS.TS Nguyễn Hoàng Việt TS.Lê Trung Chơn tận tình giúp đỡ tơi suốt q trình làm luận văn * Thầy cô Khoa Điện - Trường Đại Học Bách Khoa Tp.HCM tạo điều kiện thuận lợi để tơi thực hồn thành luận văn * Bạn bè Công ty Điện lực Tp.HCM nhiệt tình giúp đỡ thu thập liệu để tơi hồn tất luận văn tiến độ * Cuối tơi xin bày tỏ lịng biết ơn đến người thân gia đình động viên khuyến khích tơi suốt khố học Trân trọng ! TP.HCM, ngày 30 tháng năm 2008 Học viên thực DƯƠNG KIM KHÁNH GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn TĨM TẮT LUẬN VĂN THẠC SĨ Với áp dụng GIS nhiều lĩnh vực, đặc biệt lĩnh vực Ngành Điện Việt Nam Thực Gis đem lại phương pháp quản lý hệ thống lưới điện nhiều phương pháp phần mềm quản lý mắc tiền mà đất nước ta cịn gặp nhiều khó khăn kinh tế Đề tài định hướng xây dựng chương trình quản lý dựa kết hợp phần mềm GIS MAPINFO 7.5 ngơn ngữ lập trình MAPBASIC 4.1 có khả quản lý vận hành hệ thống lưới điện cách trực quan sinh động, khơng cịn khơ khan sơ đồ đơn tuyến Chỉ cần nhấp chuột chương trình cho ta biết thơng số, tuổi thọ hệ thống lưới Vận hành đóng cắt cách trực tiếp sơ đồ lưới giúp cho nhân viên vận hành xác định rõ ràng nơi địên để thông báo cho đơn vị thi công sửa chữa thuận tiện công tác Điện lực Cũng giúp cho đơn vị quản lý xác định vị trí đấu nối thuận tiện công tác thiết kế đường dây đấu nối vào nhánh hữu…….Đồng thời nghiên cứu tính tốn xác định vị trí lắp đặt tụ bù, ta giảm tổn thất, ổn định chất lượng điện lưới HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn MỤC LỤC: CHƯƠNG I:MỞ ĐẦU 1.Đặt vấn đề 2.Sự cần thiết đề tài 3.Mục tiêu nghiên cứu 4.Nội dung nghiên cứu 5.Hướng tiếp cận phương pháp nghiên cứu 5.1 Hướng tiếp cận 5.2 Phương pháp nghiên cứu 6.Giới hạn phạm vi nghiên cứu 6.1 Phạm vi nghiên cứu 6.2 Giới hạn đề tài 7.Ý nghĩa khoa học thực tiễn đề tài CHƯƠNG II: TỔNG QUAN 1.Tổng quan 2.Định hướng ngành Điện CHƯƠNG III: CÔNG NGHỆ GIS VÀ ỨNG DỤNG THỰC TIỄN 1.Hệ thống thông tin địa lý 1.1 Khái niệm 1.2 Cấu trúc hệ thống thông tin địa lý 1.2.1 Phần cứng 1.2.2 Phần mềm 10 1.2.3 Cơ sở liệu 11 1.2.4 Chính sách quản lý 12 1.2.5 Chuyên viên 12 2.Dữ liệu hệ thống thông tin địa lý 12 2.1 Khái niệm liệu địa lý 12 2.2 Dữ liệu địa lý biểu diễn 13 2.2.1 Cấu trúc liệu GIS 13 HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn 2.2.2 Các kiểu liệu không gian 13 2.2.2.1Cấu trúc Raster 13 2.2.2.2 Cấu trúc vector 14 2.2.3 Dữ liệu thuộc tính 14 2.2.3.1 Cấu trúc phân nhánh 15 2.2.3.2 Cấu trúc mạng 15 2.2.3.3 Cấu trúc quan hệ 15 2.3 Chuyển đổi liệu 15 2.4 Tỷ lệ 15 Các chức hệ thống thông tin địa lý 15 3.1 Nhập liệu 15 3.2 Quản lý liệu 15 3.3 Sửa đổi phân tích liệu khơng gian 15 3.4 Sửa đổi phân tích liệu phi khơng gian 16 3.5 Tích hợp liệu phi khơng gian thuộc tính 16 3.6 Xuất 16 Khả ứng dụng GIS vào ngành Điện 17 Mapinfo ngôn ngữ lập trình MapBasic 17 5.1 Mapinfo 17 5.1.1 Tổ chức thông tin đồ MapInfo 7.5 17 5.1.2 Tổ chức thông tin theo lớp đối tượng 18 5.1.3 Sự liên kết thông tin MapInfo 7.5 18 5.1.4 Giới thiệu trình đơn MapInfo 7.5 19 5.1.5 Ảnh điểm 23 5.2 Ngơn ngữ lập trình MAPBASIC 27 5.2.1 Giới thiệu Mapbasic 27 5.2.1.1 Tiện ích 28 5.2.1.2 Mở rộng 28 5.2.1.3 Ngôn ngữ MapBasic 28 5.2.2 Sử dụng môi trường phát triển 28 5.2.2.1 Khởi động Mapbasic 29 HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn 5.2.2.2 Tạo tập tin chương trình MapBasic 29 5.2.2.3 Biên dịch hay tạo tệp ứng dụng 29 5.2.2.4 Các trình đơn MapBasic 29 5.2.3 Các thành phần ngôn ngữ mapbasic 33 5.2.3.1 Biến 33 5.2.3.2 Dữ liệu kiểu người dùng 37 5.2.3.3 Toán tử & hàm 40 5.2.3.4 Kiểm tra 43 5.2.3.5 Cấu trúc chương trình 47 5.2.3.6 Thủ tục 51 5.2.3.7 Khai báo gọi trình windows dll 52 5.2.4 Bảng tập tin 54 5.2.4.1 Mở bảng mapinfo 55 5.2.4.2 Mở bảng không thuộc dạng mapinfo 56 5.2.5 Đọc bảng 56 CHƯƠNG IV: THU THẬP DỮ LIỆU VÀ XÂY DỰNG DỮ LIỆU HỆ THỐNG LƯỚI ĐIỆN Giới thiệu vùng nghiên cứu 60 1.1 Quận Bình Thạnh 60 1.2 Quận Gò Vấp 61 Thu thập liệu hệ thống điện khu vực nghiên cứu 63 2.1 Giới thiệu sơ lược lưới điện Điện lực Gia Định quản lý 63 2.2 Giới thiệu sơ lược lưới điện Điện lực Gò Vấp quản lý 63 Giải pháp phân tích, xây dựng quản lý sở liệu để quản lý, vận hành lưới điện phân phối dựa GIS 64 3.1 Xây dựng đồ tham chiếu 64 3.2 Xây dựng hệ thống sở liệu hệ thống điện khu vực nghiên cứu 65 HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn CHƯƠNG V XÂY DỰNG CHƯƠNG TRÌNH QUẢN LÝ HỆ THỐNG LƯỚI ĐIỆN Tổ chức điều tra cập nhật liệu vào máy tính 72 Xây dựng chương trình MANAGER-GIS 72 2.1 Giới thiệu 72 2.2 Xây dựng chương trình ứng dụng để quản lý vận hành lưới điện trung sử dụng ngôn ngữ MAPBASIC 74 2.3 Các chức chương trình MANAGER-GIS 100 2.4 Nhược điểm chương trình 104 Giới thiệu chức chương trình 104 3.1 Chức MapInfo 105 3.2 Quản lý sở liệu 105 3.3 Chức tìm kiếm thiết bị 107 3.4 Chức vận hành 108 3.5 Chức Quản lý trạm 109 3.6 Chức Quản lý thiết bị 110 3.7 Chức giúp đỡ 111 CHƯƠNG VI: NGHIÊN CỨU VÀ TÍNH TỐN BÙ CƠNG SUẤT PHẢN KHÁNG TRÊN LƯỚI TRUNG THẾ Lý thuyết bù công suất phản kháng 112 1.1 Sự điều chỉnh hệ số công suất 112 1.1.1 Hệ số công suất 112 1.1.2 Điều chỉnh hệ số công suất 114 1.2 Điều chỉnh điện áp 116 1.2.1 Nguyên tắc chung điều chỉnh điện áp 116 Lợi ích việc lắp đặt tụ bù 119 5.1.Sử dụng tụ điện 119 5.2.Các kiểu lắp đặt tụ điện 119 5.3.Các kiểu điều khiển dùng cho tụ điện đóng cắt 123 HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ GVHD: PGS.TS Nguyễn Hoàng Việt - TS.Lê Trung Chơn 5.4.Các kiểu đấu nối tụ điện ba pha 124 5.5.Các lợi ích kinh tế việc lắp đặt tụ bù 126 2.5.1 Các lợi ích việc giảm công suất phát 127 2.5.2 Lợi ích việc giảm công suất truyền tải 128 2.5.3 Lợi ích việc giảm dung lượng trạm phân phối 128 2.5.4 Lợi ích việc giảm tổn thất hàng năm 129 2.5.5 Lợi ích việc giảm tổn thất điện áp 129 2.5.6 Lợi ích việc giảm công suất xuất tuyến 130 2.5.7 Các lợi ích kinh tế việc cải thiện điện áp 131 2.5.8 Tổng lợi ích kinh tế việc lắp đặt tụ bù 131 Tính tốn bù cơng suất phản kháng đường dây phân phối 133 3.1 Tổn thất công suất đoạn phát tuyến phân phối 133 3.2 Tồn thất cơng suất đường dây có tụ bù 134 3.3 Giảm tổn thất điện đặt tụ bù 135 Giảm tổn thất điện có xét chi phí đặt tụ bù 138 Tính tốn hệ số phụ tải phản kháng 139 5.1.Tính hệ số λ cho đoạn 139 5.2.Tính hệ số phụ tải phản kháng k’pt đoạn trước sau bù 123 5.3.Áp dụng tính k’pt λ tiến hành bù liên tiếp đoạn từ đoạn cuối ngược đầu đường dây 141 CHƯƠNG VII KẾT LUẬN VÀ KIẾN NGHỊ 1.Kết luận 143 2.Kiến nghị 143 TÀI LIỆU THAM KHẢO PHỤ LỤC HVTH: DƯƠNG KIM KHÁNH LUẬN VĂN THẠC SĨ Phụ lục '' -Select * From FCO Where OBJ Within CreateCircle(x,y,4) Into Doituong If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="FCO " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From RECL Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="RECLOSER " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" 32 Phụ lục If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From OS Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="OILSWITCH " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From MC Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="MÀy CÅt " Dialog Title "Thao Tác Đóng Cắt" Control Button 32 Ph lc Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From LTD Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=0 Thietbi="LTD " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From LBS Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else 32 Phụ lục Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="LBS " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From LBFCO Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=1 Thietbi="LBFCO " Dialog Title "Thao Tác Đóng Cắt" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If 32 Phụ lục '' Select * From DS Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=0 Thietbi="DS " Dialog Title "Thao Tác Đóng C¾t" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Select * From BCO Where OBJ Within CreateCircle(x,y,4) Into Doituong Mavanhanh=Doituong.Mavh If (Tableinfo(Doituong,Tab_Info_Nrows)=1) Then Mavanhanh=Doituong.Mavh If Doituong.MAVH=1 Then Message="Dang Dong" Dangdong=1 Else Message="Dang Mo" Dangdong=0 End If Cotai=0 Thietbi="BCO " Dialog Title "Thao T¸c §ãng C¾t" Control Button Title "Kiem tra tai,lua chon " Calling Kiemtra Control Statictext Title Thietbi+Message+", doi trang thai?" Control OKButton Title "Thao tac" Control CancelButton Title "Thoat" 32 Phụ lục If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Dongmo Close Table Doituong Exit Sub Else Close Table Doituong Exit Sub End If End If '' Close Table Doituong ''****************** Sub Dongmo Dim Left,Right,Long,Short,Rname,Lname,Maduongday,Lcode,Rcode Lsource,Rsource,Giaso Integer '' Kiem Tra - As String, As Select * From Day_TT Where OBJ Intersects (Select Obj From Doituong Where RowID=1) Into Lancanthietbi If Tableinfo(Lancanthietbi,Tab_Info_Nrows)=2 Then Fetch First From Lancanthietbi Left=Lancanthietbi.Level Lsource=Lancanthietbi.Noload Lname=Lancanthietbi.tennhanh Lcode=Lancanthietbi.Madd Fetch Rec From Lancanthietbi Right=Lancanthietbi.Level Rsource=Lancanthietbi.Noload Rname=Lancanthietbi.tennhanh Rcode=Lancanthietbi.Madd Else Close Table Lancanthietbi Exit Sub End If ' If Left>=Right Then Long=Left Short=Right Else Long=Right Short=Left End If ' If (Len(Long)-Len(Short)>=6 Or Instr(1,Long,Short)=0 Or RcodeLcode) And (Rsource=0 And Lsource=0) Then Dialog Title "VËn hªnh thÔng bo !" Control Statictext Title "Thao tac khong phu hop voi thuc te, van hanh sai !" Control OKbutton Title "Thao Tac Lai" Close Table Lancanthietbi Exit Sub End If ' - ½ If (Rsource=0 Or Lsource=0) And Cotai=0 Then Dialog Title "Vận hênh thÔng bo !" 32 Ph lc Control Statictext Title Thietbi+"Thao tac khong phu hop voi thuc te, van hanh sai !" Control OKbutton Title "Thao Tac Lai" Close Table Lancanthietbi Exit Sub End If ' If (Len(Long)-Len(Short)>=6 Or Instr(1,Long,Short)=0 Or RcodeLcode) And (RsourceLsource) And (Rsource=0 or Lsource=0) And Cotai=1 Then Open File d_dan+"Temp\Giaso.Lpt" For Input As #1 Input #1 ,Giaso Close File #1 Giaso=Giaso+1 Open File d_dan+"Temp\Giaso.Lpt" For Output As #1 Write #1 ,Giaso Close File #1 ConstMAVH=1 Constload=0 Dialog Title "Vận hênh thÔng bo !" Control Statictext Title "Chu y co su chuyen doi nguon, doi chuong trinh cap nhat lai luoi" Control OKbutton Title "Tiep Tuc" Control Cancelbutton Title "Dong Lai" If Commandinfo(Cmd_Info_Dlg_Ok) Then Update Doituong Set MAVH=1 Select * From Day_tt Where OBJ Intersects (Select Obj From Doituong) And MAVH=1 Into Levelsuply Relevel=Levelsuply.Level Maduongday=Levelsuply.Madd Select * From Day_tt Where OBJ Intersects (Select Obj From Doituong) And MAVH=1 Into Levelsuply Update Levelsuply Set Level=Relevel+Str$(Giaso)+"z",Madd=Maduongday Lan=0 Call Updatesuply Close table Levelsuply Close Table Lancanthietbi Exit Sub Else Exit Sub End If End If ' If (Len(Long)-Len(Short)>=6 Or Instr(1,Long,Short)=0 Or RcodeLcode) And (Rsource0 And Lsource0) Then Dialog Title "XÀc NhËn Chun Ngn" Control Groupbox Title "Ngn tơ :" Control Radiogroup Title "[ &1 ] "+Lname+" Sang "+Rname+";"+"[ &2 ] "+Rname+" Sang "+Lname+";"+"[ &3 ] "+"Tø ¢èng" Value ID Calling Luachon Control OKButton Title "&Chãn" 32 Ph lc Control CancelButton Title "&ThÔi" If Commandinfo(Cmd_Info_Dlg_Ok) Then Call Remark Exit Sub End If Exit Sub End If ' '' -Ket thuc kiem tra ' If Mavanhanh=1 Then Update Doituong Set MAVH=-1 '' If Rsource>0 And Lsource>0 And Rsource=Lsource Then Select * From Day_tt Where Instr(1,Level,Long)=1 Into Down Update Down Set Noload=Noload+1 Close Table Down Close Table Lancanthietbi Exit Sub End If '' Select * From Day_tt Where Instr(1,Level,Long)=1 Into Down Update Down Set Noload=Noload+1 Select * From Day_tt Where Instr(1,Level,Long)=1 And Noload=1 Into Down Update Down Set MAVH=-1 Close Table Down Close Table Lancanthietbi Exit Sub Else Update Doituong Set MAVH=1 '' -If (Rsource>1 Or Lsource>1) And RsourceLsource Then Select * From Day_tt Where Instr(1,Level,Long)=1 Into Up Update Up Set Noload=Noload-1 Close Table Up Close Table Lancanthietbi Exit Sub End If '' Select * From Day_tt Where Instr(1,Level,Long)=1 Into Up Update Up Set Noload=Noload-1 Select * From Day_tt Where Instr(1,Level,Long)=1 And Noload=0 Into Up Update Up Set MAVH=1 Close Table Up Close Table Lancanthietbi Exit Sub End IF End Sub ''****************** Sub Updatesuply Dim i,t,Dec As Float, Buffername,Updateday,Capdosuply,Maduongday As String Lan=Lan+1 T=lan Dec=0 Buffername="Dem"+Str$(t) Updateday="Nhanh"+Str$(t) 32 Phụ lục Update Levelsuply Set MAVH=Constmavh,Noload=Constload Capdosuply=Levelsuply.Level Maduongday=Levelsuply.Madd Select * From Day_tt Where OBJ Contains Entire (Select Obj From Levelsuply Where RowID=1) Into Updateday '' Select * From FCO Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into FCOPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From FCOpesonal) And MAVH=-1 Into Levelsuply Close Table FCOpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From RECL Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into ReclPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From Reclpesonal) And MAVH=-1 Into Levelsuply Close Table Reclpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From OS Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into OSPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From OSpesonal) And MAVH=-1 Into Levelsuply Close Table OSpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If 32 Phụ lục Next Close Table Buffername Else Close Table Buffername End if '' -Select * From MC Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into MCPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From MCpesonal) And MAVH=-1 Into Levelsuply Close Table MCpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From LTD Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into LTDPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From LTDpesonal) And MAVH=-1 Into Levelsuply Close Table LTDpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From LBS Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into LBSPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From LBSpesonal) And MAVH=-1 Into Levelsuply Close Table LBSpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If 32 Phụ lục Next Close Table Buffername Else Close Table Buffername End if '' -Select * From LBFCO Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into LBFCOPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From LBFCOpesonal) And MAVH=-1 Into Levelsuply Close Table LBFCOpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From DS Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into DSPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From DSpesonal) And MAVH=-1 Into Levelsuply Close Table DSpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If Next Close Table Buffername Else Close Table Buffername End if '' -Select * From BCO Where OBJ Intersects (Select Obj From Updateday Where RowID=1) And MAVH=1 Into Buffername If Tableinfo(Buffername,Tab_Info_Nrows)>=1 Then For i=1 To Tableinfo(Buffername,Tab_Info_Nrows) Select * From Buffername Where RowID=i Into BCOPesonal Select * From Day_tt Where OBJ Intersects (Select Obj From BCOpesonal) And MAVH=-1 Into Levelsuply Close Table BCOpesonal If Tableinfo(Levelsuply,Tab_Info_Nrows)>=1 Then Dec=Dec+1 Update Levelsuply Set Level=CapdoSuply+Str$(Dec)+"z",Noload=Constload,Madd=Maduongday Call Updatesuply End If 32 Phụ lục Next Close Table Buffername Else Close Table Buffername End if '' -Close Table Updateday End Sub ''*************************** Sub Remark Dim Rname,Lname,Rlevel,Llevel,Rcode,Lcode As String, Giaso As Integer '' Fetch First From Lancanthietbi Lname=Lancanthietbi.tennhanh Llevel=Lancanthietbi.level Lcode=Lancanthietbi.Madd Fetch Rec From Lancanthietbi Rname=Lancanthietbi.tennhanh Rlevel=Lancanthietbi.level Rcode=Lancanthietbi.Madd '' Lan=0 Open File d_dan+"Temp\Luachon.Lpt" For Input As #1 Input #1 ,Luachon Close File #1 '' Update Doituong Set Mavh=1 '' Open File d_dan+"Temp\Giaso.Lpt" For Input As #1 Input #1 ,Giaso Close File #1 Giaso=Giaso+1 Open File d_dan+"Temp\Giaso.Lpt" For Output As #1 Write #1 ,Giaso Close File #1 '' ConstMAVH=0 Do Case Luachon Case Select * From Lancanthietbi Where RowID=1 into Up Update Up Set MAVH=0 Close Table Up Fetch First From Lancanthietbi Constload=Lancanthietbi.noload Select * From Lancanthietbi Where RowID=2 Into Levelsuply Update Levelsuply Set Level=Llevel+Str$(Giaso)+"z",Madd=Lcode Call Updatesuply Close table Levelsuply Select * From Day_tt Where MAVH=0 Into Day Update Day Set MAVH=-1 Close Table Day Close table Lancanthietbi Case Select * From Lancanthietbi Where RowID=2 into Up Update Up Set MAVH=0 Close Table Up Fetch Rec From Lancanthietbi 32 Phụ lục Constload=Lancanthietbi.noload Select * From Lancanthietbi Where RowID=1 Into Levelsuply Update Levelsuply Set Level=Rlevel+Str$(Giaso)+"z",Madd=Rcode Call Updatesuply Close table Levelsuply Select * From Day_tt Where MAVH=0 Into Day Update Day Set MAVH=-1 Close Table Day Close table Lancanthietbi Case If Llevel>=Rlevel Then Fetch Rec From Lancanthietbi Constload=Lancanthietbi.noload Select * From Lancanthietbi Where RowID=1 Into Levelsuply Update Levelsuply Set Level=Rlevel+Str$(Giaso)+"z",Madd=Rcode Call Updatesuply Close table Levelsuply Select * From Day_tt Where MAVH=0 Into Day Update Day Set MAVH=-1 Close Table Day Close table Lancanthietbi Else Fetch First From Lancanthietbi Constload=Lancanthietbi.noload Select * From Lancanthietbi Where RowID=2 Into Levelsuply Update Levelsuply Set Level=Llevel+Str$(Giaso)+"z",Madd=Lcode Call Updatesuply Close table Levelsuply Select * From Day_tt Where MAVH=0 Into Day Update Day Set MAVH=-1 Close Table Day Close table Lancanthietbi End If End Case End Sub ''************************* Sub Luachon Dim Luachon As Smallint Luachon=Readcontrolvalue(1) Open File d_dan+"Temp\Luachon.Lpt" For Output As #1 Write #1 ,Luachon Close File #1 End Sub ''************************* Sub Kiemtra '' Lay tai Run Application d_dan+"Pro_net\Sumload.MBX" Open File d_dan+"Temp\Counload.Lpt" For Input As #1 Input #1 ,Tainhanh,Sotram Close File #1 '' Thoi Lay Tai-Dialog Title "Th«ng Báo Tải" Control Statictext Position 5,5 Title "Tong cong tai cua nhanh : "+Tainhanh+" KVA ("+Sotram+" Tram)" 32 Phụ lục Control Statictext Position 5,15 Title "Co phu hop voi che dong,cat thiet bi khong ?" Control Groupbox Title "Xac nhan thong tin" Control Radiogroup Title "Cho phep dong cat;Khong cho phep" ID Value Calling Chuyengiao Control OKButton Title "Chon" ID Control CancelButton Title "Tro ve" End Sub ''********************* Sub Chuyengiao If Readcontrolvalue(1)=1 Then Cotai=1 Else If Readcontrolvalue(1)=2 Then Cotai=0 End If End If Alter Control Enable End Sub Truy nhập hiển thị ảnh trực tuyến: Include "MAPBASIC.DEF" Include "MENU.DEF" Global d_dan as String Dim i,j,Checkwin,IDphuong As integer Open file "C:\windows\Temp\path.txt" for Input as #1 Input #1, d_dan Close file #1 d_dan=Pathtodirectory$(d_dan)+"\" Checkwin=0 j=0 For i=1 to Numtables() If Ucase$(Tableinfo(i,Tab_info_name))="ANH_CUA_THIET_BI" Then Close Table Anh_Cua_Thiet_Bi Exit For End If Next For i=1 To Numwindows() If Windowinfo(Windowid(i),Win_info_Name)="Phuong Map" Then Checkwin=1 Exit For End If Next If Checkwin=0 Then Map From Phuong Position (0,5) Width 2.5 Height 2.02 32 Phụ lục End If For i=1 To Numwindows() j=j+1 If Windowinfo(Windowid(i),Win_info_Name)="Phuong Map" Then IDphuong=Windowid(j) Set window IDphuong Position (0,5) Width 2.5 Height 2.02 Set Map Window IDphuong Center (0.063854663, 0.044968073) Zoom 13100 Units "m" Layer Phuong Selectable Off Exit For End If Next Set window Windowid(1) Position (2.57,0) Width Height 7.02 32 ... sơ lược lưới điện Điện lực Gia Định quản lý 63 2.2 Giới thiệu sơ lược lưới điện Điện lực Gò Vấp quản lý 63 Giải pháp phân tích, xây dựng quản lý sở liệu để quản lý, vận hành lưới điện phân... ngành : Thiết bị, mạng nhà máy điện Khoá (Năm trúng tuyển) : K2006 1- TÊN ĐỀ TÀI: QUẢN LÝ VÀ VẬN HÀNH MẠNG LƯỚI TRUNG THẾ TRÊN NỀN TẢN GIS 2- NHIỆM VỤ LUẬN VĂN: - Tìm hiểu kiến thức GIS - Tìm hiểu... công nghệ GIS vào việc quản lý vận hành lưới điện phân phối, cấu trúc sở liệu hợp lý để vừa quản lý cách trực quan sinh động vừa khai thác tốt thơng tin liên kết với số phần mềm khác sâu vào việc

Ngày đăng: 16/02/2021, 19:13

Mục lục

  • trang 1.pdf

  • Trang 2.pdf

  • trang 3.pdf

  • trang 4.pdf

  • trang 5.pdf

  • trang 6.pdf

  • MCLC~1.pdf

  • Noi dung (chinh).pdf

  • Cac phu luc 1.pdf

  • PHLC2~1.pdf

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan