2026a

# 系统配置


软件或模型进行相关系统环境设置,如可设置环境的路径,可设置编译平台的信息。

函数名 简介
SetWorkPath 设置软件工作路径
WorkPath 获取软件工作路径
SetSimResultPath 设置仿真结果路径
SimResultPath 获取仿真结果路径
SetCompileInfo 设置编译器信息
GetCompileInfo 获取编译信息
SwitchSolverPlatform 切换求解平台

# SetWorkPath

设置工作路径。

# 语法

/**
* @brief 设置工作目录
* @param [in]工作路径
*/
void SetWorkPath(const std::wstring &work_path);

# 说明

设置工作路径,软件工作路径。

# 示例

std::wstring path = classMgr->GetCoreOption->WorkPath();
classMgr->GetCoreOption->SetWorkPath(new_path);
std::wstring res_path = classMgr->GetCoreOption->WorkPath();

# WorkPath

获取工作路径。

# 语法

/**
* @brief 获取工作目录
*/
std::wstring WorkPath();

# 说明

获取工作路径,运行软件的路径。

# 示例

std::wstring path = classMgr->GetCoreOption->WorkPath();
classMgr->GetCoreOption->SetWorkPath(new_path);
std::wstring res_path = classMgr->GetCoreOption->WorkPath();

# SetSimResultPath

设置仿真结果路径。

# 语法

/**
* @brief 设置仿真结果目录
* @param [in]仿真目录路径
*/
void SetSimResultPath(const std::wstring &simulation_path);

# 说明

设置仿真结果路径。

# 示例

std::wstring path = classMgr->GetCoreOption->SimResultPath();
classMgr->GetCoreOption->SetSimResultPath(new_path);
std::wstring res_path = classMgr->GetCoreOption->SimResultPath();

# SimResultPath

获取仿真结果路径。

# 语法

/**
* @brief 获取仿真结果目录
*/
std::wstring SimResultPath();

# 说明

获取仿真结果路径。

# 示例

std::wstring path = classMgr->GetCoreOption->SimResultPath();
classMgr->GetCoreOption->SetSimResultPath(new_path);
std::wstring res_path = classMgr->GetCoreOption->SimResultPath();

# SetCompileInfo

编译器设置。

# 语法

/**
* @brief 编译器设置
* @para [in/out]cmpl_type 编译器类型
* @para [in/out]cmpl_name 编译器名字
* @para [in/out]cmpl_path_x86 32位编译器路径
* @para [in/out]cmpl_path_x64 64位编译器路径
* @para [in/out]platform  编译时的平台
*/
void SetCompileInfo(
const std::string &cmpl_type, 
const std::wstring &cmpl_name, 
const std::wstring &cmpl_path_x86, 
const std::wstring &cmpl_path_x64, 
MwCPUArch platform);

# 说明

编译器设置,用户可设置本机上的编译器路径和位数,设置后默认使用该编译器进行编译。

# 示例

classMgr->GetCoreOption->SetCompileInfo(“vc”,L”Microsoft Visual Studio 2017”,L”D:/VS2017/VC”,L”D:/VS2017/VC”,MwCoreOption::x86_64);

# GetCompileInfo

获取编译器设置。

# 语法

/**
* @brief 编译器设置
* @para [in/out]cmpl_type 编译器类型
* @para [in/out]cmpl_name 编译器名字
* @para [in/out]cmpl_path_x86 32位编译器路径
* @para [in/out]cmpl_path_x64 64位编译器路径
* @para [in/out]platform  编译时的平台
*/
void GetCompileInfo(
std::string *cmpl_type, 
std::wstring *cmpl_name, 
std::wstring *cmpl_path_x86, 
std::wstring *cmpl_path_x64, 
MwCPUArch  *platform);

# 说明

获取编译器设置。

# 示例

classMgr->GetCoreOption->SetCompileInfo(cmpl_type,cmpl_name,cmpl_path_x86,cmpl_path_x64,platform);

type = vc,

name = Microsoft Visual Studio 2017

path_x86 = D:/VS2017/VC

path_x64 = D:/VS2017/VC

platform = MwCoreOption::x86_64

# SwitchSolverPlatform

切换求解器平台。

# 语法

/**
* @brief 切换求解器平台
* @param[in] 求解平台
*/
bool SwitchSolverPlatform(MwCPUArch platform);

# 说明

切换求解器平台位数。

# 示例

classMgr->GetCoreOption->SwitchSolverPlatform(MwCoreOption::x86_64);