Finally made it - A designator tag system for heavy concurrent environment

本文介绍了一种名为Designator的类的设计与实现细节,该类用于生成可打印的标识符标签字符串,支持任意位置插入新节点,并通过一种特殊的分数表示法解决了节点排序问题。
Download full Source Code here .
public class Designator
extends java.lang.Objectimplements java.lang.CharSequence, java.lang.Comparable<java.lang.CharSequence>

 

This class is designed and implemented to generate printable designator tag strings, with the theoretical target:

Printable
Designator tags are always able to convert to printable strings and vice versa. (via toString() and Designator(CharSequence) constructor)
Comparable
Designator tags or their string representations are comparable to eachother. (via the implemented Comparable interface or the Designator.DesignatorComparator class)
Insertable at Any Position
Given two designator tags: lower and upper, if lower.compareTo(upper) < 0 is true, then it is always possible to generate a new tag middle that between lower and upper, so lower.compareTo(middle) < 0 and upper.compareTo(middle) > 0 will both be true.

This class is so used to resolve sorting problems of sibling WoW nodes. Since WoW is web based thus allow concurrent modifications including inserting child nodes to a same parent node, maybe by many different users at the same time. And WoW use database instead of linear storage to store node data, so the sorting order of sibling nodes became quite unobvious. Using an integer number as the unique sequence number seems feasible but there will be situations when insert a new node between nodes designated by two integers that one directly follows another. Think about insert between 7 and 8, yes we can change the old 8 node's seq no to 9 and make the newly inserted 8. But there may already been 9, 10, 11 ... stand, in the worst case we'll have to modify all succeeding sibling nodes, as sequence numbers have to be persistent attributes, this will raise heavy concurrent contention risk.

Finally we need an sequencing schema that both allow random insertion at arbitrary positions and rarely need to change saved data. Then this class come into idea inspired by fractional arithmetic of the positional number system. You can find infinite numbers of fractional numbers between two of them. But that will produce more digits when these two number are very close, and the increase of digits is also infinite.

To determin whether a simular mechanism is suitable for WoW daily use, some estimation are made with this class, and the result shows the number of digits will exceed 250 only after randomly insert more than one million nodes under a particular one, since 250 is a reasonable tag length for modern data systems, it seems fairly feasible.

Technically, this class simulates a signed fractional number system with a base of 64. We use a single byte to store each digit value, this wastes 25% of the memory space but should be practically acceptable since it also improves the processing time performance. We use ASCII 0-9 A-Z a-z and { } as the digit symbols, and place them in their ASCII order, this simplifies and boosts comparation against string representations of designator tags.

Below are some estimation results produced by running the main(String[]) method.

 Firing 30000 random insert session with each 100 records at max.
 Designator length exceeds 250 after fired 23486 insert sessions and inserted 1178115 records.
 -------------------------------------------------
 Total inserted designators: 1504340
 Longest one is [257]: +}}}}}}}}}}}}}}v03000000000000030000000F0E}}}}}{F00000}}}}}}y000000300000EU}}}}}}}x}}}Vw}{00002}}}}}}}}}}}x{00002}}}}}}}}}}}}}W00000000000000102l0000000002}}}}}}}}}}}x}}Vw{000000000000002}}}{00000V000030000000000}}{000000E}}}}}}}}}}t}}}}}}}}}}}000000000000V
 Average length: 117
 Length above 2: 349 => 0‰
 Length above 4: 1457 => 0‰
 Length above 8: 7511 => 4‰
 Length above 16: 41436 => 27‰
 Length above 32: 145931 => 97‰
 Length above 64: 657302 => 436‰
 Length above 128: 650346 => 432‰
 Length above 256: 8 => 0‰
 Length above 512: 0 => 0‰
 Errors: 0
 
 Firing 30000 random insert session with each 100 records at max.
 Designator length exceeds 250 after fired 22650 insert sessions and inserted 1137011 records.
 -------------------------------------------------
 Total inserted designators: 1503406
 Longest one is [335]: -}}}}}}}}}}}}}}}}}}}}}}TlU}}}}}}}}}}}}}}}u00000000000100000000000000010000000U}}}}}}}y00000000000E}}}W0000U}}}}}}}}}l}}u00F000700F02}}}}V}}}}}}}}}V}}}}00000000000000002}}}}}}}}}}W00000000000000030000000000V02}}}}}}}}}}}}u000000000000000000}}}}}}}z}}}}}}}}y000000000000000002}}}{}}}}}}}}}}}}}{}}}}}}}}}00000000006}}}}}}}}}}}00000000000V
 Average length: 140
 Length above 2: 349 => 0‰
 Length above 4: 1381 => 0‰
 Length above 8: 6133 => 4‰
 Length above 16: 34476 => 22‰
 Length above 32: 199236 => 132‰
 Length above 64: 348206 => 231‰
 Length above 128: 847748 => 563‰
 Length above 256: 65877 => 43‰
 Length above 512: 0 => 0‰
 Errors: 0
 
 Firing 30000 random insert session with each 100 records at max.
 Designator length exceeds 250 after fired 25835 insert sessions and inserted 1293752 records.
 -------------------------------------------------
 Total inserted designators: 1504246
 Longest one is [265]: +gl00V000000000000U}}}}{}}}}}}}}}}}}}{000000000000E}}}}z}}}}}{00000000000013002}}}}}u0000000000000000}}}}}}}}}}}}z}}}}}}}}{00000F0002zs}}{0000010000000000V000000000000003000000V000E}}}}}}z}}}}t}}}}}}z}m0000006}}}}}V}}{000001000000000000000030000000000E}}}}}}}}}}}}W
 Average length: 111
 Length above 2: 335 => 0‰
 Length above 4: 2101 => 1‰
 Length above 8: 12525 => 8‰
 Length above 16: 76643 => 50‰
 Length above 32: 302603 => 201‰
 Length above 64: 527695 => 350‰
 Length above 128: 582167 => 387‰
 Length above 256: 177 => 0‰
 Length above 512: 0 => 0‰
 Errors: 0
 
 
