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

1, 水力模型修复

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