Click here to Skip to main content
15,899,679 members

Comments by dyeung (Top 3 by date)

dyeung 13-Feb-19 6:36am View    
Anyone can show me how to add a constraint to the model? For example, such that decision sx ("SigmaX") must be greater than 1. Optimization won't stop after adding constraint:

model.AddConstraint("sx_min", "SigmaX > 1.0");
dyeung 13-Feb-19 6:32am View    
The issue was not related to the Dictionary. Problem persists even by adding the decisions one by one to be sure of the exact order. No help.
dyeung 13-Feb-19 3:34am View    
One thing I potentially not doing right is that I assume the variables defined in the Dictionary are in the order I added. As it has been warned that the order of the hash table is un-deterministic. However, using the debugger, the variable sx, sy, etc. did pair with the expected keys. Maybe during runtime, that is not necessary the case.

Will try to change code to assign the variable using 'keys' instead and see if it helps.

Daniel