Originally posted by: SystemAdmin
[alan_a said:]
Didier,
Thanks for the sample, but I think I'd got the filtering idea.
My problem is more of this form:
dexpr float tdm = sum(w in weeks, r in r_units, g in goals, d in a_set)
units[w][r].dv[d] * caniusethis[g][w][d] * didiusethis[w][r][g];
Forget everything except "units" in the above statement. Here's the definition for units:
int n_units = ...;
range r_units = 1..n_units;
t_unit units[weeks][r_units] = ...;
where t_unit is:
tuple t_unit{
int index;
string a_string;
int some_time;
float price;
float dv[a_set...];
}
r_units varies from 1 - 20k.
I don't know enough to figure out how to get it to work without normalizing this dimension to the maximum size of r_units with data that always gives zero sum answers.
I don't even know if that's possible here!
I could do it in an HLL, but the script equivalent is eluding me.
I could cut down the size of this array (and hence the variables and solve time - I hope) significantly if there's a way to do it.
Either I didn't rtfm enough, or I'm missing something.
#DecisionOptimization#MathematicalProgramming-General