arning: Module 'androidx.test.uiautomator_uiautomator' depends on non-existing optional_uses_libs 'com.android.extensions.xr' Warning: Module 'androidx.wear_wear' depends on non-existing optional_uses_libs 'wear-sdk' Warning: Module 'androidx.wear.compose_compose-foundation' depends on non-existi ng optional_uses_libs 'wear-sdk' [ 0% 172/131877] //external/icu/icu4c/source:libicuuc_stubdata clang++ stubdata FAILED: out/soong/.intermediates/external/icu/icu4c/source/libicuuc_stubdata/lin ux_glibc_x86_64_static/obj/external/icu/icu4c/source/stubdata/stubdata.o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ icu4c/source -Iexternal/icu/icu4c/source/common -Iexternal/icu/android_icu4c/inc lude -Iprebuilts/clang/host/linux-x86/clang-r547379/include/x86_64-unknown-linux -gnu/c++/v1 -Iprebuilts/clang/host/linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -nostdinc++ -Isystem/core/include -Isystem/loggin g/liblog/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ih ardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/in clude -Iframeworks/native/opengl/include -Iframeworks/av/include -Werror=bool-o peration -Werror=dangling -Werror=format-insufficient-args -Werror=implicit-int- float-conversion -Werror=int-in-bool-context -Werror=int-to-pointer-cast -Werror =pointer-to-int-cast -Werror=xor-used-as-pow -Wimplicit-int-float-conversion -Wn o-void-pointer-to-enum-cast -Wno-void-pointer-to-int-cast -Wno-pointer-to-int-ca st -Werror=fortify-source -Wno-unused-variable -Wno-missing-field-initializers - Wno-packed-non-pod -Werror=address-of-temporary -Werror=incompatible-function-po inter-types -Werror=null-dereference -Werror=return-type -Wno-tautological-const ant-compare -Wno-tautological-type-limit-compare -Wno-implicit-int-float-convers ion -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-const ruct -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversio n -Wno-deprecated-enum-enum-conversion -Wno-error=pessimizing-move -Wno-non-c-ty pedef-for-linkage -Wno-align-mismatch -Wno-error=unused-but-set-variable -Wno-er ror=unused-but-set-parameter -Wno-error=deprecated-builtins -Wno-error=deprecate d -Wno-error=invalid-offsetof -Wno-vla-cxx-extension -Wno-cast-function-type-mis match -fcommon -Wno-format-insufficient-args -Wno-misleading-indentation -Wno-b itwise-instead-of-logical -Wno-unused -Wno-unused-parameter -Wno-unused-but-set- parameter -Wno-unqualified-std-cast-call -Wno-array-parameter -Wno-gnu-offsetof- extensions -Wno-pessimizing-move -MD -MF out/soong/.intermediates/external/icu/i cu4c/source/libicuuc_stubdata/linux_glibc_x86_64_static/obj/external/icu/icu4c/s ource/stubdata/stubdata.o.d -o out/soong/.intermediates/external/icu/icu4c/sourc e/libicuuc_stubdata/linux_glibc_x86_64_static/obj/external/icu/icu4c/source/stub data/stubdata.o external/icu/icu4c/source/stubdata/stubdata.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW [ 0% 173/131877] //external/icu/libandroidicuinit:libandroidicuinit clang++ Icu FAILED: out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuini t/linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ libandroidicuinit/include -Iexternal/icu/libandroidicuinit -Iexternal/icu/icu4c/ source/common -Iexternal/icu/android_icu4c/include -Iprebuilts/clang/host/linux- x86/clang-r547379/include/x86_64-unknown-linux-gnu/c++/v1 -Iprebuilts/clang/host /linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -no stdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/au dio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/i nclude -Iframeworks/av/include -Werror=bool-operation -Werror=dangling -Werror= format-insufficient-args -Werror=implicit-int-float-conversion -Werror=int-in-bo ol-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=xor-u sed-as-pow -Wimplicit-int-float-conversion -Wno-void-pointer-to-enum-cast -Wno-v oid-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Wno-unu sed-variable -Wno-missing-field-initializers -Wno-packed-non-pod -Werror=address -of-temporary -Werror=incompatible-function-pointer-types -Werror=null-dereferen ce -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type -limit-compare -Wno-implicit-int-float-conversion -Wno-tautological-overlap-comp are -Wno-deprecated-copy -Wno-range-loop-construct -Wno-zero-as-null-pointer-con stant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conver sion -Wno-error=pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-misma tch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno- error=deprecated-builtins -Wno-error=deprecated -Wno-error=invalid-offsetof -Wno -vla-cxx-extension -Wno-cast-function-type-mismatch -fcommon -Wno-format-insuff icient-args -Wno-misleading-indentation -Wno-bitwise-instead-of-logical -Wno-unu sed -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unqualified-std-cas t-call -Wno-array-parameter -Wno-gnu-offsetof-extensions -Wno-pessimizing-move - MD -MF out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit /linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o. d -o out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit/l inux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/IcuRegistration.o ex ternal/icu/libandroidicuinit/IcuRegistration.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW [ 0% 174/131877] //external/icu/libandroidicuinit:libandroidicuinit clang++ and FAILED: out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuini t/linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init. o PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-r547379/ bin/clang++ -c -Wa,--noexecstack -fPIC -fno-omit-frame-pointer -U_FORTIFY_SOURC E -D_FORTIFY_SOURCE=3 -fstack-protector --gcc-toolchain=prebuilts/gcc/linux-x86/ host/x86_64-linux-glibc2.17-4.8 -fstack-protector-strong -m64 --sysroot prebuilt s/gcc/linux-x86/host/x86_64-linux-glibc2.17-4.8/sysroot -O2 -Wall -Wextra -Winit -self -Wpointer-arith -Wunguarded-availability -Werror=date-time -Werror=int-con version -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -Werror=sizeo f-array-div -Werror=string-plus-int -Werror=unreachable-code-loop-increment -Wno -error=deprecated-declarations -Wno-c23-extensions -Wno-c99-designator -Wno-gnu- folding-constant -Wno-inconsistent-missing-override -Wno-error=reorder-init-list -Wno-reorder-init-list -Wno-sign-compare -Wno-unused -DANDROID -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WE AK__ -faddrsig -fdebug-default-version=5 -fcolor-diagnostics -ffp-contract=off - fno-exceptions -fno-strict-aliasing -fmessage-length=0 -gsimple-template-names - gz=zstd -no-canonical-prefixes -fdebug-prefix-map=/proc/self/cwd= -ftrivial-auto -var-init=zero -Wno-unused-command-line-argument -g -Wno-enum-compare -Wno-enum -compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer- compare -Wno-final-dtor-non-final-class -Wno-psabi -Wno-null-pointer-subtraction -Wno-string-concatenation -Wno-deprecated-non-prototype -Wno-unused -Wno-deprec ated -Wno-error=format -target x86_64-linux-gnu -fPIC -Wimplicit-fallthrough -D _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -Iexternal/icu/ libandroidicuinit/include -Iexternal/icu/libandroidicuinit -Iexternal/icu/icu4c/ source/common -Iexternal/icu/android_icu4c/include -Iprebuilts/clang/host/linux- x86/clang-r547379/include/x86_64-unknown-linux-gnu/c++/v1 -Iprebuilts/clang/host /linux-x86/clang-r547379/include/c++/v1 -Wall -Werror -std=gnu++20 -fno-rtti -no stdinc++ -Isystem/core/include -Isystem/logging/liblog/include -Isystem/media/au dio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Iframeworks/native/include -Iframeworks/native/opengl/i nclude -Iframeworks/av/include -Werror=bool-operation -Werror=dangling -Werror= format-insufficient-args -Werror=implicit-int-float-conversion -Werror=int-in-bo ol-context -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=xor-u sed-as-pow -Wimplicit-int-float-conversion -Wno-void-pointer-to-enum-cast -Wno-v oid-pointer-to-int-cast -Wno-pointer-to-int-cast -Werror=fortify-source -Wno-unu sed-variable -Wno-missing-field-initializers -Wno-packed-non-pod -Werror=address -of-temporary -Werror=incompatible-function-pointer-types -Werror=null-dereferen ce -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type -limit-compare -Wno-implicit-int-float-conversion -Wno-tautological-overlap-comp are -Wno-deprecated-copy -Wno-range-loop-construct -Wno-zero-as-null-pointer-con stant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conver sion -Wno-error=pessimizing-move -Wno-non-c-typedef-for-linkage -Wno-align-misma tch -Wno-error=unused-but-set-variable -Wno-error=unused-but-set-parameter -Wno- error=deprecated-builtins -Wno-error=deprecated -Wno-error=invalid-offsetof -Wno -vla-cxx-extension -Wno-cast-function-type-mismatch -fcommon -Wno-format-insuff icient-args -Wno-misleading-indentation -Wno-bitwise-instead-of-logical -Wno-unu sed -Wno-unused-parameter -Wno-unused-but-set-parameter -Wno-unqualified-std-cas t-call -Wno-array-parameter -Wno-gnu-offsetof-extensions -Wno-pessimizing-move - MD -MF out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit /linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init.o .d -o out/soong/.intermediates/external/icu/libandroidicuinit/libandroidicuinit/ linux_glibc_x86_64_static/obj/external/icu/libandroidicuinit/android_icu_init.o external/icu/libandroidicuinit/android_icu_init.cpp ccache: error: Failed to create directory /home/hya/.ccache/tmp: Read-only file system \nWrite to a read-only file system detected. Possible fixes include 1. Generate file directly to out/ which is ReadWrite, #recommend solution 2. BUILD_BROKEN_SRC_DIR_RW_ALLOWLIST := <my/path/1> <my/path/2> #discouraged, su bset of source tree will be RW 3. BUILD_BROKEN_SRC_DIR_IS_WRITABLE := true #highly discouraged, entire source t ree will be RW 02:46:49 ninja failed with: exit status 1 #### failed to build some targets (10:52 (mm:ss)) ####
09-18
【电动汽车充电站有序充电调度的分散式优化】基于蒙特卡诺和拉格朗日的电动汽车优化调度(分时电价调度)(Matlab代码实现)内容概要:本文介绍了基于蒙特卡洛和拉格朗日方法的电动汽车充电站有序充电调度优化方案,重点在于采用分散式优化策略应对分时电价机制下的充电需求管理。通过构建数学模型,结合不确定性因素如用户充电行为和电网负荷波动,利用蒙特卡洛模拟生成大量场景,并运用拉格朗日松弛法对复杂问题进行分解求解,从而实现全局最优或近似最优的充电调度计划。该方法有效降低了电网峰值负荷压力,提升了充电站运营效率与经济效益,同时兼顾用户充电便利性。 适合人群:具备一定电力系统、优化算法和Matlab编程基础的高校研究生、科研人员及从事智能电网、电动汽车相关领域的工程技术人员。 使用场景及目标:①应用于电动汽车充电站的日常运营管理,优化充电负荷分布;②服务于城市智能交通系统规划,提升电网与交通系统的协同水平;③作为学术研究案例,用于验证分散式优化算法在复杂能源系统中的有效性。 阅读建议:建议读者结合Matlab代码实现部分,深入理解蒙特卡洛模拟与拉格朗日松弛法的具体实施步骤,重点关注场景生成、约束处理与迭代收敛过程,以便在实际项目中灵活应用与改进。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值