Solution Variables being dropped
See original GitHub issueThe solver is dropping solution variables for an unknown reason. e.g. a mwe:
var model = { optimize: 'total_z',
opType: 'min',
constraints:
{ c_0_1: { min: 2 },
c_0_2: { min: 2 },
c_1_2: { min: 2 },
a_0: { min: 1 },
b_0: { min: -1 },
a_1: { min: 2 },
b_1: { min: -2 },
a_2: { min: 3 },
b_2: { min: -3 } },
variables:
{ y_0: { a_0: 1, b_0: -1, c_0_1: -1, c_0_2: -1 },
z_0: { a_0: 1, b_0: 1, total_z: 1 },
y_1: { a_1: 1, b_1: -1, c_0_1: 1, c_1_2: -1 },
z_1: { a_1: 1, b_1: 1, total_z: 1 },
y_2: { a_2: 1, b_2: -1, c_0_2: 1, c_1_2: 1 },
z_2: { a_2: 1, b_2: 1, total_z: 1 } } };
console.log(solver.Solve(model));
// { feasible: true, result: 2, y_1: 2, z_2: 1, y_2: 4, z_0: 1 };
For some reason 'y_0' = 0
is missing from the result.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top Results From Across the Web
Dropped variables still included in generator type · Issue #57478
After being reminded of this I realised this isn't really about "dropping" variables, it's about moving the variables out of the generator, ...
Read more >st: RE: programatically dropping variables that don't actually vary
Re: st: RE: programatically dropping variables that don't actually vary ... Another solution would >>> be save through StatTansfer and use ...
Read more >Variable observations get deleted after running execute
I am trying to prepare my dataset for a survival time analysis. To do that, I have to clone new variables from already...
Read more >Keeping and dropping variables - Stata Video Tutorial - LinkedIn
Explore how to keep and drop observations and variables in Stata using the drop and keep commands. Learn ways to temporarily store and...
Read more >lm() looped over factor variable while dropping single-level ...
Your model's formula is conditional on whether or not there are enough levels in each independent variable to be included.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the quick feedback and for the project, I didn’t realize that it was only zeros that were excluded. I also didn’t realize that all variables have an implied non-negativity constraint, which is why variables I didn’t expect were zero. I don’t think it’s necessary that zeros are included, but documentation of that fact (and the non-negativity constraint) would be nice.
hey, thanks for using the solver! Actually, all missing variables can be assumed to have a value of 0. I think we should add this details to the readme. Would it be a satisfactory solution?