A poorly donned white coat

I just returned Hild by Nicola Griffith to the library, read about a quarter of the way through.  It’s a strong, dark novel, powerfully written, impeccably researched, historically grounded, and precisely what I like to read and to recommend.  Why did I return it so quickly?  
Because I did not care.  I do not care who, in this case, becomes overking of the Angles, or who is murdered trying to do it.  I do not care who marries whom, or why.  In another book, I might have been eager to find out.  But this is simply one of the legions of fine novels in which I do not care what happens to any of the characters.
How does this come about?  Every reader of fiction knows the experience: the wilting of anticipation, the careful rereading of a page one suddenly realized one has skipped without noticing, the attempt to be patient with the book, the doubting of one’s own taste and intelligence (if the book was very Highly Touted); and finally, the throwing up of hands.  
Why do we cease to care about one book, and not another?  It is certainly not a question of quality.  I would recommend Hild or any number of other books on the basis of good craftsmanship alone, but the fact remains that I can tear through a potboiler mystery faster than I plodded through what I did in Hild.  It certainly does not matter whether the main characters are good people, or smart, or otherwise worthy of success.  People love connivers and antiheroes.  It is not a question of storytelling skill, either, or good storytellers would only ever write fascinating books, a thing known to be untrue to the legions of us who slogged through Doctor Sleep.  
Is there, perhaps, some formula, some theorem that lies undiscovered that would allow us to determine why a book loses a reader’s interest even when it is well-written.  The results would differ from reader to reader, of course.  But if such a formula existed, it would have to look something like this:
Let F equal “whether or not this book is interesting enough to finish.”  F must be equal to or lesser than 50.
Let A equal “the human decency of the main character,” on a scale of 1 to 10.
Let B equal “the characterization of the main character” – self-determination, strength, history, and so forth.
Let C equal “the human decency of the surrounding characters,” up to and including the antagonist.
Let D equal  “the characterization of the surrounding characters,” as above.
Let E equal “the characterization of the setting” – does the setting itself, the location and the time period, serve as a character?  Does it dazzle the reader (as in a novel of ancient Egypt), or comfort her (as in the Precious Ramotswe novels), or overwhelm with horror (as in the work of Lovecraft)?  And how well is this accomplished?
Say then that A + B + C + D + E must equal F=50, and furthermore that no more than two of the above named variables can equal 0.  For example, you can have a character where all the characters are bastards, but all of them are very strongly characterized and well-drawn in a compelling, forceful setting.  This is interesting.  But if the setting is dull, or the surrounding characters just pathetic foils for the main, then the narrative lacks its drive.
This is, of course, an unfalsifiable hypothesis, and thus worthless.  Still, it might help me understand what it is that makes me set a book down, when it would seem I have no excuse otherwise.