Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [constraints]

A constraint is a condition that has to be fulfilled in a given context. Constraints are typically used in databases and programming languages to detect errors, ensure data consistency, accuracy, and to enforce business requirements.

constraints
0 votes
0 answers
27 views

SciPy nonlinear constraints in case of increasing values

I'm having trouble with global optimisation for a function that has specific constraints on the values. Let me explain the situation. We have a function F(x1, x2,..., xn, a, b), and our goal is to ...
Vladimir Sinitsyn's user avatar
2 votes
1 answer
48 views

Unique partial indexes in PostgreSQL

I have a table (table_a) with columns: id, column_b, column_c, column_d, and archived. The id column is the primary key. The combination of column_b and column_c should be unique when archived = 0. If ...
Padma Gnanapriya's user avatar
0 votes
1 answer
35 views

Pyomo- adding in export limitation constraints into pyomo optimization for battery energy storage optimization model

I've been bashing my head up against a wall trying to add additional constraints into the battery energy flow model: https://github.com/cwkcodes/lockbox/tree/7943fb664e808c0ba1bcb11a81f6180b34e1a623/...
Cameron Kerr's user avatar
0 votes
0 answers
6 views

Taking account of generator ramp constraints in pypsa optimisation

I would like to know how Pypsa handles the ramp constraints (on load, at start-up and at shutdown) of generators. Is it sufficient to fill in these attributes only or does it require additional codes? ...
Amar Becegade's user avatar
0 votes
1 answer
40 views

Managing the case sensitivity for a unique field in symfony [duplicate]

I have a form where there is one field "place" and I have used UniqueEntity to make that field unique. But the issue I'm currently facing is that if the user types the same place but changes ...
Exo.JM's user avatar
  • 3
0 votes
0 answers
6 views

Could we impose to a SARIMA model that the sum of predict values equals a given value (in R)?

I work on a forecasting R model (SARIMA) with monthly time series data. However, for the last year of my training data (2023), I don't have the details by months but I have the annual value. I want to ...
Maxime Hautin's user avatar
-1 votes
0 answers
17 views

Postgres relationship between inherits tables

I'm facing an issue when trying to add records to the joined_login_role table in PostgreSQL. I created a new entity tb_psychologist which inherits from tb_login, and when I create a new record in ...
ceszkraft's user avatar
0 votes
0 answers
27 views

How to increase nested TableView's Height in Swift iOS?

I have the main TableView which cell contains another TableView and this TableView's cell also contains another TableView. This is the response I'm getting from the backend: { "data": [ ...
Dimpy-iRoid's user avatar
0 votes
1 answer
17 views

Swift UIKit ordering and positioning with constraints inside a custom table cell [duplicate]

I have a custom table cell, and all I want to do is insert two button images inside it. This is my code: gb = UIButton() gb.setImage(UIImage(named: "skejt_zelena_polutka"), for: .normal) gb....
Vladimir Despotovic's user avatar
0 votes
0 answers
8 views

associations and specializations in class diagram

in the following diagram I have not reported the fact that the type : tip attribute of class3 is an enumeration that can take on two values ​​st or pt . My question is, is this representation okay if ...
dok's user avatar
  • 345
1 vote
1 answer
46 views

Rust Generic with trait constraint, where trait also has a generic with a trait constraint

The following example is the simplest I can come up with to try to illustrate what I'm struggling to achieve: pub trait Recipient { fn receive(&self, number: i32); } pub trait ...
Johnny Egeland's user avatar
0 votes
2 answers
50 views

How do I make my container take up entire space?

I am making a screen that has a shelf image along with a plus icon overlaying the entire image with a dotted border. I want to make the dotted border take up the entire space allowed by the largest ...
Sanchit Batra's user avatar
0 votes
1 answer
25 views

MiniZinc: Getting two outputs for an optimal path in a simple TSP model

I am a student starting with the basics of optimization. Basically when I run my TSP model in MiniZinc (IDE 2.8.5, Gecode 6.3.0), I got two "optimal" paths, but it should be only one, right? ...
Marcus J S Pereira's user avatar
1 vote
1 answer
57 views

Comparing list of lists

What I'm trying to do is given a list of lists like the one bellow: inicialState(e([5, 5, 5], [6, 5, 5])). I want to calculate the some of all the elements of one list and compare it to a certain ...
Pietro's user avatar
  • 13
1 vote
0 answers
31 views

Displaying table layout with table and column name referenced by foreign keys in Postgres

I have this query that works for version 14 of postgres, but doesn't work for version 15. What it does is show the table name, column name, primary key and how it corresponds with it's foreign key. ...
Erik Christiansen's user avatar

15 30 50 per page
1
2 3 4 5
597