Commit 734492ef authored by 刘乐's avatar 刘乐

1, 水力模型修复

parent 2c6877e8
......@@ -33,7 +33,7 @@
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
......@@ -75,6 +75,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hModelProgram\Program\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
......@@ -102,7 +103,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
......@@ -110,7 +111,12 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ImportLibrary>$(OutDir)..\lib\$(TargetName).lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>copy Epanet2Out.h $(OutDir)..\include /y
copy epanet2.h $(OutDir)..\include /y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
......
......@@ -17,7 +17,8 @@ int main(int argc, char* argv[])
strcpy_s(outBinFile, "test.bin");
// calc->exportInp(fileName);
// calc->simulation(fileName, rptR, outBinFile);
calc->hydrSimulation(fileName, rptR, outBinFile);
delete calc;
return 0;
}
\ No newline at end of file
......@@ -15,9 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivHydrCalc.cpp">
<Filter>源文件</Filter>
</ClCompile>
......@@ -30,6 +27,9 @@
<ClCompile Include="CivComponent.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="main.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CivHydrCalc.h">
......
......@@ -21,7 +21,6 @@ namespace CivHydr {
return hyDrCompute();
else if (flag == "QUALITY")
return qualityCompute();
return false;
}
......
......@@ -31,10 +31,11 @@ namespace CivHydr {
Boolean simulation(String^ flag);
Boolean getInpFile(String^ inpFile);
/**
*@brief 设置相关文件名
*/
void setInpFile(String^ inpFileName);
void setReportFile(String^ rptFile);
void setOutBinFile(String^ outBinFile);
private:
......
......@@ -14,14 +14,14 @@
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CivHydrCalcMiddle.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CivHydrCalcMiddle.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CivHydrCalcMiddle.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup>
</configuration>
\ No newline at end of file
</configuration>
......@@ -20,9 +20,10 @@ namespace pandaHydrDemo
calc.setOutBinFile("test.bin");
String flag = "HDY";
calc.getInpFile("test.inp");
// Boolean sucess = calc.simulation(flag);
// Console.WriteLine(sucess);
// calc.getInpFile("test.inp");
Boolean sucess = calc.simulation(flag);
Console.WriteLine(sucess);
Console.ReadKey();
}
}
}
......@@ -8,10 +8,11 @@
<OutputType>Exe</OutputType>
<RootNamespace>pandaHydrDemo</RootNamespace>
<AssemblyName>pandaHydrDemo</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
......@@ -26,7 +27,7 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>x64</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Optimize>false</Optimize>
<OutputPath>..\..\hModelProgram\Program\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment