table access & join method

本文介绍了几种不同的表访问方法和表连接方法。对于表访问方法,包括全文本扫描、索引唯一扫描、索引范围扫描等;对于表连接方法,则涵盖了自然连接、合并连接及哈希连接等方式。

table access method
0. FTS
full table scan
1. INDEX
1.1 index unqiue scan
1.2 index rang scan
1.3 index full scan
1.4 index skip scan
1.5 index fast full scan
2. ROWID

table join method
0. use_nl
1. use_merge
2. use_hash

-The End-

请根据下方sql和执行计划结果,根据执行计划分析优化一下sql的查询效率并给出最终优化后的查询sql SELECT ('01' || tc.trade_confirm_id) AS rs_id, tc.workday AS workday, NULL AS subcenter, ta.name AS trade_account_name, tc.trade_account_no AS trade_account_no, tc.trust_channel_id AS trust_channel_id, tc.ta_account_no AS ta_account_no, tc.fund_code AS fund_code, tc.confirm_amount AS amount, '01' AS accrual_id, NULL AS investor_bank_code, NULL AS investor_bank_acco_name, NULL AS investor_bank_acco_bank_branch, NULL AS investor_bank_acco_no, (CASE WHEN cr.capital_channel_id = '5' THEN SUBSTR(v.bis_serial_no, 7) WHEN cr.capital_channel_id = '2' THEN SUBSTR(v.bis_serial_no, 6) ELSE v.bis_serial_no END) AS request_serial_no, '156' AS currency, tr.station_id AS station_id, (CASE WHEN tr.business_type = 'T422' THEN (CASE (SELECT pd.type FROM pd_fund pd WHERE pd.fund_code = tr.target_fund_code) WHEN '10' THEN NVL(tc.return_channel_id, '8') ELSE 'y' END) WHEN tc.return_channel_id in ('7a', '8a') THEN NVL(tb.return_channel_id, pc.pay_channel_id) ELSE NVL(tc.return_channel_id, pc.pay_channel_id) END) AS ccs_capital_method, ca.bank_branch_code AS bank_firm_no, NULL AS seller_account_id, v.business_time AS business_time, (SELECT t.target_value FROM fw_map t WHERE t.map_group = 'CUSTOMER_TYPE_OTS_CCS' AND t.source_value = ta.customer_type_id) AS customer_type_id, NULL AS business_aided_code, NULL AS remit_status, v.bank_serial_no AS opposite_serial_no, tc.target_fund_code AS opposite_fund_code, NULL AS source_request_capital_method, tc.confirm_no AS keep_field, TO_DATE('2025-09-03', 'YYYY-MM-DD') AS exec_workday, tc.confirm_no AS ta_confirm_no, NULL AS IS_TRANSFERED, NULL AS CCS_ACCOUNT_ID, NULL AS TRADE_BUSINESS_TIME, TC.TA_CODE AS TA_CODE, NULL AS ta_confirm_code, TO_CHAR(tc.buy_transfer_date, 'yyyyMMdd') AS loan_date, '02' AS batch_no, tc.trade_request_id AS application_sheet_id, (CASE WHEN tr.business_type = 'TI22' THEN tr.source_request_id ELSE tr.trade_request_id END) AS request_group_id FROM (SELECT TTB.TRADE_BUSINESS_ID TRADE_CONFIRM_ID, 'T' || TTB.BUSINESS_TYPE BUSINESS_TYPE, TTB.TRADE_REQUEST_ID TRADE_REQUEST_ID, TTB.CONFIRM_NO CONFIRM_NO, TTB.TA_ACCOUNT_NO TA_ACCOUNT_NO, TTB.TRADE_ACCOUNT_NO TRADE_ACCOUNT_NO, TTB.TRUST_CHANNEL_ID TRUST_CHANNEL_ID, TTB.PAYMENT_CHANNEL_ID, TTB.FUND_CODE FUND_CODE, TTB.CONFIRM_STATE CONFIRM_STATE, TTB.APPLICATION_AMOUNT APPLICATION_AMOUNT, TTB.CONFIRM_AMOUNT CONFIRM_AMOUNT, TTB.CONFIRM_INTEREST CONFIRM_INTEREST, TTB.TRANSFER_AMOUNT, TTB.WORKDAY WORKDAY, TTB.RETURN_CHANNEL_ID RETURN_CHANNEL_ID, TTB.RETURN_CHANNEL_ACCOUNT_NO RETURN_CHANNEL_ACCOUNT_NO, TTB.TA_CODE TA_CODE, TTB.REDEEM_CAPITAL_RECEIVE_DAYS REDEEM_CAPITAL_RECEIVE_DAYS, TTB.BUY_CONFIRM_RETURN_DAYS BUY_CONFIRM_RETURN_DAYS, TTB.BUY_TRANSFER_DATE BUY_TRANSFER_DATE, TTB.TARGET_FUND_CODE TARGET_FUND_CODE, TTB.REQUEST_GROUP_ID REQUEST_GROUP_ID FROM TR_TRADE_BUSINESS TTB WHERE TTB.BUSINESS_CATEGORY = '30' AND TTB.BUSINESS_TYPE <> '143' AND TTB.WORKDAY >= TO_DATE('2025-09-03', 'YYYY-MM-DD') AND TTB.WORKDAY < TO_DATE('2025-09-03', 'YYYY-MM-DD') + 1 AND (TTB.TA_CODE = '02' or TTB.TA_CODE = '04' or TTB.TA_CODE = '05' or TTB.TA_CODE = '06' or TTB.TA_CODE = '08' or TTB.TA_CODE = '09' or TTB.TA_CODE = '0A' or TTB.TA_CODE = '0F' or TTB.TA_CODE = '0Q' or TTB.TA_CODE = '0W' or TTB.TA_CODE = '0Z' or TTB.TA_CODE = '12' or TTB.TA_CODE = '15' or TTB.TA_CODE = '16' or TTB.TA_CODE = '17' or TTB.TA_CODE = '1L' or TTB.TA_CODE = '1M' or TTB.TA_CODE = '1N' or TTB.TA_CODE = '20' or TTB.TA_CODE = '21' or TTB.TA_CODE = '23' or TTB.TA_CODE = '25' or TTB.TA_CODE = '27' or TTB.TA_CODE = '29' or TTB.TA_CODE = '2E' or TTB.TA_CODE = '30' or TTB.TA_CODE = '32' or TTB.TA_CODE = '33' or TTB.TA_CODE = '34' or TTB.TA_CODE = '36' or TTB.TA_CODE = '37' or TTB.TA_CODE = '39' or TTB.TA_CODE = '3J' or TTB.TA_CODE = '3K' or TTB.TA_CODE = '3M' or TTB.TA_CODE = '3Q' or TTB.TA_CODE = '3Z' or TTB.TA_CODE = '40' or TTB.TA_CODE = '42' or TTB.TA_CODE = '46' or TTB.TA_CODE = '47' or TTB.TA_CODE = '49' or TTB.TA_CODE = '4C' or TTB.TA_CODE = '4T' or TTB.TA_CODE = '4U' or TTB.TA_CODE = '4Z' or TTB.TA_CODE = '53' or TTB.TA_CODE = '55' or TTB.TA_CODE = '57' or TTB.TA_CODE = '58' or TTB.TA_CODE = '5C' or TTB.TA_CODE = '5D' or TTB.TA_CODE = '5L' or TTB.TA_CODE = '5R' or TTB.TA_CODE = '60' or TTB.TA_CODE = '62' or TTB.TA_CODE = '63' or TTB.TA_CODE = '67' or TTB.TA_CODE = '69' or TTB.TA_CODE = '6E' or TTB.TA_CODE = '6F' or TTB.TA_CODE = '6K' or TTB.TA_CODE = '70' or TTB.TA_CODE = '74' or TTB.TA_CODE = '75' or TTB.TA_CODE = '76' or TTB.TA_CODE = '7B' or TTB.TA_CODE = '81' or TTB.TA_CODE = '94' or TTB.TA_CODE = '95' or TTB.TA_CODE = 'B0' or TTB.TA_CODE = 'C4' or TTB.TA_CODE = 'CJ' or TTB.TA_CODE = 'H0' or TTB.TA_CODE = 'SP' or TTB.TA_CODE = 'B6' or TTB.TA_CODE = '0')) tc LEFT JOIN tr_trade_business tb ON tc.trade_request_id = tb.trade_business_id LEFT JOIN tr_business_relation br ON br.atom_business_id = tc.trade_request_id LEFT JOIN tr_trade_request tr ON tr.trade_request_id = br.business_id LEFT JOIN ac_trade_account ta ON ta.trade_account_no = tc.trade_account_no LEFT JOIN ac_return_account_latest cu ON tc.trade_account_no = cu.trade_account_no AND tc.PAYMENT_CHANNEL_ID = cu.trust_channel_id LEFT JOIN ac_current_account ca ON cu.current_account_id = ca.current_account_id LEFT JOIN ac_payment_channel pc ON pc.payment_channel_id = tc.PAYMENT_CHANNEL_ID LEFT JOIN ca_voucher v ON v.trade_request_id = tc.trade_request_id LEFT JOIN ca_channel_relation cr ON cr.channel_relation_id = v.channel_relation_id WHERE (tc.business_type = 'T122' OR tc.business_type = 'T139' OR tc.business_type = 'T191') AND tc.confirm_amount <> 0 AND tc.workday >= TO_DATE('2025-09-03', 'YYYY-MM-DD') AND tc.workday < TO_DATE('2025-09-03', 'YYYY-MM-DD') + 1 执行计划 Description 对象所有者 对象名称 耗费 基数 字节 SELECT STATEMENT, GOAL = ALL_ROWS 14,906 3 1,413 TABLE ACCESS BY INDEX ROWID WOTS PD_FUND 2 1 10 INDEX UNIQUE SCAN WOTS PK_PD_FUND 1 1 INDEX RANGE SCAN WOTS FW_TRANSLATE_IX1 2 1 33 NESTED LOOPS OUTER 14,906 3 1,413 NESTED LOOPS OUTER 14,897 3 1,326 NESTED LOOPS OUTER 14,891 3 1,134 HASH JOIN OUTER 14,887 3 1,032 NESTED LOOPS OUTER 14,884 3 1,008 NESTED LOOPS OUTER 14,882 3 855 HASH JOIN OUTER 14,879 3 660 NESTED LOOPS OUTER 12,802 3 570 NESTED LOOPS OUTER 12,799 3 507 TABLE ACCESS BY INDEX ROWID WOTS TR_TRADE_BUSINESS 12,798 3 456 INDEX RANGE SCAN WOTS TR_TRADE_BUSINESS_IX6 333 60,843 TABLE ACCESS BY INDEX ROWID WOTS AC_PAYMENT_CHANNEL 1 1 17 INDEX UNIQUE SCAN WOTS PK_AC_PAYMENT_CHANNEL 0 1 INDEX RANGE SCAN WOTS IDX_AC_TRADE_ACCOUNT_2 1 1 21 VIEW WOTS AC_RETURN_ACCOUNT_LATEST 2,077 125,458 3,763,740 NESTED LOOPS OUTER 2,077 125,458 6,649,274 VIEW WOTS 2,062 125,458 5,018,320 WINDOW SORT PUSHED RANK 2,062 125,458 6,649,274 TABLE ACCESS FULL WOTS AC_PAYMENT_ACCOUNT 418 125,458 6,649,274 INDEX UNIQUE SCAN WOTS PK_AC_CURRENT_ACCOUNT 0 1 13 TABLE ACCESS BY INDEX ROWID WOTS AC_CURRENT_ACCOUNT 1 1 65 INDEX UNIQUE SCAN WOTS PK_AC_CURRENT_ACCOUNT 0 1 INDEX RANGE SCAN WOTS IDX_CA_VOUCHER_6 2 1 51 VIEW WOTS index$_join$_021 2 28 224 HASH JOIN INDEX FAST FULL SCAN WOTS IDX_CA_CHANNEL_RELATION_1 1 28 224 INDEX FAST FULL SCAN WOTS PK_CA_CHANNEL_RELATION 1 28 224 TABLE ACCESS BY INDEX ROWID WOTS TR_BUSINESS_RELATION 4 1 34 INDEX RANGE SCAN WOTS IDX_TR_BUSINESS_RELATION_1 3 1 TABLE ACCESS BY INDEX ROWID WOTS TR_TRADE_REQUEST 2 1 64 INDEX UNIQUE SCAN WOTS PK_TR_TRADE_REQUEST 1 1 TABLE ACCESS BY INDEX ROWID WOTS TR_TRADE_BUSINESS 3 1 29 INDEX UNIQUE SCAN WOTS PK_TR_TRADE_BUSINESS 2 1
09-09
""" title: SQL Server Access author: MENG author_urls: - https://github.com/mengvision description: A tool for reading database information and executing SQL queries, supporting multiple databases such as MySQL, PostgreSQL, SQLite, and Oracle. It provides functionalities for listing all tables, describing table schemas, and returning query results in CSV format. A versatile DB Agent for seamless database interactions. required_open_webui_version: 0.5.4 requirements: pymysql, sqlalchemy, cx_Oracle version: 0.1.6 licence: MIT # Changelog ## [0.1.6] - 2025-03-11 ### Added - Added `get_table_indexes` method to retrieve index information for a specific table, supporting MySQL, PostgreSQL, SQLite, and Oracle. - Enhanced metadata capabilities by providing detailed index descriptions (e.g., index name, columns, and type). - Improved documentation to include the new `get_table_indexes` method and its usage examples. - Updated error handling in `get_table_indexes` to provide more detailed feedback for unsupported database types. ## [0.1.5] - 2025-01-20 ### Changed - Updated `list_all_tables` and `table_data_schema` methods to accept `db_name` as a function parameter instead of using `self.valves.db_name`. - Improved flexibility by decoupling database name from class variables, allowing dynamic database selection at runtime. ## [0.1.4] - 2025-01-17 ### Added - Added support for Oracle database using `cx_Oracle` driver. - Added dynamic engine creation in each method to ensure fresh database connections for every operation. - Added support for Oracle-specific queries in `list_all_tables` and `table_data_schema` methods. ### Changed - Moved `self._get_engine()` from `__init__` to individual methods for better flexibility and tool compatibility. - Updated `_get_engine` method to support Oracle database connection URL. - Improved `table_data_schema` method to handle Oracle-specific column metadata. ### Fixed - Fixed potential connection issues by ensuring each method creates its own database engine. - Improved error handling for Oracle-specific queries and edge cases. ## [0.1.3] - 2025-01-17 ### Added - Added support for multiple database types (e.g., MySQL, PostgreSQL, SQLite) using SQLAlchemy. - Added configuration flexibility through environment variables or external configuration files. - Enhanced query security with stricter validation and SQL injection prevention. - Improved error handling with detailed exception messages for better debugging. ### Changed - Replaced `pymysql` with SQLAlchemy for broader database compatibility. - Abstracted database connection logic into a reusable `_get_engine` method. - Updated `table_data_schema` method to support multiple database types. ### Fixed - Fixed potential SQL injection vulnerabilities in query execution. - Improved handling of edge cases in query validation and execution. ## [0.1.2] - 2025-01-16 ### Added - Added support for specifying the database port with a default value of `3306`. - Abstracted database connection logic into a reusable `_get_connection` method. ## [0.1.1] - 2025-01-16 ### Added - Support for additional read-only query types: `SHOW`, `DESCRIBE`, `EXPLAIN`, and `USE`. - Enhanced query validation to block sensitive keywords (e.g., `INSERT`, `UPDATE`, `DELETE`, `CREATE`, `DROP`, `ALTER`). ### Fixed - Improved handling of queries starting with `WITH` (CTE queries). - Fixed case sensitivity issues in query validation. ## [0.1.0] - 2025-01-09 ### Initial Release - Basic functionality for listing tables, describing table schemas, and executing `SELECT` queries. - Query results returned in CSV format. """ import os from typing import List, Dict, Any from pydantic import BaseModel, Field import re from sqlalchemy import create_engine, text from sqlalchemy.engine.base import Engine from sqlalchemy.exc import SQLAlchemyError class Tools: class Valves(BaseModel): db_host: str = Field( default="localhost", description="The host of the database. Replace with your own host.", ) db_user: str = Field( default="admin", description="The username for the database. Replace with your own username.", ) db_password: str = Field( default="admin", description="The password for the database. Replace with your own password.", ) db_name: str = Field( default="db", description="The name of the database. Replace with your own database name.", ) db_port: int = Field( default=3306, # Oracle 默认端口 description="The port of the database. Replace with your own port.", ) db_type: str = Field( default="mysql", description="The type of the database (e.g., mysql, postgresql, sqlite, oracle).", ) def __init__(self): """ Initialize the Tools class with the credentials for the database. """ print("Initializing database tool class") self.citation = True self.valves = Tools.Valves() def _get_engine(self) -> Engine: """ Create and return a database engine using the current configuration. """ if self.valves.db_type == "mysql": db_url = f"mysql+pymysql://{self.valves.db_user}:{self.valves.db_password}@{self.valves.db_host}:{self.valves.db_port}/{self.valves.db_name}" elif self.valves.db_type == "postgresql": db_url = f"postgresql://{self.valves.db_user}:{self.valves.db_password}@{self.valves.db_host}:{self.valves.db_port}/{self.valves.db_name}" elif self.valves.db_type == "sqlite": db_url = f"sqlite:///{self.valves.db_name}" elif self.valves.db_type == "oracle": db_url = f"oracle+cx_oracle://{self.valves.db_user}:{self.valves.db_password}@{self.valves.db_host}:{self.valves.db_port}/?service_name={self.valves.db_name}" else: raise ValueError(f"Unsupported database type: {self.valves.db_type}") return create_engine(db_url) def list_all_tables(self, db_name: str) -> str: """ List all tables in the database. :param db_name: The name of the database. :return: A string containing the names of all tables. """ print("Listing all tables in the database") engine = self._get_engine() # 动态创建引擎 try: with engine.connect() as conn: if self.valves.db_type == "mysql": result = conn.execute(text("SHOW TABLES;")) elif self.valves.db_type == "postgresql": result = conn.execute( text( "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';" ) ) elif self.valves.db_type == "sqlite": result = conn.execute( text("SELECT name FROM sqlite_master WHERE type='table';") ) elif self.valves.db_type == "oracle": result = conn.execute(text("SELECT table_name FROM user_tables;")) else: return "Unsupported database type." tables = [row[0] for row in result.fetchall()] if tables: return ( "Here is a list of all the tables in the database:\n\n" + "\n".join(tables) ) else: return "No tables found." except SQLAlchemyError as e: return f"Error listing tables: {str(e)}" def get_table_indexes(self, db_name: str, table_name: str) -> str: """ Get the indexes of a specific table in the database. :param db_name: The name of the database. :param table_name: The name of the table. :return: A string describing the indexes of the table. """ print(f"Getting indexes for table: {table_name}") engine = self._get_engine() try: key, cloumn = 0, 1 with engine.connect() as conn: if self.valves.db_type == "mysql": query = text(f"SHOW INDEX FROM {table_name}") key, cloumn = 2, 4 elif self.valves.db_type == "postgresql": query = text( """ SELECT indexname, indexdef FROM pg_indexes WHERE tablename = :table_name; """ ) elif self.valves.db_type == "sqlite": query = text( """ PRAGMA index_list(:table_name); """ ) elif self.valves.db_type == "oracle": query = text( """ SELECT index_name, column_name FROM user_ind_columns WHERE table_name = :table_name; """ ) else: return "Unsupported database type." result = conn.execute(query) indexes = result.fetchall() if not indexes: return f"No indexes found for table: {table_name}" description = f"Indexes for table '{table_name}':\n" for index in indexes: description += f"- {index[key]}: {index[cloumn]}\n" return description # result = conn.execute(query) # description = result.fetchall() # if not description: # return f"No indexes found for table: {table_name}" # column_names = result.keys() # description = f"Query executed successfully. Below is the actual result of the query {query} running against the database in CSV format:\n\n" # description += ",".join(column_names) + "\n" # for row in description: # description += ",".join(map(str, row)) + "\n" # return description except SQLAlchemyError as e: return f"Error getting indexes: {str(e)}" def table_data_schema(self, db_name: str, table_name: str) -> str: """ Describe the schema of a specific table in the database, including column comments. :param db_name: The name of the database. :param table_name: The name of the table to describe. :return: A string describing the data schema of the table. """ print(f"Database: {self.valves.db_name}") print(f"Describing table: {table_name}") engine = self._get_engine() # 动态创建引擎 try: with engine.connect() as conn: if self.valves.db_type == "mysql": query = text( " SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, COLUMN_KEY, COLUMN_COMMENT " " FROM INFORMATION_SCHEMA.COLUMNS " f" WHERE TABLE_SCHEMA = '{self.valves.db_name}' AND TABLE_NAME = '{table_name}';" ) elif self.valves.db_type == "postgresql": query = text( """ SELECT column_name, data_type, is_nullable, column_default, '' FROM information_schema.columns WHERE table_name = :table_name; """ ) elif self.valves.db_type == "sqlite": query = text("PRAGMA table_info(:table_name);") elif self.valves.db_type == "oracle": query = text( """ SELECT column_name, data_type, nullable, data_default, comments FROM user_tab_columns LEFT JOIN user_col_comments ON user_tab_columns.table_name = user_col_comments.table_name AND user_tab_columns.column_name = user_col_comments.column_name WHERE user_tab_columns.table_name = :table_name; """ ) else: return "Unsupported database type." # result = conn.execute( # query, {"db_name": db_name, "table_name": table_name} # ) result = conn.execute(query) columns = result.fetchall() if not columns: return f"No such table: {table_name}" description = ( f"Table '{table_name}' in the database has the following columns:\n" ) for column in columns: if self.valves.db_type == "sqlite": column_name, data_type, is_nullable, _, _, _ = column column_comment = "" elif self.valves.db_type == "oracle": ( column_name, data_type, is_nullable, data_default, column_comment, ) = column else: ( column_name, data_type, is_nullable, column_key, column_comment, ) = column description += f"- {column_name} ({data_type})" if is_nullable == "YES" or is_nullable == "Y": description += " [Nullable]" if column_key == "PRI": description += " [Primary Key]" if column_comment: description += f" [Comment: {column_comment}]" description += "\n" return description except SQLAlchemyError as e: return f"Error describing table: {str(e)}" def execute_read_query(self, query: str) -> str: """ Execute a read query and return the result in CSV format. :param query: The SQL query to execute. :return: A string containing the result of the query in CSV format. """ print(f"Executing query: {query}") normalized_query = query.strip().lower() if not re.match( r"^\s*(select|with|show|describe|desc|explain|use)\s", normalized_query ): return "Error: Only read-only queries (SELECT, WITH, SHOW, DESCRIBE, EXPLAIN, USE) are allowed. CREATE, DELETE, INSERT, UPDATE, DROP, and ALTER operations are not permitted." sensitive_keywords = [ "insert", "update", "delete", "create", "drop", "alter", "truncate", "grant", "revoke", "replace", ] for keyword in sensitive_keywords: if re.search(rf"\b{keyword}\b", normalized_query): return f"Error: Query contains a sensitive keyword '{keyword}'. Only read operations are allowed." engine = self._get_engine() # 动态创建引擎 try: with engine.connect() as conn: result = conn.execute(text(query)) rows = result.fetchall() if not rows: return "No data returned from query." column_names = result.keys() csv_data = f"Query executed successfully. Below is the actual result of the query {query} running against the database in CSV format:\n\n" csv_data += ",".join(column_names) + "\n" for row in rows: csv_data += ",".join(map(str, row)) + "\n" return csv_data except SQLAlchemyError as e: return f"Error executing query: {str(e)}" 将上面的工具连接到Microsoft sql server
07-23
【电动汽车充电站有序充电调度的分散式优化】基于蒙特卡诺和拉格朗日的电动汽车优化调度(分时电价调度)(Matlab代码实现)内容概要:本文介绍了基于蒙特卡洛和拉格朗日方法的电动汽车充电站有序充电调度优化方案,重点在于采用分散式优化策略应对分时电价机制下的充电需求管理。通过构建数学模型,结合不确定性因素如用户充电行为和电网负荷波动,利用蒙特卡洛模拟生成大量场景,并运用拉格朗日松弛法对复杂问题进行分解求解,从而实现全局最优或近似最优的充电调度计划。该方法有效降低了电网峰值负荷压力,提升了充电站运营效率与经济效益,同时兼顾用户充电便利性。 适合人群:具备一定电力系统、优化算法和Matlab编程基础的高校研究生、科研人员及从事智能电网、电动汽车相关领域的工程技术人员。 使用场景及目标:①应用于电动汽车充电站的日常运营管理,优化充电负荷分布;②服务于城市智能交通系统规划,提升电网与交通系统的协同水平;③作为学术研究案例,用于验证分散式优化算法在复杂能源系统中的有效性。 阅读建议:建议读者结合Matlab代码实现部分,深入理解蒙特卡洛模拟与拉格朗日松弛法的具体实施步骤,重点关注场景生成、约束处理与迭代收敛过程,以便在实际项目中灵活应用与改进。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值