Questions tagged [disjunction]

7 questions
2
votes
1 answer

Do oneof fields show up on the wire? Is it safe to move a field _out of_ a oneof

https://developers.google.com/protocol-buffers/docs/proto3#oneof doesn't explicitly say that oneofs don't show up on the wire (and it's members are like optional fields), but it heavily hints at it. If this is true, then it seems it would always be…
1
vote
1 answer

Trying to implement boolean disjunction on list using List.fold_right

I am trying to implement boolean disjunction. I have successfully implemented it using recursion, and for a bit of practice I am trying to do the same using List.fold_right but I am failing miserably. let q1fold lst = List.fold_right (fun lst acc…
0
votes
0 answers

GDP Pyomo: List of Disjunctions

I would like to create a disjunction OR for each c in model.Cset. The code below somehow works, but it only takes the value of the last c in the for loop. The aim is to have a disjunction for each c: model.C2(c1), model.C2(c2),etc. So, for each c,…
0
votes
4 answers

Nested Disjunctions in Abstract modelling of Pyomo

I am working on a small optimization model with some disjunctions. The way I did in a concrete model worked well: from pyomo.environ import * m = ConcreteModel() m.d1 = Disjunct() m.d2 = Disjunct() m.d1.sub1 = Disjunct() m.d1.sub2 =…
JBentz
  • 1
0
votes
1 answer

Disjunction and membership in python

When I try this code: a = ['b'] if 'i' or 'j' in a: print('Yes!') else: print('No!') The output is 'Yes!'. Flake8 and python do not complain about an error or bad form. What exactly happens when the code runs? Why does 'i' or 'j' in a…
0
votes
1 answer

Why does this jq expression work if used once, but not twice?

I have a json document { "total": 2000, "start": 0, "entries": [ { "updatedDate": "2021-03-12T13:00:05Z", "createdDate": "2010-06-17T05:34:42Z", "deleted": false, "suppressed": false, "names": [ "Doe,…
Kyle Banerjee
  • 2,554
  • 4
  • 22
  • 30
-1
votes
1 answer

Coq begginer here, how to understand the syntax?

I recently started a class on my college where we solve logical problems in Coq. I'm having problems understanding the principles of programming in Coq, the syntax and "building" ideas in my brain when it comes to problems. For instance, Definition…
SD01
  • 1
  • 2