小编Sie*_*mko的帖子

ASP.NET Core appsettings.json在代码中更新

我目前正在使用asp.net core v1.1开发项目,在我的appsettings.json中我有:

"AppSettings": {
   "AzureConnectionKey": "***",
   "AzureContainerName": "**",
   "NumberOfTicks": 621355968000000000,
   "NumberOfMiliseconds": 10000,
   "SelectedPvInstalationIds": [ 13, 137, 126, 121, 68, 29 ],
   "MaxPvPower": 160,
   "MaxWindPower": 5745.35
},
Run Code Online (Sandbox Code Playgroud)

我也有用来存储它们的类:

public class AppSettings
{
    public string AzureConnectionKey { get; set; }
    public string AzureContainerName { get; set; }
    public long NumberOfTicks { get; set; }
    public long NumberOfMiliseconds { get; set; }
    public int[] SelectedPvInstalationIds { get; set; }
    public decimal MaxPvPower { get; set; }
    public decimal MaxWindPower { get; set; …
Run Code Online (Sandbox Code Playgroud)

c# json appsettings .net-core asp.net-core

16
推荐指数
7
解决办法
2万
查看次数

OpenMP - std::next_permutation

我正在尝试使用 OpenMP 并行化我自己的 C++ 实现的旅行商问题。

我有一个函数来计算道路cost()和向量 [0,1,2,...,N] 的成本,其中 N 是道路的节点数。

main(),我试图找到最好的道路:

do
{
    cost();
} while (std::next_permutation(permutation_base, permutation_base + operations_number));
Run Code Online (Sandbox Code Playgroud)

我试图用来#pragma omp parallel并行化该代码,但它只会让它更耗时。有没有办法并行化该代码?

c++ std openmp traveling-salesman

1
推荐指数
1
解决办法
824
查看次数