Questions tagged [optimal]

35 questions
5
votes
0 answers

How to create a map of settlement for a game of poker algorithmically containing the least number of transactions?

Poker is a zero-sum game. This means that the amount of money going out of the table is equal to the amount going in. I mentioned poker here because that is what I need the solution for, but the question applies to any zero-sum game. Let's say that…
dominikduda
  • 325
  • 3
  • 16
3
votes
1 answer

What is the most rng-efficient uniform random integer algorithm?

This is not a duplicate of #11766794 “What is the optimal algorithm for generating an unbiased random integer within a range?”. Both its top-upvoted answer and its Accepted answer have to do with floating-point extrapolation, which will not even…
2
votes
1 answer

There is an python code to solve an optimal control problem but I don't get the solution. I don't what is wrong

The goal is to minimise the compartment M_u and F_u at the end and maximize M_i and F_i. My function objective is: In LaTeX: $J(u)=M_u^2+F_u^2+ \int_0^T(Mi+Fi)u^2dt$ the ode system to control is the following. Where u is the control In…
Nash
  • 21
  • 3
2
votes
1 answer

can Gekko solve vector based dynamic optimization problem for optimal control

i have tried many solver but getting errors somewhere. now im going to try gekko for my problem. Please Lt me know that gekko can this kind of problem, where M in python function take the variable q. and all variables and parameters are in form of…
2
votes
1 answer

GEKKO for minimum time solution optimal control problem

This is a standard benchmark problem for minimum flight time. This is a very standard problem. I am trying to solve it in gekko, but it is neither converging to local minima nor global, here is the code. I followed the set up from the Jennings…
2
votes
1 answer

Free terminal time, integral objective type 2

I am trying to solve an optimal control problem that involves minimizing an integral objective with fixed states but free terminal time. It is a relatively simple problem that can be solved analytically. Gekko's solution doesn't match the…
2
votes
1 answer

Free terminal time, integral objective and differential equations as constraints

I am trying to solve an optimal control problem that involves minimizing an integral objective with fixed states but free terminal time. It is a relatively simple problem that can be solved analytically. Gekko's solution doesn't match the…
2
votes
1 answer

Python GEKKO: Objective function not showing correct results

I am trying to optimize the trajectory of a thrust propelled system. The control variable is the mass flow rate, and the final objective is to maximize the mass of the robot, minimizing the amount of propelled used. The trajectory resembles a…
2
votes
1 answer

GEKKO does not find optimal solution for a moon lander that does not go to zero height at zero speed

I'm trying to solve an optimal control problem where a person lands on the Moon, but has a device that can propel her upwards, via a control parameter, alpha. The objective of the problem is to find the minimal time in which the moon lander can…
Hector MD
  • 55
  • 5
2
votes
1 answer

How to ensure a Step Function Control in GEKKO and confusion about MV_TYPE

I have a simple optimal control problem where I have to find a step function f(t) to maximize an objective functional (IMODE=6). Now f(t) is defined for t in [0, 10) such that f takes on 10 different equi-spaced values. (i.e. f(t)=f0 for 0 ≤ t < 1,…
1
vote
0 answers

how to solve vector-based variable/constraints in python pyomo

enter image description here I am solving this problem, i write code. but getting error at last line ' results' please anyone know how to deal vector based dynamic optimization please let me know. model = ConcreteModel() model.num_itter =…
1
vote
0 answers

Passing function arguments to list in Optimal Control Application

My intention is to pass the initial guess as an argument of a function instead of directly defining it in the body of the code. 1)Is there a way to do this without getting: TypeError: cannot unpack non-iterable int object Also, my additional goal is…
TomGiavas
  • 31
  • 4
1
vote
1 answer

How to specify integration of a quantity as an objective in Dymos

I am implementing Bryson-Denham problem. The objective is: $J=\frac{1}{2}\int_{0}^{1}u^2\left(t\right)dt$ and in the doc of Dymos, all explanation and examples state objective value as a scalar at loc=initial or loc=final. I could not find any…
ehehd
  • 13
  • 3
1
vote
2 answers

How to create a program for constraints based on decision variables when using Python's pulp

Introduction I would like to create a "switch using a decision variable (if syntax)" using Python's pulp. Here, "switch using decision variables (if syntax)" means, for example, "when x (x is an integer greater than or equal to 0) and y (y is a…
icecat
  • 33
  • 5
0
votes
0 answers

How to apply optimal control to the below model? I have used this code to find the optimized (max) value of x3

This code is to find the optimum(maximum) value of x3 in range of (-8e-4 to 2e-4) by varying kst,x1,x5 and xo) % Main file function rest = Scrpt1(t,X,X_opt) x5=X_opt(1); kst=X_opt(2); xo=X_opt(3); x1=X_opt(4); x2 = X(1); x3 = X(2);…
1
2 3