Expaning on Alex's answer: the most interesting example in your case probably is OplRunSample.cs.
In case you don't want to run an OPL model but a model that exists as an LP, MPS, or SAV file, take a look at CPLEX_Studio1210\cplex}examples\src\dotnet
------------------------------
Daniel Junglas
------------------------------
Original Message:
Sent: Tue July 07, 2020 05:54 AM
From: ALEX FLEISCHER
Subject: How can I run an "existed" cplex program from c# code?
Hi,
you have many examples on how to call an OPL model from C# in
CPLEX_Studio1210\opl\examples\opl_interfaces\dotnet\x64_windows_msvc14\CSharp
regards
https://www.linkedin.com/pulse/low-barrier-entry-optimization-through-cplex-alex-fleischer/
------------------------------
ALEX FLEISCHER
Original Message:
Sent: Tue July 07, 2020 03:24 AM
From: 盛翔 范
Subject: How can I run an "existed" cplex program from c# code?
Hi,
I am the student working with CPLEX in C#, through the .Net interface.
I would like to run an "existed" cplex progrm from C# code.
But I only find Cplex cplexModel = new Cplex(); to create a new empty cplex model.
So my question is simply : How can I use the C# .Net to run an "existed" Cplex model and get the var. and obj.value.
Best regards,
Barry
------------------------------
盛翔 范
------------------------------
#DecisionOptimization