修复循环信号与事件采样并接入 LSTP 接触定位,补充八路验证及复用实验
相较上一版 Jacobian 确定性复用更新,本次补齐事件边界一致性、结果两侧采样及接触事件定位;保留已有物性复用和组件力学公式。 - 统一 UD00 信号求值与下一事件查询的绝对时间边界,修复循环边界浮点舍入导致的阶段错位、重复或漏报,并覆盖零时长、多阶段及长周期场景。 - 引入原生输出语义 v2:保留规则网格真实时间,补充内部时间事件和状态事件的左邻及事件后采样,按保存时间、状态和离散模式重放结果。 - 两条代码生成路径均发出 LSTP 接触描述,默认定位间隙过零及非负力模式的力截断;仅在接受事件时更新防重复记录,增加 contactEvents 诊断计数。 - 补充 MASS/LSTP 独立事件实验、八路全曲线与驱动阶段配对评估,以及 Amesim 不连续点输出对照和力差定位报告;MASS 新增释放机制仍保留为独立实验。 - 保存局部 probe、context 访问与回退、shadow replay、R288 real skip/typed replay 及阀门数值尾部诊断工具和报告;未证明净收益的实验不启用为生产默认优化。 - 更新原生运行说明和元件建模规范,补充信号边界、输出语义、接触事件和实验依赖回归测试。 验证:五组专项回归共 34 项全部通过;37 个待提交 Python 文件语法检查通过;git diff --cached --check 通过。
This commit is contained in:
1 parent
1aac220084
commit
7611f13208
85 files changed
+11358
-33
No files matched your search
@@ -0,0 +1,53 @@
|
||||
/* Diagnostic-only exclusive buckets; included only by the copied worker. */
|
||||
#ifndef LOCAL_PROBE_PROFILE_H
|
||||
#define LOCAL_PROBE_PROFILE_H
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#endif
|
||||
#include <windows.h>
|
||||
#include <stdint.h>
|
||||
#include <cpuid.h>
|
||||
#include "local_probe.h"
|
||||
enum { PF_OTHER, PF_INCREMENT, PF_PERTURB, PF_ZERO, PF_ASSEMBLY,
|
||||
PF_BASELINE, PF_INIT, PF_GAS_PREP, PF_RETAINED, PF_FALLBACK,
|
||||
PF_CONTEXT, PF_SNAPSHOT, PF_RESTORE, PF_NODE, PF_PORT,
|
||||
PF_MECHANICAL, PF_GAS_EQUATIONS, PF_OUTPUTS, PF_PIPE,
|
||||
PF_FINITE, PF_DISPATCH, PF_FULL_FALLBACK, PF_CATEGORIES };
|
||||
/* row 0 = outer callback, row 1 = baseline, row 2+g = probe group g. */
|
||||
typedef struct { uint64_t ticks,intervals; } PfBucket;
|
||||
extern PfBucket pf_buckets[LP_NC+2][PF_CATEGORIES],*pf_current;
|
||||
extern uint64_t pf_previous_tick;
|
||||
extern unsigned pf_row;
|
||||
extern int pf_coarse;
|
||||
extern const unsigned char pf_affected[LP_NC][LP_NO];
|
||||
extern uint64_t pf_operations[LP_NC][2];
|
||||
static inline uint64_t pf_clock(void){
|
||||
unsigned lo,hi;
|
||||
__asm__ __volatile__("lfence\n\trdtsc\n\tlfence" : "=a"(lo),"=d"(hi) :: "memory");
|
||||
return ((uint64_t)hi<<32)|lo;
|
||||
}
|
||||
static inline void pf_mark(unsigned category) {
|
||||
uint64_t t=pf_clock();
|
||||
pf_current->ticks+=t-pf_previous_tick;
|
||||
pf_current->intervals++;
|
||||
pf_previous_tick=t;pf_current=&pf_buckets[pf_row][category];
|
||||
}
|
||||
#define PF_MARK(category) pf_mark(category)
|
||||
#define PF_SCOPE(row,category) do {pf_row=(row);pf_mark(category);} while(0)
|
||||
#define PF_PROBE(category) do {if(lp_color>=0)pf_mark(category);} while(0)
|
||||
void pf_initialize(void);void pf_finish(void);
|
||||
int pf_select(void);void pf_flush(uint64_t,uint64_t);
|
||||
void pf_eval_count(void);
|
||||
static inline void pf_operation(int position){
|
||||
int retained=pf_affected[lp_color][position];
|
||||
pf_operations[lp_color][retained?0:1]++;
|
||||
PF_MARK(retained?PF_RETAINED:PF_FALLBACK);
|
||||
}
|
||||
void pf_open(void);void pf_close(void);
|
||||
void pf_snapshot(int,NativePropertyCache*,NativePipeCache*);
|
||||
void pf_save(double*,double*,double*,double*,double*);
|
||||
int pf_reuse(int,NativePropertyCache*,NativePipeCache*,double*,double*,double*,double*,double*);
|
||||
int pf_lp_eval(double,const double*,double*,double*,ModelJacobianWorkspace*);
|
||||
void lp_jac_time_end(uint64_t,uint64_t);
|
||||
void pf_validate_matrix(double,const double*,const double*);
|
||||
#endif
|
||||
Reference in new issue
Block a user