2using System.Collections.Generic;
15 private readonly IReadOnlyDictionary<int, INumVar>
30 IReadOnlyDictionary<int, INumVar> variablesById)
32 ArgumentNullException.ThrowIfNull(cplex);
33 ArgumentNullException.ThrowIfNull(variablesById);
36 _variablesById = variablesById;
66 if (!_variablesById.TryGetValue(
68 out INumVar? variable))
70 throw new InvalidOperationException(
71 $
"No native CPLEX variable is registered for " +
72 $
"mathematical variable identifier {variableId}.");
global::ILOG.CPLEX.Cplex NativeCplex
NativeCplex Cplex
Gets the native CPLEX model.
IReadOnlyDictionary< int, INumVar > VariablesById
Gets the native variables indexed by generic identifier.
CplexModelTranslationResult(NativeCplex cplex, IReadOnlyDictionary< int, INumVar > variablesById)
Initializes a CPLEX translation result.
INumVar GetVariable(int variableId)
Resolves a native variable by generic mathematical identifier.