# How to add a linear contraint between state variables to a current time Hamiltonian?

Let's say I have an objective function $$F$$ with state variables $$A,B,C$$ and relative equations of motion, I can create the current time Hamiltonian with $$H_C = F\{A,B,C\}+\alpha * \dot A+\beta * \dot B + \gamma \dot C$$, where $$\alpha, \beta, \gamma$$ are the 3 co-state variables (I'm omitting here the control variables).

But what if I also have a constraint that in each moment in time I must have something like $$aA + bB + cC = k$$ (where $$a,b,c,k$$ are fixed parameters) ? How do I set this constraint in the hamiltonian ?

Of course I could simply use only the $$A,B$$ variables, but then I still have an equation of motion for $$C$$ (in my application $$A$$, $$B$$ and $$C$$ are different land use areas).

• I think Dorfman might do a similar thing in this paper but I'm not absolutely certain because it's been a long time since I read it. Check it out and see if it helps. andrew.cmu.edu/course/88-737/optimal_control/papers/dorfman.pdf Nov 26, 2023 at 2:07
• In the meantime II have found this where the constraint is simply added to the Hamilton to maximise with an ancillary variable, a bit like with the Lagrangian. Nov 28, 2023 at 21:23
• thanks. I'll check it out. Nov 29, 2023 at 17:25